From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751913AbdEJCm0 (ORCPT ); Tue, 9 May 2017 22:42:26 -0400 Received: from mail-he1eur01on0060.outbound.protection.outlook.com ([104.47.0.60]:29899 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751445AbdEJCmY (ORCPT ); Tue, 9 May 2017 22:42:24 -0400 From: Andy Duan To: David Miller , "stefan@agner.ch" CC: "andrew@lunn.ch" , "festevam@gmail.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] net: fec: select queue depending on VLAN priority Thread-Topic: [PATCH] net: fec: select queue depending on VLAN priority Thread-Index: AQHSyIZS9VC8qPGv5Uy3tIGsDbB0eqHsAj2AgADH1QA= Date: Wed, 10 May 2017 02:42:21 +0000 Message-ID: References: <20170509053708.2573-1-stefan@agner.ch> <20170509.093913.1803457630634565212.davem@davemloft.net> In-Reply-To: <20170509.093913.1803457630634565212.davem@davemloft.net> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; x-originating-ip: [199.59.226.141] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM4SPR00MB281;7:SSHbHo3z+OSO9rTxVCTj+/LRPeJXh+clLzhdCeBpIJ/XkVuQv7F3EK6I+fU9ZzW0R3Sk25rQzg8EGvX7pDf1yihXrQhMMrPZNyasX+r4WM5gy86ywdjrlz+7AOZ0yVF4qy7++nRrIsyKc8AO5wIlgEOSB1fyaaBVtNcpXIVp0ivgzIysAhcMxxPJIJ017zj5DmziMZ5yl0XP9SnbS3TqfnOp5ggNYV0jqxzZ4wHtEFC04N5A7tZRiFDx9Iqv2UhK+UQefEIGvAZWOmIexEMy2v266syt+cTWVIR8YwATWOgNIPPDMS4uXfPFyjhLoxFOLPUIfGODzQTLHem4GREdWw== x-ms-office365-filtering-correlation-id: 4aee829d-394f-4c4a-69ab-08d4974e2ead x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:AM4SPR00MB281; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(6072148);SRVR:AM4SPR00MB281;BCL:0;PCL:0;RULEID:;SRVR:AM4SPR00MB281; x-forefront-prvs: 03030B9493 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(39840400002)(39450400003)(39410400002)(39400400002)(39850400002)(377454003)(6506006)(66066001)(229853002)(189998001)(53936002)(7696004)(2900100001)(4326008)(39060400002)(38730400002)(99286003)(2501003)(5250100002)(6436002)(54356999)(50986999)(76176999)(3280700002)(8936002)(33656002)(6246003)(2906002)(7736002)(54906002)(3846002)(86362001)(6116002)(25786009)(575784001)(102836003)(5660300001)(55016002)(478600001)(81166006)(8676002)(74316002)(2950100002)(305945005)(9686003)(3660700001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4SPR00MB281;H:AM4PR0401MB2260.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2017 02:42:21.0841 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4SPR00MB281 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v4A2hbZx031277 From: David Miller Sent: Tuesday, May 09, 2017 9:39 PM >To: stefan@agner.ch >Cc: Andy Duan ; andrew@lunn.ch; >festevam@gmail.com; netdev@vger.kernel.org; linux- >kernel@vger.kernel.org >Subject: Re: [PATCH] net: fec: select queue depending on VLAN priority > >From: Stefan Agner >Date: Mon, 8 May 2017 22:37:08 -0700 > >> Since the addition of the multi queue code with commit 59d0f7465644 >> ("net: fec: init multi queue date structure") the queue selection has >> been handelt by the default transmit queue selection implementation >> which tries to evenly distribute the traffic across all available >> queues. This selection presumes that the queues are using an equal >> priority, however, the queues 1 and 2 are actually of higher priority >> (the classification of the queues is enabled in fec_enet_enable_ring). >> >> This can lead to net scheduler warnings and continuous TX ring dumps >> when exercising the system with iperf. >> >> Use only queue 0 for all common traffic (no VLAN and P802.1p priority >> 0 and 1) and route level 2-7 through queue 1 and 2. >> >> Signed-off-by: Fugang Duan >> Fixes: 59d0f7465644 ("net: fec: init multi queue date structure") > >If the queues are used for prioritization, and it does not have multiple normal >priority level queues, multiqueue is not what the driver should have >implemented. Firstly, HW multiple queues support: - Traffic-shaping bandwidth distribution supports credit-based and round-robin-based policies. Either policy can be combined with time-based shaping. - AVB (Audio Video Bridging, IEEE 802.1Qav) features: * Credit-based bandwidth distribution policy can be combined with time-based shaping * AVB endpoint talker and listener support * Support for arbitration between different priority traffic (for example, AVB class A, AVB class B, and non-AVB) Round-robin-based policies: It has the same priority for three queues: In the round-robin QoS scheme, each queue is given an equal opportunity to transmit one frame. For example, if queue n has a frame to transmit, the queue transmits its frame. After queue n has transmitted its frame, or if queue n does not have a frame to transmit, queue n+1 is then allowed to transmit its frame, and so on. Credit-based policies: The AVB credit based shaper acts independently, per class, to control the bandwidth distribution between normal traffic and time-sensitive traffic with respect to the total link bandwidth available. Credit based shaper conbined with time-based shaping: - priority: ClassA queue > ClassB queue > best effort - ensure the queue bandwidth as user set based on time-based shaping algorithms (transmitter transmit frame from three queue in turn based on time-based shaping algorithms) And in real AVB case, each streaming can be independent, and are fixed on related queue. Then driver level should implement .ndo_select_queue() to put the streaming into related queue. That is what the patch did. The current driver config the three queue to credit-based policies (AVB), the patch seems no problem for the implementation. Do you have any suggestion ? Andy