From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D8F2C3A5A6 for ; Thu, 19 Sep 2019 13:35:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71D78218AF for ; Thu, 19 Sep 2019 13:35:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389812AbfISNfz (ORCPT ); Thu, 19 Sep 2019 09:35:55 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:43345 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388819AbfISNfz (ORCPT ); Thu, 19 Sep 2019 09:35:55 -0400 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1iAwbB-00085P-U4; Thu, 19 Sep 2019 15:35:54 +0200 Message-ID: <5369a4b61692ad8c1cd35ee96e04db53780cadfe.camel@pengutronix.de> Subject: Re: dsa traffic priorization From: Jan =?ISO-8859-1?Q?L=FCbbe?= To: Florian Fainelli , Vladimir Oltean , Sascha Hauer Cc: netdev , Vivien Didelot , kernel@pengutronix.de, Andrew Lunn Date: Thu, 19 Sep 2019 15:35:53 +0200 In-Reply-To: <1b80f9ed-7a62-99c4-10bc-bc1887f80867@gmail.com> References: <20190918140225.imqchybuf3cnknob@pengutronix.de> <1b80f9ed-7a62-99c4-10bc-bc1887f80867@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: jlu@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 2019-09-18 at 10:41 -0700, Florian Fainelli wrote: > > > The other part of the problem seems to be that the CPU port has no network device > > > representation in Linux, so there's no interface to configure the egress limits via tc. > > > This has been discussed before, but it seems there hasn't been any consensous regarding how > > > we want to proceed? > > You have the DSA master network device which is on the other side of the > switch, We thought it might be intutive to allow configuration of this via tc on the DSA master device (eth0, the i.MX FEC in our case). You'd specify ingress policing via tc, and the kernel would try to hw-offload that to the switch's CPU egress side first, maybe fall back to offload on the SoC's network controler and finally use the normal SW implementation. If that sounds reasonable, the next question would be how to express matching on switchdev information (such as the ingress port or vlan priority). Regards, Jan