netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>,
	Or Gerlitz <gerlitz.or@gmail.com>,
	David Miller <davem@davemloft.net>,
	Florian Westphal <fw@strlen.de>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jiri Pirko <jiri@mellanox.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [net-next,v5,00/12] add flow_rule infrastructure
Date: Thu, 13 Dec 2018 21:17:38 +0100	[thread overview]
Message-ID: <20181213201738.GI21324@unicorn.suse.cz> (raw)
In-Reply-To: <20181213195439.dn7wt2mlfoo5dkpw@salvia>

On Thu, Dec 13, 2018 at 08:54:39PM +0100, Pablo Neira Ayuso wrote:
> On Thu, Dec 13, 2018 at 11:23:15AM -0800, Jakub Kicinski wrote:
> > I think having the drivers call the IR translation could be a good
> > compromise instead of having flower always pass down converted flows.
> > 
> > tc flower ->  flower offload object -> setup_tc   -> driver -> 
> >   -> flow_offload_from_flower() -> driver -> driver's common handling
> > 
> > This patchset already does that for ethtool:
> > 
> > ethtool   ->  ethtool flow          -> ethtool_op -> driver -> 
> >   -> ethtool_rx_flow_rule_create() -> driver -> driver's common handling
> > 
> > It feels like a bit of a waste to let the driver patches go, but
> > perhaps it's a good way to move forward?
> 
> I think Michal Kubecek mentioned that it would be good if, moving
> forward, core/ethtool.c calls ethtool_rx_flow_rule_create(), so this is:
> 
> ethtool   ->  ethtool flow -> ethtool_rx_flow_rule_create() ->
>  -> ethtool_op -> driver -> driver's common handling
> 
> In that case, ethtool would match what flower is doing.
> 
> We can probably offer the flow_rule representation as parameter via
> ethtool_op indirection, so there is a single ethtool_rx_flow_rule_create()
> call. Still, this new infrastructure is used by two ethtool drivers,
> so probably it is too early for this consolidation work.

The main reason why I would prefer the translation in the generic
ethtool code is that once we have netlink interface for ethtool, current
model would require us to translate netlink messages to the data
structures for current ethtool_ops handlers (which are essentially the
same as those used by ethtool ioctl interface) only to translate them
once more in the NIC handler to the common representation.

So in the long term it seems better to let ethtool_ops use your
representation of Rx flow rules and translate both the ioctl structures
and netlink messages into it in the generic code so that NIC drivers
would only work with flow_rule.

But at the moment, this would mean a lot of work for not so much gain as
it would mean adjusting all NIC drivers supporting Rx flow rule handling
via ethtool. Also, it would look strange if the new ethtool_ops handlers
passed extack which the only caller wouldn't use.

Michal Kubecek

      reply	other threads:[~2018-12-13 20:17 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 22:39 [PATCH net-next,v5 00/12] add flow_rule infrastructure Pablo Neira Ayuso
2018-12-06 22:39 ` [PATCH net-next,v5 01/12] flow_offload: add flow_rule and flow_match structures and use them Pablo Neira Ayuso
2018-12-08  8:27   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 02/12] net/mlx5e: support for two independent packet edit actions Pablo Neira Ayuso
2018-12-08  8:49   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 03/12] flow_offload: add flow action infrastructure Pablo Neira Ayuso
2018-12-08  8:49   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 04/12] cls_api: add translator to flow_action representation Pablo Neira Ayuso
2018-12-08  8:49   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 05/12] flow_offload: add statistics retrieval infrastructure and use it Pablo Neira Ayuso
2018-12-08 12:56   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 06/12] drivers: net: use flow action infrastructure Pablo Neira Ayuso
2018-12-08 12:59   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 07/12] cls_flower: don't expose TC actions to drivers anymore Pablo Neira Ayuso
2018-12-08 12:57   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 08/12] flow_offload: add wake-up-on-lan and queue to flow_action Pablo Neira Ayuso
2018-12-08 13:12   ` Jiri Pirko
2018-12-06 22:39 ` [PATCH net-next,v5 09/12] ethtool: add ethtool_rx_flow_spec to flow_rule structure translator Pablo Neira Ayuso
2018-12-08 13:14   ` Jiri Pirko
2018-12-06 22:40 ` [PATCH net-next,v5 10/12] dsa: bcm_sf2: use flow_rule infrastructure Pablo Neira Ayuso
2018-12-08 17:22   ` Jiri Pirko
2018-12-06 22:40 ` [PATCH net-next,v5 11/12] qede: place ethtool_rx_flow_spec after code after TC flower codebase Pablo Neira Ayuso
2018-12-08 17:22   ` Jiri Pirko
2018-12-06 22:40 ` [PATCH net-next,v5 12/12] qede: use ethtool_rx_flow_rule() to remove duplicated parser code Pablo Neira Ayuso
2018-12-11 15:35 ` [net-next,v5,00/12] add flow_rule infrastructure Florian Westphal
2018-12-11 19:14   ` David Miller
2018-12-11 20:59     ` Or Gerlitz
2018-12-11 22:17       ` Jakub Kicinski
2018-12-13 10:06         ` Or Gerlitz
2018-12-13 19:23           ` Jakub Kicinski
2018-12-13 19:54             ` Pablo Neira Ayuso
2018-12-13 20:17               ` Michal Kubecek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181213201738.GI21324@unicorn.suse.cz \
    --to=mkubecek@suse.cz \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fw@strlen.de \
    --cc=gerlitz.or@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).