From patchwork Mon Nov 7 18:54:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 16644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2234390wru; Mon, 7 Nov 2022 11:02:48 -0800 (PST) X-Google-Smtp-Source: AMsMyM7niQNUXkwyucabvrRFFJaxwcmUZO0fI2Qf6AYgiP6b/msSIb8eGH8LLThuWcfp84vBrPk5 X-Received: by 2002:a63:2221:0:b0:43b:f4a3:80cc with SMTP id i33-20020a632221000000b0043bf4a380ccmr43950868pgi.367.1667847768414; Mon, 07 Nov 2022 11:02:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667847768; cv=none; d=google.com; s=arc-20160816; b=zwlUFnktqZ5uOwCqRMGn9cXS9Bb/Mmh5W9/KsW8zHZEichK5ylUNuVWn/Hl4dcnHVE dydqk9/yTHLnQ4YcacLiwG+Bh/mX9pNkgX/3HahRyS5g9PN21WYsYcvPvX+RnX3E9lpC cJegukVgAh2hneySN+e/j6CFutcHzHBVH7a395J9MAB6vMDLbzUsgAKKcE1MScGO4Dcm jpV81YUuoXGWt1FHJr4MbO7zUk7BlK8ghRBclg5jO1w6FSEKKcEe1uHjKkodiLj5FxFy vunRDEmQCnsFdnua85CG/UyOW7b/tgC1x9BfkGhiQ/x9KLDlINFgbgwdG9VkfetGIHn9 Kk1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NK0vwwMtxTTinLUgl7QN7r2/pgagKlFgwncSbFJ9IGE=; b=nwMExM+h7CTU6jWss+2ah3eIxzmcVbn03x4JHS2McMd9/p7h13HptRnBv6beFs7WSn gvBs7OzD4nRV2p7yZTapiXoL9A1O5xexU2hSvPWsfZQy3AspDdgG+76khtdXH9+ekBis Mjlgax/va5t7oxYLyx0/G/PRV1oEqJ9Ei9Z/Yz4o/EDO+haQ5pibnRL22AoUUakR+rdt DFCYj2kyj5KlBY6zPijzNNFSnrtNf7I9VEKYZoYcbdWhMeNqa4UroBQLYqBe/NevrRqr BOovZvZEHyu3cJnv+l/5HF0EiVHlvrAKK4D9WxWx8Hkw+O+t5nCf3H5s/ArkfrhzmppV yKSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=sJ+LgM5z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ng17-20020a17090b1a9100b00213f1db312esi12408342pjb.111.2022.11.07.11.02.28; Mon, 07 Nov 2022 11:02:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=sJ+LgM5z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233192AbiKGSzu (ORCPT + 99 others); Mon, 7 Nov 2022 13:55:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233014AbiKGSzg (ORCPT ); Mon, 7 Nov 2022 13:55:36 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17F9825C6C; Mon, 7 Nov 2022 10:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=NK0vwwMtxTTinLUgl7QN7r2/pgagKlFgwncSbFJ9IGE=; b=sJ+LgM5ziaaaPM0CuCZo65AOfB HWLCQirev7CCzYmWCu8yMaIDJkFWFYjnfRDENxFFebEFSfHE41tnx5PNJsn7BiQBCZNHdeaGk8wSV BRjEiGZ6x8IycT9E6tyxeE6o8u+sqnS+f3TAaYN+t8ZyEcg/W2zo8HVBgU+eJLTsAO8I=; Received: from p200300daa72ee1007849d74f78949f6c.dip0.t-ipconnect.de ([2003:da:a72e:e100:7849:d74f:7894:9f6c] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1os7HB-000LCc-Td; Mon, 07 Nov 2022 19:55:18 +0100 From: Felix Fietkau To: netdev@vger.kernel.org, Sean Wang , Landen Chao , DENG Qingfang , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/14] net: dsa: tag_mtk: assign per-port queues Date: Mon, 7 Nov 2022 19:54:43 +0100 Message-Id: <20221107185452.90711-5-nbd@nbd.name> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107185452.90711-1-nbd@nbd.name> References: <20221107185452.90711-1-nbd@nbd.name> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748865141519672660?= X-GMAIL-MSGID: =?utf-8?q?1748865141519672660?= Keeps traffic sent to the switch within link speed limits Signed-off-by: Felix Fietkau --- net/dsa/tag_mtk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/tag_mtk.c b/net/dsa/tag_mtk.c index 415d8ece242a..445d6113227f 100644 --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c @@ -25,6 +25,9 @@ static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb, u8 xmit_tpid; u8 *mtk_tag; + /* Reserve the first three queues for packets not passed through DSA */ + skb_set_queue_mapping(skb, 3 + dp->index); + /* Build the special tag after the MAC Source Address. If VLAN header * is present, it's required that VLAN header and special tag is * being combined. Only in this way we can allow the switch can parse