netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Scott Feldman <sfeldma@cumulusnetworks.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	netdev@vger.kernel.org, davem@davemloft.net,
	nhorman@tuxdriver.com, andy@greyhouse.net, dborkman@redhat.com,
	ogerlitz@mellanox.com, jesse@nicira.com, pshelar@nicira.com,
	azhou@nicira.com, ben@decadent.org.uk,
	stephen@networkplumber.org, jeffrey.t.kirsher@intel.com,
	vyasevic@redhat.com, xiyou.wangcong@gmail.com,
	john.r.fastabend@intel.com, edumazet@google.com,
	f.fainelli@gmail.com, roopa@cumulusnetworks.com,
	linville@tuxdriver.com, dev@openvswitch.org, jasowang@redhat.com,
	ebiederm@xmission.com, nicolas.dichtel@6wind.com,
	ryazanov.s.a@gmail.com, buytenh@wantstofly.org,
	aviadr@mellanox.com, nbd@openwrt.org,
	alexei.starovoitov@gmail.com, Neil.Jerram@metaswitch.com,
	ronye@mellanox.com
Subject: Re: [patch net-next RFC 10/12] openvswitch: add support for datapath hardware offload
Date: Mon, 25 Aug 2014 15:54:49 +0100	[thread overview]
Message-ID: <20140825145449.GB30140@casper.infradead.org> (raw)
In-Reply-To: <53FA01AC.10507@mojatatu.com>

On 08/24/14 at 11:15am, Jamal Hadi Salim wrote:
> The focus of the patches is on offloading flows (uses the
> ovs or shall i say the broadcom OF-DPA API, which is one
> vendor's view of the world).

Let's keep vendors out of this discussion. I have no affiliation
with this vendor. In fact I'm personally more interested in the
host use case with the biggest concerns/focus on integration with
existing APIs.

> >It proposes *a* interface which in this case is flow based with mask
> >support to accomodate the typical ntuple filter API in HW. OVS happens
> >to be one of the easiest to use examples as a consumer because it
> >already provides a flat flow representation.
> >
> 
> In other words, there is a direct 1-1 map between this approach and OVS.
> That is a contentious point.

That is simply not the case. The fact that John is using this model
to replace the flow director ioctl API should prove this.

> Not at all.
> I gave an example earlier with u32, but lets pick the other extreme
> of well understood functions, say L3 (I could pick L2 as well).
> This openflow api tries to describe different header

There is not a single bit specific to OpenFlow and there is absolutely
no awareness of OF within the kernel in OVS.

> fields in the packet. That is not the challenge for such an
> API. The challenge is dealing with the quarks.
> Some chips implement FIB and NH conjoined; others implement
> them separately.
> I dont see how this is even being remotely touched on.

First of all, that sounds like exactly like something that should
be handled in the driver specific portion of the API. Secondly,
can you provide additional information on these specific pieces of
hardware so we take it into account?

> You are asking me to go and add a new ndo() every time i have a new network
> function? That is not scalable. I have no problem with
> the approach that was posted - I have a problem that it is it
> focused on flows (and is lacking ability to specify different
> classifiers). It should not be called xxx_flow_xxx

Realistically there will only be a handful, maybe something
like:

flow_insert / flow_remove
p4_add / p4_remove
[...]

Maybe you can share some information the specific API you have
in mind?

> If you looked at all my presentations I have never laid such
> claim but i have always said I want everything described in
> iproute2 to work. I dont think anyone disagreed.
> I dont expect tc to be used as *the interface*; but on the same
> token i dont expect OVS to be used as *the interface*.

Agreed, I don't think anybody expects anything else.

> Lets start with hardware abstraction. Lets map to existing Linux APIs
> and then see where some massaging maybe needed.

That's what's being done. HW offload is being mapped to OVS and
to an existing ioctl interface. Those are existing Linux APIs.
Can you explain why swdev as proposed is not suitable for the
other existing Linux APIs? They don't *have* to use the flow_insert(),
they are free to exted the API to represent more generic programmable
hardware.

> This abstraction gives OVS 1-1 mapping which is something i object to.
> You want to penalize me for the sake of getting the OVS api in place?

I don't understand this.

> Beginning with flows and laying claim to that one would be able to
> cover everything is non-starter.

Nobody claims that. In fact, I'm very interested in seeing the API
extended for non flow based models. I'm actually convinced that flow
based models are not the ultimate answers on HW level but a vast majority
of hardware understands some form of protocol aware exact match or
wildcard filters of limited capacity. This category of hardware is
being addressed with the flow_insert() API.

> I will simplify:
> You cant possibly do the u32 classifier completely using the posted
> hard-coded 15 tuple classifier. It is an NP-complete problem.
> There are *a lot* of use cases which can be specified by u32 that are
> not possible to specify with the tuples the patches posted propose.
> The reverse is not true. You can fully specify the OVS classifier
> with u32.
> So if you want to specify the closest to a universal grammar for
> specifying a classifier - use u32 and create templates for your
> classifier.

Completely agreed, this is why we have cls/act and nftables.

> There are some cases where that approach doesnt make sense:
> example if i wanted to specify a string classifier etc.
> But if we are talking packet header classifier - it is flexible.
> There are also good reasons to specify a universal 5 tuple classifier.
> As there are good reasons to specify your latest OF classifier.
> But that OF classifier being the starting point is not pragmatic.

So you agree that at least on the driver level some form of ntuple
awareness must be given because the hardware has limited capabilities.
This is exactly what flow_insert() is, it is a generic ntuple
classifier which can implement a subset of the 15 tuple in HW. So
instead of adding a separate NDO for each fixed tuple, a generic
NDO can handle the different levels of offloads. Very similar to how
the xmit to the NIC can handle various protocol offloads already.

What is being proposed is a generic ntuple with masking support to
describe filtering needs. What is missing is a capabilities reporting
channel so API users can know in advance what is supported to
implement partial offloads.

  parent reply	other threads:[~2014-08-25 14:54 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21 16:18 [patch net-next RFC 00/12] introduce rocker switch driver with openvswitch hardware accelerated datapath Jiri Pirko
     [not found] ` <1408637945-10390-1-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2014-08-21 16:18   ` [patch net-next RFC 01/12] openvswitch: split flow structures into ovs specific and generic ones Jiri Pirko
2014-08-21 16:18   ` [patch net-next RFC 03/12] net: introduce generic switch devices support Jiri Pirko
2014-08-21 16:41     ` Ben Hutchings
2014-08-21 17:03       ` Jiri Pirko
     [not found]       ` <1408639283.13073.3.camel-nDn/Rdv9kqW9Jme8/bJn5UCKIB8iOfG2tUK59QYPAWc@public.gmane.org>
2014-08-27  2:45         ` Tom Herbert
     [not found]     ` <1408637945-10390-4-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2014-08-21 17:05       ` Florian Fainelli
     [not found]         ` <CAGVrzcYtnpcP4pfCJ0GSya01LTk0WwbSV1f+voF2K=S5CR3Arg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-22 12:42           ` Jamal Hadi Salim
2014-08-22 12:56             ` Jiri Pirko
2014-08-22 19:14               ` John Fastabend
     [not found]                 ` <53F7969C.1060509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-22 23:12                   ` Scott Feldman
     [not found]               ` <20140822125655.GB1916-6KJVSR23iU488b5SBfVpbw@public.gmane.org>
2014-08-23  1:02                 ` Florian Fainelli
     [not found]                   ` <CAGVrzcZS=Y2stxSNMfVjWTpPT8GoDOpOD9tExnDnoF0jj_owoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-23  9:17                     ` Jiri Pirko
2014-08-24 11:46     ` Thomas Graf
     [not found]       ` <20140824114605.GC32741-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2014-08-26  8:34         ` Jiri Pirko
2014-08-27 22:19     ` Cong Wang
2014-08-21 16:18   ` [patch net-next RFC 06/12] net: introduce dummy switch Jiri Pirko
     [not found]     ` <1408637945-10390-7-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2014-08-26 19:14       ` Andy Gospodarek
     [not found]         ` <20140826191420.GC5275-Me9pkO/C/lgvPfuUPAiksl6hYfS7NtTn@public.gmane.org>
2014-08-29  7:00           ` Jiri Pirko
2014-08-21 16:18 ` [patch net-next RFC 02/12] net: rename netdev_phys_port_id to more generic name Jiri Pirko
     [not found]   ` <1408637945-10390-3-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2014-08-26 12:23     ` Or Gerlitz
     [not found]       ` <53FC7C3C.3090901-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-08-26 14:10         ` Jiri Pirko
2014-08-26 17:14         ` Stephen Hemminger
2014-08-21 16:18 ` [patch net-next RFC 04/12] rtnl: expose physical switch id for particular device Jiri Pirko
     [not found]   ` <1408637945-10390-5-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2014-08-22 19:08     ` John Fastabend
     [not found]       ` <53F79537.20207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-26  8:32         ` Jiri Pirko
2014-08-21 16:18 ` [patch net-next RFC 05/12] net-sysfs: " Jiri Pirko
2014-08-21 16:19 ` [patch net-next RFC 07/12] dsa: implement ndo_swdev_get_id Jiri Pirko
2014-08-21 16:38   ` Ben Hutchings
2014-08-21 16:56   ` Florian Fainelli
     [not found]     ` <CAGVrzcbs1yGb5RW++XZ=2PFsqUjZGVGfWx5=QQYcEX6x4WOq9Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-21 17:06       ` Jiri Pirko
     [not found]         ` <20140821170645.GB10633-6KJVSR23iU5sFDB2n11ItA@public.gmane.org>
2014-08-21 17:12           ` Florian Fainelli
     [not found]             ` <CAGVrzcb=vkqPw2LUc4YO4Bs-eady2=1uN-jkG=kW2RnGx=24PQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-22  9:05               ` David Laight
2014-08-23 11:33           ` Eric W. Biederman
2014-08-21 16:19 ` [patch net-next RFC 08/12] net: introduce netdev_phys_item_ids_match helper Jiri Pirko
2014-08-21 16:19 ` [patch net-next RFC 09/12] openvswitch: introduce vport_op get_netdev Jiri Pirko
2014-08-21 16:19 ` [patch net-next RFC 10/12] openvswitch: add support for datapath hardware offload Jiri Pirko
     [not found]   ` <1408637945-10390-11-git-send-email-jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
2014-08-22 19:39     ` John Fastabend
     [not found]       ` <53F79C54.5050701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-22 22:53         ` Scott Feldman
     [not found]           ` <464DB0A8-0073-4CE0-9483-0F36B73A53A1-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-08-23  9:24             ` Jiri Pirko
2014-08-23 14:51               ` Thomas Graf
     [not found]                 ` <20140823145126.GB24116-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2014-08-23 17:09                   ` John Fastabend
     [not found]                     ` <53F8CAB9.8080407-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-24 11:32                       ` Thomas Graf
2014-08-24  1:53             ` Jamal Hadi Salim
2014-08-24 11:12               ` Thomas Graf
     [not found]                 ` <20140824111218.GA32741-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2014-08-24 15:15                   ` Jamal Hadi Salim
     [not found]                     ` <53FA01AC.10507-jkUAjuhPggJWk0Htik3J/w@public.gmane.org>
2014-08-25  2:24                       ` Scott Feldman
     [not found]                         ` <A67C7591-19BF-4431-9119-F61361F5E618-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-08-25  2:42                           ` John Fastabend
     [not found]                             ` <53FAA2A2.7070801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 13:53                               ` Jamal Hadi Salim
2014-08-25 14:17                                 ` Thomas Graf
     [not found]                                   ` <20140825141754.GA30140-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2014-08-25 16:15                                     ` Jamal Hadi Salim
     [not found]                                       ` <53FB6122.2040901-jkUAjuhPggJWk0Htik3J/w@public.gmane.org>
2014-08-25 22:50                                         ` Thomas Graf
     [not found]                                           ` <20140825225057.GD30140-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2014-08-26 13:50                                             ` Roopa Prabhu
2014-08-26 14:06                                               ` Jiri Pirko
2014-08-26 14:58                                                 ` Jamal Hadi Salim
2014-08-26 15:22                                                   ` Jiri Pirko
     [not found]                                                     ` <20140826152217.GA1843-6KJVSR23iU5sFDB2n11ItA@public.gmane.org>
2014-08-26 15:29                                                       ` Jamal Hadi Salim
2014-08-26 15:44                                                         ` Jiri Pirko
     [not found]                                                           ` <20140826154459.GB1843-6KJVSR23iU5sFDB2n11ItA@public.gmane.org>
2014-08-26 15:54                                                             ` Andy Gospodarek
     [not found]                                                               ` <20140826155426.GA5275-Me9pkO/C/lgvPfuUPAiksl6hYfS7NtTn@public.gmane.org>
2014-08-26 16:19                                                                 ` Thomas Graf
     [not found]                                                                   ` <20140826161956.GA15316-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2014-08-26 18:41                                                                     ` Andy Gospodarek
2014-08-26 20:13                                                                     ` Alexei Starovoitov
2014-08-26 20:54                                                                       ` Thomas Graf
2014-08-29 14:20                                                                         ` Jamal Hadi Salim
     [not found]                                                                           ` <54008C47.5040503-jkUAjuhPggJWk0Htik3J/w@public.gmane.org>
2014-09-01  8:13                                                                             ` Simon Horman
     [not found]                                                                               ` <20140901081343.GC12731-IxS8c3vjKQDk1uMJSBkQmQ@public.gmane.org>
2014-09-01 16:37                                                                                 ` Jamal Hadi Salim
2014-09-01 20:28                                                                                   ` Jiri Pirko
2014-09-02  1:08                                                                                     ` Jamal Hadi Salim
2014-08-26 15:01                                               ` Scott Feldman
     [not found]                                                 ` <D891A8EC-548C-453E-AC70-8431DAC4B8C4-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-08-26 15:12                                                   ` Jamal Hadi Salim
2014-08-26 14:26                                           ` Jamal Hadi Salim
2014-08-25 13:42                           ` Jamal Hadi Salim
2014-08-25 14:54                     ` Thomas Graf [this message]
     [not found]                       ` <20140825145449.GB30140-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2014-08-25 16:48                         ` Jamal Hadi Salim
2014-08-25 22:11                           ` Thomas Graf
2014-08-26 14:00                             ` Jamal Hadi Salim
2014-08-26 14:20                               ` Thomas Graf
     [not found]   ` <20140904090447.GB3176@vergenet.net>
     [not found]     ` <20140904090447.GB3176-IxS8c3vjKQDk1uMJSBkQmQ@public.gmane.org>
2014-09-04 16:30       ` Scott Feldman
     [not found]         ` <F4498A89-C1D6-4C5A-A6F0-942015D36B77-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-09-05  4:08           ` Simon Horman
     [not found]             ` <20140905040810.GB32481-IxS8c3vjKQDk1uMJSBkQmQ@public.gmane.org>
2014-09-05  7:02               ` Scott Feldman
     [not found]                 ` <E3C7797F-081E-484F-918E-937C705B43D6-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2014-09-05 10:46                   ` Jamal Hadi Salim
2014-09-08  0:02                   ` Simon Horman
2014-08-21 16:19 ` [patch net-next RFC 11/12] sw_flow: add misc section to key with in_port_ifindex field Jiri Pirko
2014-08-21 16:19 ` [patch net-next RFC 12/12] rocker: introduce rocker switch driver Jiri Pirko
2014-08-21 17:19   ` Florian Fainelli
2014-08-23 14:04   ` Thomas Graf
2014-08-29  7:06     ` Jiri Pirko

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=20140825145449.GB30140@casper.infradead.org \
    --to=tgraf@suug.ch \
    --cc=Neil.Jerram@metaswitch.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=aviadr@mellanox.com \
    --cc=azhou@nicira.com \
    --cc=ben@decadent.org.uk \
    --cc=buytenh@wantstofly.org \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=dev@openvswitch.org \
    --cc=ebiederm@xmission.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse@nicira.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=john.r.fastabend@intel.com \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=nicolas.dichtel@6wind.com \
    --cc=ogerlitz@mellanox.com \
    --cc=pshelar@nicira.com \
    --cc=ronye@mellanox.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=sfeldma@cumulusnetworks.com \
    --cc=stephen@networkplumber.org \
    --cc=vyasevic@redhat.com \
    --cc=xiyou.wangcong@gmail.com \
    /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).