Re: [ovs-dev] [PATCH ovs V3 00/25] Introducing HW offload support for openvswitch

2017-03-12 Thread Roi Dayan



On 10/03/2017 10:46, Simon Horman wrote:

On Wed, Feb 08, 2017 at 05:29:13PM +0200, Roi Dayan wrote:

This patch series introduces rule offload functionality to dpif-netlink
via netdev ports new flow offloading API. The user can specify whether to
enable rule offloading or not via OVS configuration. Netdev providers
are able to implement netdev flow offload API in order to offload rules.

This patch series also implements one offload scheme for netdev-linux,
using TC flower classifier, which was chosen because its sort of natural
to state OVS DP rules for this classifier. However, the code can be
extended to support other classifiers such as U32, eBPF, etc which support
offload as well.

The use-case we are currently addressing is the newly sriov switchdev mode
in the Linux kernel which was introduced in version 4.8 [1][2].
This series was tested against sriov vfs vports representors of the
Mellanox 100G ConnectX-4 series exposed by the mlx5 kernel driver.


Hi Roi,

its been a little while since v3 was posted.
I'd like to encourage you to post v4 and with a view to moving
towards getting this feature accepted.




Hi Simon,

yes it's been a while because we encountered some issues we wanted to 
address those beside what was found in the review.
We still didn't fix a compilation issue we have with travis and we 
wanted to address that at least for V4.
All fixes we do are on top of what we submit in V3 and before submit we 
do the squashing. we'll do that today/tomorrow and also address the 
compilation issue and we'll submit V4.


Thanks,
Roi

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovs V3 00/25] Introducing HW offload support for openvswitch

2017-03-10 Thread Simon Horman
On Wed, Feb 08, 2017 at 05:29:13PM +0200, Roi Dayan wrote:
> This patch series introduces rule offload functionality to dpif-netlink 
> via netdev ports new flow offloading API. The user can specify whether to
> enable rule offloading or not via OVS configuration. Netdev providers
> are able to implement netdev flow offload API in order to offload rules.
> 
> This patch series also implements one offload scheme for netdev-linux,
> using TC flower classifier, which was chosen because its sort of natural
> to state OVS DP rules for this classifier. However, the code can be
> extended to support other classifiers such as U32, eBPF, etc which support
> offload as well.
> 
> The use-case we are currently addressing is the newly sriov switchdev mode
> in the Linux kernel which was introduced in version 4.8 [1][2].
> This series was tested against sriov vfs vports representors of the
> Mellanox 100G ConnectX-4 series exposed by the mlx5 kernel driver.

Hi Roi,

its been a little while since v3 was posted.
I'd like to encourage you to post v4 and with a view to moving
towards getting this feature accepted.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovs V3 00/25] Introducing HW offload support for openvswitch

2017-02-13 Thread Chandran, Sugesh
Hi Paul & Roi,
Thank you for the patch series, 
Please find my comments inline in the following mails.
I am trying to build it in OVS-DPDK and its failing on my board? JFYI I Rebased 
over commit e6932e5dd59fe2bd7d90ef365bdd95707cd369d0.


Regards
_Sugesh


> -Original Message-
> From: Roi Dayan [mailto:r...@mellanox.com]
> Sent: Wednesday, February 8, 2017 3:29 PM
> To: d...@openvswitch.org
> Cc: Paul Blakey ; Or Gerlitz
> ; Hadar Hen Zion ; Shahar
> Klein ; Mark Bloch ; Rony
> Efraim ; Fastabend, John R
> ; Joe Stringer ; Andy
> Gospodarek ; Lance Richardson
> ; Marcelo Ricardo Leitner ;
> Simon Horman ; Jiri Pirko
> ; Chandran, Sugesh ; Roi
> Dayan 
> Subject: [PATCH ovs V3 00/25] Introducing HW offload support for
> openvswitch
> 
> This patch series introduces rule offload functionality to dpif-netlink via
> netdev ports new flow offloading API. The user can specify whether to
> enable rule offloading or not via OVS configuration. Netdev providers are
> able to implement netdev flow offload API in order to offload rules.
> 
> This patch series also implements one offload scheme for netdev-linux, using
> TC flower classifier, which was chosen because its sort of natural to state 
> OVS
> DP rules for this classifier. However, the code can be extended to support
> other classifiers such as U32, eBPF, etc which support offload as well.
> 
> The use-case we are currently addressing is the newly sriov switchdev mode
> in the Linux kernel which was introduced in version 4.8 [1][2].
> This series was tested against sriov vfs vports representors of the Mellanox
> 100G ConnectX-4 series exposed by the mlx5 kernel driver.
> 
> 
> V2->V3:
> - Code styling fixes
> - Bug fixes
> - Using already available macros/functions to match current OVS code
> - Refactored code according to V2 review
> - Replaced bool option skip-hw for string option tc-policy
> - Added hw offload tests using policy skip_hw
> - Fixed most compatability compiling issues
> - Travis
> https://travis-ci.org/roidayan/ovs/builds/199610124
> - AppVeyor
> https://ci.appveyor.com/project/roidayan/ovs/build/1.0.14
> - Fixed compiling with DPDK enabled
> 
> TODO:
> - need to fix datapath compiling issues found in travis after adding tc
>   compatability headers
> - need to fix failing test cases because of get_ifindex
> 
> 
> V1->V2:
> - Added generic netdev flow offloads API.
> - Implemented relevant flow API in netdev-linux (and netdev-vport).
> - Added a other_config hw-offload option to enable offloading (defaults to
> false).
> - Fixed coding style to conform with OVS.
> - Policy removed for now. (Will be discussed how best implemented later).
> 
> 
> Thanks,
> Paul & Roi
> 
> 
> Paul Blakey (25):
>   tc: Add tc flower interface
>   netdev-linux: Move some tc related functions to tc.c
>   netdev: Adding a new netdev api to be used for offloading flows
>   other-config: Add hw-offload switch to control netdev flow offloading
>   other-config: Add tc-policy switch to control tc flower flag
>   dpif: Save added ports in a port map for netdev flow api use
>   dpif-netlink: Flush added ports using netdev flow api
>   netdev-tc-offloads: Implement netdev flow flush using tc interface
>   dpif-netlink: Dump netdevs flows on flow dump
>   netdev-tc-offloads: Add ufid to tc/netdev map
>   netdev-tc-offloads: Implement netdev flow dump api using tc interface
>   dpif-netlink: Use netdev flow put api to insert a flow
>   netdev-tc-offloads: Add flower mask to priority map
>   netdev-tc-offloads: Implement netdev flow put using tc interface
>   dpif-netlink: Delete a flow from netdev
>   netdev-tc-offloads: Implement netdev flow del using tc interface
>   dpif-netlink: Use netdev flow get api to query a flow
>   netdev-tc-offloads: Implement flow get using tc interface
>   netdev-linux: Disallow setting policing when configured with hw
> offload
>   netdev-vport: Implement netdev vport get_ifindex on Linux
>   netdev-vport: Use common offloads interface
>   netdev-tc-offloads: Add ingress on netdev flow api init
>   dpctl: Add an option to dump only certain kinds of flows
>   tests: Add system-offloads-testsuite
>   compat: Add tc compatibility headers for old kernels
> 
>  acinclude.m4 |   26 +
>  configure.ac |1 +
>  include/automake.mk  |1 +
>  include/linux/automake.mk|4 +
>  include/linux/pkt_cls.h  |  579 ++
>  include/linux/tc_act/tc_tunnel_key.h |   48 ++
>  include/linux/tc_act/tc_vlan.h   |   44 

Re: [ovs-dev] [PATCH ovs V3 00/25] Introducing HW offload support for openvswitch

2017-02-12 Thread Roi Dayan



On 08/02/2017 17:29, Roi Dayan wrote:

This patch series introduces rule offload functionality to dpif-netlink
via netdev ports new flow offloading API. The user can specify whether to
enable rule offloading or not via OVS configuration. Netdev providers
are able to implement netdev flow offload API in order to offload rules.

This patch series also implements one offload scheme for netdev-linux,
using TC flower classifier, which was chosen because its sort of natural
to state OVS DP rules for this classifier. However, the code can be
extended to support other classifiers such as U32, eBPF, etc which support
offload as well.

The use-case we are currently addressing is the newly sriov switchdev mode
in the Linux kernel which was introduced in version 4.8 [1][2].
This series was tested against sriov vfs vports representors of the
Mellanox 100G ConnectX-4 series exposed by the mlx5 kernel driver.


V2->V3:
- Code styling fixes
- Bug fixes
- Using already available macros/functions to match current OVS code
- Refactored code according to V2 review
- Replaced bool option skip-hw for string option tc-policy
- Added hw offload tests using policy skip_hw
- Fixed most compatability compiling issues
- Travis
https://travis-ci.org/roidayan/ovs/builds/199610124
- AppVeyor
https://ci.appveyor.com/project/roidayan/ovs/build/1.0.14
- Fixed compiling with DPDK enabled

TODO:
- need to fix datapath compiling issues found in travis after adding tc
  compatability headers
- need to fix failing test cases because of get_ifindex


V1->V2:
- Added generic netdev flow offloads API.
- Implemented relevant flow API in netdev-linux (and netdev-vport).
- Added a other_config hw-offload option to enable offloading (defaults to 
false).
- Fixed coding style to conform with OVS.
- Policy removed for now. (Will be discussed how best implemented later).


Thanks,
Paul & Roi





Hi,

We found memory leaks where we didn't release the reply allocated from 
tc_transact calls. We have this fixed for V4.


Thanks,
Roi

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev