Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3009222rwb; Mon, 7 Nov 2022 22:30:32 -0800 (PST) X-Google-Smtp-Source: AMsMyM6I4G+hRcbyWCrYNWDJdi6Ku+3SCWpbZw0sUurigif2NUmENj4rOx5nNZaV1IYLlQuz/6lZ X-Received: by 2002:a17:90a:9606:b0:213:aff5:e537 with SMTP id v6-20020a17090a960600b00213aff5e537mr52445483pjo.183.1667889032111; Mon, 07 Nov 2022 22:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667889032; cv=none; d=google.com; s=arc-20160816; b=w2dz2AaEWCkmiy7Mf6r21GzOe9+Yw99RsnubYIuzqVCIX1R85+3jwDGMUvZYY5BE9q 5nUCnee9mgezpSyCe/+x3JwbY8LrKygzdef64zYYtmHgpy2RfFvhZfyMpBmAJElNqqgs U2FJVuhh4gHgo31c4Z5+1bGUTW4NLVEtMiQxyrhUSs8oPuE0ykdiqlgPa988KOxF96Q8 ljhL7sJuOhALfEqqqozkLAfBvyNT/P2o50OlfF3iZVdyn0Tq7ZWTM9O+Ogbv5n/ZiRh3 kywlgSA6C31MLj/ITcVtRr/35KlEHwh7EALT1/8MrtcsNrKf5Teg6m59EVwNXfA5KLYM WmSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=V+aVuxTdXdd9m/xR2Q0RVS8UnyYU09ZK74bwG6KqNE8=; b=o0Joj9VFrfUWcZDYHNga0Ygar/WbyanY24iK5vOfnvLWuDv+BHT16gDmTthpfi+oud mbveTaB19Nf5dYwVV4aG3pIiPczS5iYT4GL1FiydYVQbt0eh0rh3PPIlexbJg/IRxf5R Eyz4+TdCriVSEnLKTbDXdXKaoqWZxaNOSqFzgcDmPGTJQjfw/4QYEVZYBfXctvvwRTDO l+YZnhchgX9oRnDGk1WHa3hTKGlN8EGyB345y7C5dvqXhG5zR2qaYbhcatpJSBTs+poj JXAYDovkF054+aEDhVEHJwpn9nEfZvD12q12+5W+nXNHerScufv8pY9XHtZJEcCSs6/z bDDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="BmR7J+Z/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t5-20020a056a0021c500b005618039550fsi14591655pfj.271.2022.11.07.22.30.16; Mon, 07 Nov 2022 22:30:32 -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="BmR7J+Z/"; 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 S233399AbiKHGBw (ORCPT + 90 others); Tue, 8 Nov 2022 01:01:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbiKHGBu (ORCPT ); Tue, 8 Nov 2022 01:01:50 -0500 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 893D2CE0D; Mon, 7 Nov 2022 22:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: 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=V+aVuxTdXdd9m/xR2Q0RVS8UnyYU09ZK74bwG6KqNE8=; b=BmR7J+Z/XxI14992OWg4fOM59J ulfRuZpB6RSzOTI7ciB7kpIFromcGNTXVQR0ukGPiDKBuRegPAWxbZxZyum5IewmO5YljJkkSeCTO li0wYOO9LFOicFc+ql6NfoCyfxDYyKZB3queWRUBhj8L0CsHRILAcmvwsGq+fY5hGLJE=; Received: from p200300daa72ee1006d973cebf3767a25.dip0.t-ipconnect.de ([2003:da:a72e:e100:6d97:3ceb:f376:7a25] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1osHfu-000RzP-Cj; Tue, 08 Nov 2022 07:01:30 +0100 Message-ID: Date: Tue, 8 Nov 2022 07:01:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH 05/14] net: dsa: tag_mtk: assign per-port queues Content-Language: en-US To: Vladimir Oltean Cc: netdev@vger.kernel.org, Sean Wang , Landen Chao , DENG Qingfang , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20221107185452.90711-1-nbd@nbd.name> <20221107185452.90711-5-nbd@nbd.name> <20221107212209.4pmoctkze4m2ggbv@skbuf> From: Felix Fietkau In-Reply-To: <20221107212209.4pmoctkze4m2ggbv@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 07.11.22 22:22, Vladimir Oltean wrote: > On Mon, Nov 07, 2022 at 07:54:43PM +0100, Felix Fietkau wrote: >> 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); >> + > > Should DSA have to care about this detail, or could you rework your > mtk_select_queue() procedure to adjust the queue mapping as needed? I'm setting the queue here so that I don't have to add the extra overhead of parsing the payload in the ethernet driver. For passing the queue, I used a similar approach as tag_brcm.c and drivers/net/ethernet/broadcom/bcmsysport.c - Felix