netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Thomas Graf <tgraf@suug.ch>, Jamal Hadi Salim <jhs@mojatatu.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	simon.horman@netronome.com, sfeldma@gmail.com,
	netdev@vger.kernel.org, davem@davemloft.net,
	gerlitz.or@gmail.com, andy@greyhouse.net, ast@plumgrid.com
Subject: Re: [net-next PATCH v3 00/12] Flow API
Date: Fri, 23 Jan 2015 07:43:48 -0800	[thread overview]
Message-ID: <54C26C34.2000309@gmail.com> (raw)
In-Reply-To: <20150123152556.GG2065@nanopsycho.orion>

On 01/23/2015 07:25 AM, Jiri Pirko wrote:
> Fri, Jan 23, 2015 at 03:07:24PM CET, tgraf@suug.ch wrote:
>> On 01/23/15 at 02:43pm, Jiri Pirko wrote:
>>> Fri, Jan 23, 2015 at 01:28:38PM CET, tgraf@suug.ch wrote:
>>>> If I understand this correctly then you propose to do the decision on
>>>> whether to implement a flow in software or offload it to hardware in the
>>>> xflows classifier and action. I had exactly the same architecture in mind
>>>> initially when I first approached this and wanted to offload OVS
>>>> datapath flows transparently to hardware.
>>>
>>> Think about xflows as an iface to multiple backends, some sw and some hw.
>>> User will be able to specify which backed he wants to use for particular
>>> "commands".
>>>
>>> So for example, ovs kernel datapath module will implement an xflows
>>> backend and register it as "ovsdp". Rocker will implement another xflows
>>> backend and register it as "rockerdp". Then, ovs userspace will use xflows
>>> api to setup both backends independently, but using the same xflows api.
>>>
>>> It is still up to userspace to decide what should be put where (what
>>> backend to use).
>>
>> OK, sounds good so far. Although we can't completely ditch the existing
>> genl based OVS flow API for obvious backwards compatibility reasons ;-)
>
> Sure.

Replied to the other thread before seeing this, but some comments.

>
>>
>> How does John's API fit into this? How would you expose capabilities
>> through xflows? How would it differ from what John proposes?
>
> This certainly need more thinking. The capabilities could be exposed
> either by separate a genl api (like in this version) or directly via TC
> netlink iface (RTM_GETTFILTERCAP, RTM_GETACTIONCAP). The insides of the
> message can stay the same. I like the second way better.
>

For what its worth I started this route when I did the flow API before
ditching it and going to its own netlink family.

> flow manipulation would happen as standard TC filters/actions manipulation.
> Here, the Netlink messages could be also very similar to what John has now.
>

In fact I think they are almost the same ;) I don't mind doing the
embedding as long as there is some sort of plan for how to attach
filters to hardware. This is where I got stuck. I think you need
a new attach point in the hardware. See my other reply.

>
>>
>> Since this would be a regular tc classifier I assume it could be
>> attached to any tc class and interface and then combined with other
>> classifiers which OVS would not be aware of. How do you intend to
>> resolve such conflicts?
>>
>> Example:
>> eth0:
>>    ingress qdisc:
>>      cls prio 20 u32 match [...]
>>      cls prio 10 xflows [...]
>>
>> If xflows offloads to hardware, the u32 classifier with higher
>> priority is hidden unintentionally.
>
>
> Right. We have to either introduce some limitations for xflows to
> disallow this or let the user to take care of this. But it's similar
> problem as if you use tc with John's API or ovs with John's API.
>

But with the current API its clear that the rules managed by the
Flow API are in front of 'tc' and 'ovs' on ingress. Just the same
as it is clear 'tc' ingress rules are walked before 'ovs' ingress
rules. On egress it is similarly clear that 'ovs' does a forward
rule to a netdev, then 'tc' fiters+qdisc is run, and finally the
hardware flow api is hit.

I also think it is clear that when a packet never enters the software
dataplane _only_ the hardware dataplane rules are used namely the
entries in the Flow API.

The cases I've been experimenting with using Flow API it is clear
on the priority and what rules are being used by looking at counters
and "knowing" the above pipeline mode.

Although as I type this I think a picture would help and some
documentation.

.John


-- 
John Fastabend         Intel Corporation

  reply	other threads:[~2015-01-23 15:44 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 20:26 [net-next PATCH v3 00/12] Flow API John Fastabend
2015-01-20 20:26 ` [net-next PATCH v3 01/12] net: flow_table: create interface for hw match/action tables John Fastabend
2015-01-22  4:37   ` Simon Horman
2015-01-20 20:27 ` [net-next PATCH v3 02/12] net: flow_table: add rule, delete rule John Fastabend
2015-01-20 20:27 ` [net-next PATCH v3 03/12] net: flow: implement flow cache for get routines John Fastabend
2015-01-20 20:27 ` [net-next PATCH v3 04/12] net: flow_table: create a set of common headers and actions John Fastabend
2015-01-20 20:59   ` John W. Linville
2015-01-20 22:10     ` John Fastabend
2015-01-20 20:28 ` [net-next PATCH v3 05/12] net: flow_table: add validation functions for rules John Fastabend
2015-01-20 20:28 ` [net-next PATCH v3 06/12] net: rocker: add pipeline model for rocker switch John Fastabend
2015-01-20 20:29 ` [net-next PATCH v3 07/12] net: rocker: add set rule ops John Fastabend
2015-01-20 20:29 ` [net-next PATCH v3 08/12] net: rocker: add group_id slices and drop explicit goto John Fastabend
2015-01-20 20:30 ` [net-next PATCH v3 09/12] net: rocker: add multicast path to bridging John Fastabend
2015-01-20 20:30 ` [net-next PATCH v3 10/12] net: rocker: add cookie to group acls and use flow_id to set cookie John Fastabend
2015-01-20 20:31 ` [net-next PATCH v3 11/12] net: rocker: have flow api calls set cookie value John Fastabend
2015-01-20 20:31 ` [net-next PATCH v3 12/12] net: rocker: implement delete flow routine John Fastabend
2015-01-22 12:52 ` [net-next PATCH v3 00/12] Flow API Pablo Neira Ayuso
2015-01-22 13:37   ` Thomas Graf
2015-01-22 14:00     ` Pablo Neira Ayuso
2015-01-22 15:00       ` Jamal Hadi Salim
2015-01-22 15:13         ` Thomas Graf
2015-01-22 15:28           ` Jamal Hadi Salim
2015-01-22 15:37             ` Thomas Graf
2015-01-22 15:44               ` Jamal Hadi Salim
2015-01-23 10:10                 ` Thomas Graf
2015-01-23 10:24                   ` Jiri Pirko
2015-01-23 11:08                     ` Thomas Graf
2015-01-23 11:39                       ` Jiri Pirko
2015-01-23 12:28                         ` Thomas Graf
2015-01-23 13:43                           ` Jiri Pirko
2015-01-23 14:07                             ` Thomas Graf
2015-01-23 15:25                               ` Jiri Pirko
2015-01-23 15:43                                 ` John Fastabend [this message]
2015-01-23 15:56                                   ` Jiri Pirko
2015-01-23 15:49                                 ` Thomas Graf
2015-01-23 16:00                                   ` Jiri Pirko
2015-01-23 15:34                               ` John Fastabend
2015-01-23 15:53                                 ` Jiri Pirko
2015-01-23 16:00                                   ` Thomas Graf
2015-01-23 16:08                                     ` John Fastabend
2015-01-23 16:16                                     ` Jiri Pirko
2015-01-24 13:04                                       ` Jamal Hadi Salim
2015-01-23 17:46                                 ` Thomas Graf
2015-01-23 19:59                                   ` John Fastabend
2015-01-23 23:16                                     ` Thomas Graf
2015-01-24 13:22                                   ` Jamal Hadi Salim
2015-01-24 13:34                                     ` Thomas Graf
2015-01-24 13:01                                 ` Jamal Hadi Salim
2015-01-26  8:26                                   ` Simon Horman
2015-01-26 12:26                                     ` Jamal Hadi Salim
2015-01-27  4:28                                       ` David Ahern
2015-01-27  4:58                                         ` Andy Gospodarek
2015-01-27 15:54                                           ` Jamal Hadi Salim
2015-01-24 12:36                         ` Jamal Hadi Salim
2015-01-22 15:48               ` Jiri Pirko
2015-01-22 17:58                 ` Thomas Graf
2015-01-22 16:49               ` Pablo Neira Ayuso
2015-01-22 17:10                 ` John Fastabend
2015-01-22 17:44                 ` Thomas Graf
2015-01-24 12:34                   ` Jamal Hadi Salim
2015-01-24 13:48                     ` Thomas Graf
2015-01-23  9:00                 ` David Miller
2015-01-22 16:58           ` John Fastabend
2015-01-23 10:49             ` Thomas Graf
2015-01-23 16:42               ` John Fastabend
2015-01-24 12:29             ` Jamal Hadi Salim

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=54C26C34.2000309@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=gerlitz.or@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=sfeldma@gmail.com \
    --cc=simon.horman@netronome.com \
    --cc=tgraf@suug.ch \
    /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).