Re: [ovs-dev] ovs-dpdk zero-copy rx/tx support between physical nic and vhost user

2019-11-26 Thread William Tu
On Tue, Nov 26, 2019 at 12:46 AM Loftus, Ciara wrote: > > > > > Hi Ciara and Ian, > > > > I'm checking the zero-copy support on both rx/tx side when > > using ovs-dpdk with vhostuser and dpdkport. > > Assuming PVP, IIUC[1,2], the rx (P to V) does not have zero-copy and > > the V to P has zero copy

[ovs-dev] ovs-dpdk zero-copy rx/tx support between physical nic and vhost user

2019-11-23 Thread William Tu
Hi Ciara and Ian, I'm checking the zero-copy support on both rx/tx side when using ovs-dpdk with vhostuser and dpdkport. Assuming PVP, IIUC[1,2], the rx (P to V) does not have zero-copy and the V to P has zero copy support by enabling dq-zero-copy. Am I understanding this correctly? Thank you! W

[ovs-dev] [PATCHv5] netdev-afxdp: Enable loading XDP program.

2019-11-22 Thread William Tu
be processed in kernel. The patch enables loading the user-provided XDP program by $ovs-vsctl -- set int afxdp-p0 options:xdp-obj= So users can implement their filtering logic or traffic steering idea in their XDP program, and rest of the traffic passes to AF_XDP socket handled by OVS. Signed-off

[ovs-dev] iperf tcp issue on veth using afxdp

2019-11-22 Thread William Tu
Hi Ilya and Eelco, Yiyang reports very poor TCP performance on his setup and I can also reproduce it on my machine. Somehow I think this might be a kernel issue, but I don't know where to debug this. Need your suggestion about how to debug. So the setup is like the system-traffic, creating 2 name

[ovs-dev] [PATCH] ofproto-dpif: Refactor the get capability code.

2019-11-21 Thread William Tu
Make the code simpler by removing the use of xasprintf and free, and use smap_add_format. Cc: Ben Pfaff Signed-off-by: William Tu --- ofproto/ofproto-dpif.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c

Re: [ovs-dev] [PATCHv4] ofproto-dpif: Expose datapath capability to ovsdb.

2019-11-21 Thread William Tu
On Wed, Nov 20, 2019 at 05:20:35PM -0800, William Tu wrote: > On Wed, Nov 20, 2019 at 11:25:12AM -0800, Ben Pfaff wrote: > > On Wed, Nov 06, 2019 at 12:35:49PM -0800, William Tu wrote: > > > On Tue, Nov 05, 2019 at 04:49:10PM -0800, Ben Pfaff wrote: > > > > On Tue, No

Re: [ovs-dev] [PATCH] netdev-afxdp: Enable libbpf logging to OVS.

2019-11-21 Thread William Tu
On Thu, Nov 21, 2019 at 11:37:48AM +0100, Eelco Chaudron wrote: > > On 20 Nov 2019, at 21:25, William Tu wrote: > > > libbpf has pr_warn, pr_info, and pr_debug. The patch registers > > these print functions, integrating the libbpf logs to OVS log. > > > > Sign

Re: [ovs-dev] [PATCHv4] ofproto-dpif: Expose datapath capability to ovsdb.

2019-11-21 Thread William Tu
On Wed, Nov 20, 2019 at 06:00:44PM -0800, Ben Pfaff wrote: > On Wed, Nov 20, 2019 at 05:20:35PM -0800, William Tu wrote: > > I think the above is not related. I will remove the manpages.mk diff. > > Rest below looks good to me. > > Yes, thanks! I fixed a couple minor issue

Re: [ovs-dev] [PATCHv4] ofproto-dpif: Expose datapath capability to ovsdb.

2019-11-20 Thread William Tu
On Wed, Nov 20, 2019 at 11:25:12AM -0800, Ben Pfaff wrote: > On Wed, Nov 06, 2019 at 12:35:49PM -0800, William Tu wrote: > > On Tue, Nov 05, 2019 at 04:49:10PM -0800, Ben Pfaff wrote: > > > On Tue, Nov 05, 2019 at 02:57:46PM -0800, William Tu wrote: > > > &

[ovs-dev] [PATCH] netdev-afxdp: Enable libbpf logging to OVS.

2019-11-20 Thread William Tu
libbpf has pr_warn, pr_info, and pr_debug. The patch registers these print functions, integrating the libbpf logs to OVS log. Signed-off-by: William Tu --- lib/netdev-afxdp.c | 20 lib/netdev-afxdp.h | 1 + lib/netdev-linux.c | 1 + 3 files changed, 22 insertions(+) diff

Re: [ovs-dev] [PATCHv4] netdev-afxdp: Enable loading XDP program.

2019-11-20 Thread William Tu
On Tue, Nov 19, 2019 at 10:51:01AM -0800, William Tu wrote: > Hi Eelco, > > Thanks for your testing. > > On Tue, Nov 12, 2019 at 11:25:55AM +0100, Eelco Chaudron wrote: > > See one remark below, however when I did a quick test with a program that > > would not load it

Re: [ovs-dev] [PATCHv6] netdev-linux: Detect numa node id.

2019-11-20 Thread William Tu
On Wed, Nov 20, 2019 at 05:09:10PM +0100, Eelco Chaudron wrote: > > > On 20 Nov 2019, at 17:06, Ilya Maximets wrote: > > >On 31.10.2019 20:21, William Tu wrote: > >>The patch detects the numa node id from the name of the netdev, > >>by reading the '/sys

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-20 Thread William Tu
On Wed, Nov 20, 2019 at 05:43:48PM +0100, Ilya Maximets wrote: > On 20.11.2019 8:35, Eelco Chaudron wrote: > > > > > > On 19 Nov 2019, at 17:52, Ilya Maximets wrote: > > > >> On 19.11.2019 17:16, Eelco Chaudron wrote: > >>> > >>> > >>> On 7 Nov 2019, at 12:36, Ilya Maximets wrote: > >>> > U

[ovs-dev] [PATCH RFC] tests: Add netdev-afxdp specific tests.

2019-11-19 Thread William Tu
netdev-afxdp supports different configuration modes, with different limitations. The patch adds configuration and end-to-end tests using veth/tap devices. Signed-off-by: William Tu --- This patch depends on [PATCHv2] netdev-afxdp: Best-effort configuration of XDP mode. --- tests/automake.mk

Re: [ovs-dev] [PATCH RFC] dpif-netdev: Add ovs-appctl dpif-netdev/subtable-show.

2019-11-19 Thread William Tu
On Fri, Nov 08, 2019 at 03:23:44PM +, Emma Finn wrote: > Add an ovs-appctl command to iterate through the dpcls > and for each subtable output the miniflow bits for any > existing table. > > $ ovs-appctl dpif-netdev/subatable-show > pmd thread numa_id 0 > dpcls port 2: > subtable: >

Re: [ovs-dev] [PATCHv6] netdev-linux: Detect numa node id.

2019-11-19 Thread William Tu
Hi, Any feedback on this patch? Thanks William On Thu, Oct 31, 2019 at 12:21:21PM -0700, William Tu wrote: > The patch detects the numa node id from the name of the netdev, > by reading the '/sys/class/net//device/numa_node'. > If not available, ex: virtual device, or any erro

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-19 Thread William Tu
On Tue, Nov 19, 2019 at 09:26:40PM +0100, Ilya Maximets wrote: > On 19.11.2019 21:09, William Tu wrote: > > On Tue, Nov 19, 2019 at 08:51:19PM +0100, Ilya Maximets wrote: > >> On 19.11.2019 20:45, William Tu wrote: > >>> On Tue, Nov 19, 2019 at 05:52:22PM +0100,

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-19 Thread William Tu
On Tue, Nov 19, 2019 at 12:09:02PM -0800, William Tu wrote: > On Tue, Nov 19, 2019 at 08:51:19PM +0100, Ilya Maximets wrote: > > On 19.11.2019 20:45, William Tu wrote: > > > On Tue, Nov 19, 2019 at 05:52:22PM +0100, Ilya Maximets wrote: > > >> On 19.11.20

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-19 Thread William Tu
On Tue, Nov 19, 2019 at 08:51:19PM +0100, Ilya Maximets wrote: > On 19.11.2019 20:45, William Tu wrote: > > On Tue, Nov 19, 2019 at 05:52:22PM +0100, Ilya Maximets wrote: > >> On 19.11.2019 17:16, Eelco Chaudron wrote: > >>> > >>> > >

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-19 Thread William Tu
On Tue, Nov 19, 2019 at 05:52:22PM +0100, Ilya Maximets wrote: > On 19.11.2019 17:16, Eelco Chaudron wrote: > > > > > > On 7 Nov 2019, at 12:36, Ilya Maximets wrote: > > > >> Until now there was only two options for XDP mode in OVS: SKB or DRV. > >> i.e. 'generic XDP' or 'native XDP with zero-co

Re: [ovs-dev] [PATCH v2] netdev-afxdp: add afxdp specific maximum MTU check

2019-11-19 Thread William Tu
On Tue, Nov 12, 2019 at 04:46:09AM -0500, Eelco Chaudron wrote: > Drivers natively supporting AF_XDP will check that a configured MTU size > will not exceed the allowed size for AF_XDP. However, when the skb > compatibility mode is used there is no check and any value is accepted. > This, for examp

Re: [ovs-dev] [PATCHv4] netdev-afxdp: Enable loading XDP program.

2019-11-19 Thread William Tu
Hi Eelco, Thanks for your testing. On Tue, Nov 12, 2019 at 11:25:55AM +0100, Eelco Chaudron wrote: > See one remark below, however when I did a quick test with a program that > would not load it goes into some re-try loop: > > 2019-11-12T10:13:21.658Z|01609|netdev_afxdp|INFO|eno1: Removing xdp p

Re: [ovs-dev] [PATCH v2] rhel: Fix ovs-kmod-manage.sh that may create invalid soft links

2019-11-18 Thread William Tu
On Mon, Nov 18, 2019 at 12:32:30PM -0800, William Tu wrote: > On Mon, Nov 18, 2019 at 12:19:26PM -0800, Yi-Hung Wei wrote: > > On Mon, Nov 18, 2019 at 12:06 PM Yifeng Sun wrote: > > > > > > Current code iterates every kernel under '/lib/modules' for a mat

Re: [ovs-dev] [PATCH v2] rhel: Fix ovs-kmod-manage.sh that may create invalid soft links

2019-11-18 Thread William Tu
On Mon, Nov 18, 2019 at 12:19:26PM -0800, Yi-Hung Wei wrote: > On Mon, Nov 18, 2019 at 12:06 PM Yifeng Sun wrote: > > > > Current code iterates every kernel under '/lib/modules' for a matched > > version. As a result, this script may create invalid soft links if the > > matched kernel doesn't have

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-12 Thread William Tu
On Thu, Nov 7, 2019 at 3:36 AM Ilya Maximets wrote: > > Until now there was only two options for XDP mode in OVS: SKB or DRV. > i.e. 'generic XDP' or 'native XDP with zero-copy enabled'. > > Devices like 'veth' interfaces in Linux supports native XDP, but > doesn't support zero-copy mode. This ca

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-11 Thread William Tu
On Thu, Nov 07, 2019 at 01:39:28PM +0100, Eelco Chaudron wrote: > > > On 7 Nov 2019, at 12:36, Ilya Maximets wrote: > > >Until now there was only two options for XDP mode in OVS: SKB or DRV. > >i.e. 'generic XDP' or 'native XDP with zero-copy enabled'. > > > >Devices like 'veth' interfaces in Li

Re: [ovs-dev] [PATCH v3] travis: support ppc64le builds

2019-11-08 Thread William Tu
l build time at an acceptable level only a single build > job is included in the matrix for ppc64le. > > A build report example can be found here [1] > [0] http://travis-ci.org/ > [1] https://travis-ci.org/djlwilder/ovs/builds/607851729 > > Signed-off-by: David W

Re: [ovs-dev] Extending ovs_action_attr to add a new action

2019-11-08 Thread William Tu
On Fri, Nov 08, 2019 at 05:12:55PM +0100, Matteo Croce wrote: > Hi, > > I need to add a field to enum ovs_action_attr, but I see that the > definition between the upstream header[1] and the one in compat[2] > differs. > Upstream enum stops at OVS_ACTION_ATTR_CHECK_PKT_LEN, with an extra > "hidden"

[ovs-dev] [PATCHv4] netdev-afxdp: Enable loading XDP program.

2019-11-08 Thread William Tu
Signed-off-by: William Tu --- v4: Feedbacks from Eelco. - First load the program, then configure xsk. Let API take care of xdp prog and map loading, don't set XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD. - When loading custom xdp, need to close(prog_fd) and close(map_fd) to r

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-08 Thread William Tu
w generic mode in OVS = generic SKB in kernel, native mode in OVS = native mode without zc... > > Since 'best-effort' is a default mode, users will not need to > explicitely set 'xdp-mode' in most cases. > > TCP related tests enabled back in system afxdp t

Re: [ovs-dev] [PATCH v2] netdev-afxdp: Best-effort configuration of XDP mode.

2019-11-08 Thread William Tu
On Thu, Nov 07, 2019 at 02:28:18PM +0100, Eelco Chaudron wrote: > > > On 7 Nov 2019, at 14:21, Ilya Maximets wrote: > > >On 07.11.2019 13:39, Eelco Chaudron wrote: > >> > >> > >>On 7 Nov 2019, at 12:36, Ilya Maximets wrote: > >> > >>>Until now there was only two options for XDP mode in OVS: SKB

Re: [ovs-dev] [PATCH] netdev-afxdp: add afxdp specific maximum MTU check

2019-11-07 Thread William Tu
On Thu, Nov 07, 2019 at 03:01:18PM +0100, Eelco Chaudron wrote: > Any feedback on this? > > > On 1 Oct 2019, at 11:55, Eelco Chaudron wrote: > > >Drivers natively supporting AF_XDP will check that a configured MTU size > >will not exceed the allowed size for AF_XDP. However, when the skb > >comp

Re: [ovs-dev] [PATCH] tests: Wait up to OVS_CTL_TIMEOUT seconds.

2019-11-06 Thread William Tu
On Wed, Nov 06, 2019 at 01:47:26PM -0500, Aaron Conole wrote: > Ilya Maximets writes: > > > While running tests under valgrind, it could take more than 10 seconds > > for process to disappear after successful 'ovs-appctl exit' command. > > > > Same applies to some other events that tests are wait

Re: [ovs-dev] [PATCHv3] netdev-afxdp: Enable loading XDP program.

2019-11-06 Thread William Tu
On Tue, Nov 05, 2019 at 05:06:10PM +0100, Eelco Chaudron wrote: > Hi William, > > See some comments inline. > > //Eelco > > Hi Eelco, Thanks for your feedback. > On 1 Nov 2019, at 21:14, William Tu wrote: > > >Now netdev-afxdp always forwards all packets to

Re: [ovs-dev] [PATCHv4] ofproto-dpif: Expose datapath capability to ovsdb.

2019-11-06 Thread William Tu
On Tue, Nov 05, 2019 at 04:49:10PM -0800, Ben Pfaff wrote: > On Tue, Nov 05, 2019 at 02:57:46PM -0800, William Tu wrote: > > +/* ODP_SUPPORT_FIELDS */ > > +str_value = xasprintf("%"PRIuSIZE, odp.max_vlan_headers); > > +smap_add(cap, "max_vlan

Re: [ovs-dev] [PATCH] vswitch.xml: Fix column for xdpmode.

2019-11-06 Thread William Tu
On Wed, Nov 6, 2019 at 10:20 AM Ilya Maximets wrote: > > On 06.11.2019 18:56, William Tu wrote: > > On Wed, Nov 06, 2019 at 01:50:58PM +0100, Ilya Maximets wrote: > >> On 05.11.2019 22:20, Ben Pfaff wrote: > >>> On Tue, Nov 05, 2019 at 09:54:08PM +0100, Ilya Ma

Re: [ovs-dev] [PATCH RFC] netdev-afxdp: Enable shared umem support.

2019-11-06 Thread William Tu
On Wed, Nov 06, 2019 at 08:49:53AM +0100, Eelco Chaudron wrote: > > > On 5 Nov 2019, at 23:16, William Tu wrote: > > >The RFC patch enables shared umem support. It requires kernel change and > >libbpf change, I will post it in another thread. I tested with multiple >

Re: [ovs-dev] [PATCH] vswitch.xml: Fix column for xdpmode.

2019-11-06 Thread William Tu
On Wed, Nov 06, 2019 at 01:50:58PM +0100, Ilya Maximets wrote: > On 05.11.2019 22:20, Ben Pfaff wrote: > >On Tue, Nov 05, 2019 at 09:54:08PM +0100, Ilya Maximets wrote: > >>'xdpmode' is part of 'options', not the 'other_config'. > >> > &

Re: [ovs-dev] [PATCH net-next] xsk: Enable shared umem support.

2019-11-06 Thread William Tu
On Wed, Nov 06, 2019 at 05:53:09PM +0100, Magnus Karlsson wrote: > On Wed, Nov 6, 2019 at 12:41 AM William Tu wrote: > > > > Currently the shared umem feature is not supported in libbpf. > > The patch removes the refcount check in libbpf to enable use of > > shared

[ovs-dev] [PATCH net-next] xsk: Enable shared umem support.

2019-11-05 Thread William Tu
-November/364392.html Signed-off-by: William Tu --- net/xdp/xsk.c | 5 - tools/lib/bpf/xsk.c | 10 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 6040bc2b0088..0f2b16e275e3 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c

Re: [ovs-dev] [PATCH] vswitch.xml: Fix column for xdpmode.

2019-11-05 Thread William Tu
On Tue, Nov 05, 2019 at 01:20:35PM -0800, Ben Pfaff wrote: > On Tue, Nov 05, 2019 at 09:54:08PM +0100, Ilya Maximets wrote: > > 'xdpmode' is part of 'options', not the 'other_config'. > > > > CC: William Tu > > Fixes: 0de1b425962d ("

[ovs-dev] [PATCHv4] ofproto-dpif: Expose datapath capability to ovsdb.

2019-11-05 Thread William Tu
e \ ct_orig_tuple=true ct_eventmask=true ct_state=true \ ct_clear=true max_vlan_headers=1 recirc=true ct_label=true \ max_hash_alg=1 ct_state_nat=true ct_timeout=true \ ct_mark=true ct_orig_tuple6=true check_pkt_len=true \ masked_set_action=true max_mpls_depth=3 trunc=true ct_zone=true Signe

[ovs-dev] [PATCH RFC] netdev-afxdp: Enable shared umem support.

2019-11-05 Thread William Tu
e shared umem for all skb-mode netdevs, and for the rest drv-mode netdevs, keep using dedicated umem. Or create one umem per mode? So the drv-mode netdevs also share one umem. Any comments are welcome. Suggested-by: Eelco Chaudron Signed-off-by: William Tu ---

Re: [ovs-dev] [PATCH net-next v6 05/10] net: openvswitch: optimize flow-mask looking up

2019-11-04 Thread William Tu
On Mon, Nov 4, 2019 at 2:10 PM Pravin Shelar wrote: > > On Mon, Nov 4, 2019 at 6:00 AM William Tu wrote: > > > > On Sat, Nov 2, 2019 at 11:50 PM Pravin Shelar wrote: > > > > > > On Fri, Nov 1, 2019 at 7:24 AM wrote: > > > > > > > >

Re: [ovs-dev] [PATCHv2] tests: Skip tests using tcp nc under check-afxdp.

2019-11-04 Thread William Tu
On Mon, Nov 4, 2019 at 9:05 AM Eelco Chaudron wrote: > > > > On 4 Nov 2019, at 17:58, Ilya Maximets wrote: > > > On 04.11.2019 17:17, William Tu wrote: > >> On Mon, Nov 4, 2019 at 2:56 AM Eelco Chaudron > >> wrote: > >>> > >>>

Re: [ovs-dev] [PATCHv2] tests: Skip tests using tcp nc under check-afxdp.

2019-11-04 Thread William Tu
On Mon, Nov 4, 2019 at 2:56 AM Eelco Chaudron wrote: > > William, > > I was wondering if you could add some more details to the documentation > why it’s not working/supported. > Currently, all that is in the documentation is this: > > “Due to limitations of current upstream kernel, TCP and various

Re: [ovs-dev] [PATCH net-next v6 05/10] net: openvswitch: optimize flow-mask looking up

2019-11-04 Thread William Tu
On Sat, Nov 2, 2019 at 11:50 PM Pravin Shelar wrote: > > On Fri, Nov 1, 2019 at 7:24 AM wrote: > > > > From: Tonghao Zhang > > > > The full looking up on flow table traverses all mask array. > > If mask-array is too large, the number of invalid flow-mask > > increase, performance will be drop. >

Re: [ovs-dev] [PATCH net-next v6 01/10] net: openvswitch: add flow-mask cache for performance

2019-11-01 Thread William Tu
gt; | affect packet processing performance. > > Link: > https://github.com/openvswitch/ovs/commit/5604935e4e1cbc16611d2d97f50b717aa31e8ec5 > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > Acked-by: William Tu > --- Do you co

[ovs-dev] [PATCHv2] tests: Skip tests using tcp nc under check-afxdp.

2019-11-01 Thread William Tu
AF_XDP veth does not support TCP with namespaces. This patch skips two cases that use it. 118: conntrack - floating IP 119: conntrack - negative test for recirculation optimization Signed-off-by: William Tu --- v2: - skip only 118 and 119. v1: - Tested-at: https://travis-ci.org/williamtu

Re: [ovs-dev] [PATCH] tests: Skip testcases using nc under check-afxdp.

2019-11-01 Thread William Tu
On Fri, Nov 1, 2019 at 3:10 PM Ilya Maximets wrote: > > > > On 01.11.2019 22:51, William Tu wrote: > > AF_XDP veth does not support TCP with namespaces. This patch skips them. > > > > Signed-off-by: William Tu > > --- > > v1: > >- Tested-at: h

[ovs-dev] [PATCH] tests: Skip testcases using nc under check-afxdp.

2019-11-01 Thread William Tu
AF_XDP veth does not support TCP with namespaces. This patch skips them. Signed-off-by: William Tu --- v1: - Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/606194550 - make check-afxdp all pass on my machine, but cirrus, it is still unstable, observe 1 failed at: https

[ovs-dev] [PATCHv3] netdev-afxdp: Enable loading XDP program.

2019-11-01 Thread William Tu
Signed-off-by: William Tu --- v3: Feedbacks from Eelco. - keep using xdpobj not xdp-obj (because we alread use xdpmode) or we change both to xdp-obj and xdp-mode? - log a info message when using external program for better debugging - combine some failure messages - upd

[ovs-dev] [PATCHv6] netdev-linux: Detect numa node id.

2019-10-31 Thread William Tu
o use case. Signed-off-by: William Tu Acked-by: Eelco Chaudron --- v6: Feedbacks from Ilya - add thread safety check at netdev_linux_get_numa_id__, and pass netdev_linux - preserve numa cache on netlink updates - Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/605

Re: [ovs-dev] Use more than 200000 flows in datapath/kernel cache flows

2019-10-31 Thread William Tu
On Wed, Oct 30, 2019 at 10:16:58AM -0700, Ben Pfaff wrote: > On Mon, Oct 28, 2019 at 09:39:55PM -0700, Zhiwei Cen wrote: > > It seems I can change the limit for Openflow flows. > > This works: > > $ovs-vsctl --no-wait set Open_vSwitch . other_config:flow-limit=21 > > > > $ovs-vsctl --no-wait g

Re: [ovs-dev] Use more than 200000 flows in datapath/kernel cache flows

2019-10-31 Thread William Tu
On Wed, Oct 30, 2019 at 09:18:29AM -0700, Gregory Rose wrote: > > On 10/28/2019 9:39 PM, Zhiwei Cen wrote: > >Dear ovs-dev, > > > >I'm trying to see if I can increase the number of flows supported in > >kernel cache. I found two relevant config options > >(other_config:flow-limit and upcall/flow l

Re: [ovs-dev] [PATCH v3] netdev-dpdk: add support for the RTE_ETH_EVENT_INTR_RESET event

2019-10-31 Thread William Tu
> > The root cause: Every change in the state of the network interface > > of a linux kernel device generates if-notifier event and if-notifier > > event triggers the OVS code to re-apply the configuration of ports, > > i.e. add broken ports back. The most obvious part is that dpif-netdev > > chang

Re: [ovs-dev] [PATCHv5] netdev-linux: Detect numa node id.

2019-10-30 Thread William Tu
On Tue, Oct 29, 2019 at 9:15 AM Ilya Maximets wrote: > > On 23.10.2019 23:08, William Tu wrote: > > The patch detects the numa node id from the name of the netdev, > > by reading the '/sys/class/net//device/numa_node'. > > If not available, ex: virtual device

[ovs-dev] [PATCH RFC] cirrus: Link to Google cloud for make check-afxdp.

2019-10-30 Thread William Tu
k cirrus to gcp. https://cirrus-ci.org/guide/supported-computing-services/#google-cloud Then replaces the gcp_credentials in this patch with your own. Example results: https://cirrus-ci.com/task/4880415994675200 Signed-off-by: William Tu --- .cirrus

Re: [ovs-dev] [PATCH ovs v3 2/2] netdev-dpdk: Add dpdkvdpa port

2019-10-30 Thread William Tu
On Tue, Oct 29, 2019 at 4:20 AM Noa Levy wrote: > > > > > -Original Message- > > From: William Tu [mailto:u9012...@gmail.com] > > Sent: Monday, October 28, 2019 10:46 PM > > To: Noa Levy > > Cc: ovs-dev@openvswitch.org; Oz Shlomo ; Majd > >

Re: [ovs-dev] [PATCHv2] netdev-afxdp: Enable loading XDP program.

2019-10-29 Thread William Tu
Hi Eelco, Thanks for your review. On Tue, Oct 29, 2019 at 8:28 AM Eelco Chaudron wrote: > > See comments inline… > > On 5 Oct 2019, at 2:12, William Tu wrote: > > > Now netdev-afxdp always forwards all packets to userspace because > > it is using libbpf

Re: [ovs-dev] [PATCHv6] netdev-afxdp: Add need_wakeup supprt.

2019-10-28 Thread William Tu
On Mon, Oct 28, 2019 at 12:11 PM Ilya Maximets wrote: > > On 28.10.2019 11:46, Eelco Chaudron wrote: > > > > > > On 23 Oct 2019, at 23:06, William Tu wrote: > > > >> The patch adds support for using need_wakeup flag in AF_XDP rings. > >> A new opti

Re: [ovs-dev] [PATCH ovs v3 2/2] netdev-dpdk: Add dpdkvdpa port

2019-10-28 Thread William Tu
Hi Noa, Thanks for your reply. > > > > Hi Noa, > > > > > > > > I have a couple more questions. I'm still at the learning stage of > > > > this new feature, thanks in advance for your patience. > > > > > > > > On Thu, Oct 17, 2019 at 02:16:56PM +0300, Noa Ezra wrote: > > > > > dpdkvdpa netdev work

Re: [ovs-dev] [PATCH] dpif-netdev: Fix time delta overflow in case of race for meter lock.

2019-10-25 Thread William Tu
eptember/363126.html > Signed-off-by: Ilya Maximets > --- LGTM. Thanks for the fix Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH ovs v3 2/2] netdev-dpdk: Add dpdkvdpa port

2019-10-23 Thread William Tu
Hi Noa, I have a couple more questions. I'm still at the learning stage of this new feature, thanks in advance for your patience. On Thu, Oct 17, 2019 at 02:16:56PM +0300, Noa Ezra wrote: > dpdkvdpa netdev works with 3 components: > vhost-user socket, vdpa device: real vdpa device or a VF and > r

Re: [ovs-dev] [PATCHv5] netdev-afxdp: Add need_wakeup supprt.

2019-10-23 Thread William Tu
On Wed, Oct 16, 2019 at 04:13:14PM +, Loftus, Ciara wrote: > > > > The patch adds support for using need_wakeup flag in AF_XDP rings. > > A new option, use_need_wakeup, is added. When this option is used, > > it means that OVS has to explicitly wake up the kernel RX, using poll() > > syscall a

[ovs-dev] [PATCHv5] netdev-linux: Detect numa node id.

2019-10-23 Thread William Tu
o use case. Signed-off-by: William Tu --- v5: Feedbacks from Ilya - reafactor the error handling - add mutex lock - Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/601947245 v4: Feedbacks from Eelco - Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/599

[ovs-dev] [PATCHv6] netdev-afxdp: Add need_wakeup supprt.

2019-10-23 Thread William Tu
nce the virtual device's AF_XDP xmit is synchronous: the sendto syscall enters kernel and process the TX packet on tx queue directly. On Intel Xeon E5-2620 v3 2.4GHz system, performance of physical port to physical port improves from 6.1Mpps to 7.3Mpps. Suggested-by: Ilya Maximets Signed-off-by

Re: [ovs-dev] [PATCHv4] netdev-linux: Detect numa node id.

2019-10-23 Thread William Tu
On Mon, Oct 21, 2019 at 03:18:51PM +0200, Ilya Maximets wrote: > On 17.10.2019 22:08, William Tu wrote: > >The patch detects the numa node id from the name of the netdev, > >by reading the '/sys/class/net//device/numa_node'. > >If not available, ex: virtual device,

Re: [ovs-dev] [PATCH ovs v3 2/2] netdev-dpdk: Add dpdkvdpa port

2019-10-22 Thread William Tu
On Tue, Oct 22, 2019 at 12:17 AM Noa Ezra wrote: > > Hi, > Please see the answer below. > > Thanks, > Noa. > > > -Original Message- > > From: William Tu [mailto:u9012...@gmail.com] > > Sent: Friday, October 18, 2019 12:34 AM > > To: Noa Ezr

Re: [ovs-dev] [PATCH net-next v4 00/10] optimize openvswitch flow looking up

2019-10-22 Thread William Tu
On Mon, Oct 21, 2019 at 6:16 PM Tonghao Zhang wrote: > > On Tue, Oct 22, 2019 at 1:14 AM William Tu wrote: > > > > On Wed, Oct 16, 2019 at 5:50 AM wrote: > > > > > > From: Tonghao Zhang > > > > > > This series patch optimi

Re: [ovs-dev] [PATCH net-next v4 05/10] net: openvswitch: optimize flow-mask looking up

2019-10-21 Thread William Tu
> > Hi Tonghao, > > > > Does this improve performance? After all, the original code simply > > check whether the mask is NULL, then goto next mask. > I tested the performance, but I disable the mask cache, and use the > dpdk-pktgen to generate packets: > The test ovs flow: > ovs-dpctl add-dp system

Re: [ovs-dev] [PATCH net-next v4 00/10] optimize openvswitch flow looking up

2019-10-21 Thread William Tu
On Wed, Oct 16, 2019 at 5:50 AM wrote: > > From: Tonghao Zhang > > This series patch optimize openvswitch for performance or simplify > codes. > > Patch 1, 2, 4: Port Pravin B Shelar patches to > linux upstream with little changes. btw, should we keep Pravin as the author of the above three patc

Re: [ovs-dev] [PATCHv5] netdev-afxdp: Add need_wakeup supprt.

2019-10-18 Thread William Tu
On Fri, Oct 18, 2019 at 05:14:46PM +0200, Ilya Maximets wrote: > On 26.09.2019 21:29, William Tu wrote: > >The patch adds support for using need_wakeup flag in AF_XDP rings. > >A new option, use_need_wakeup, is added. When this option is used, > >it means that OVS has to e

Re: [ovs-dev] [PATCH] debian and rhel: Add libunwind dev package.

2019-10-18 Thread William Tu
On Thu, Oct 17, 2019 at 01:38:08PM -0700, Yi-Hung Wei wrote: > On Thu, Oct 17, 2019 at 12:56 PM William Tu wrote: > > > > The patch add libunwind dev package to debian and rhel. > > > > Signed-off-by: William Tu > > --- > > Looks good to me. > &

Re: [ovs-dev] [PATCH net-next v4 03/10] net: openvswitch: shrink the mask array if necessary

2019-10-18 Thread William Tu
> Tested-by: Greg Rose > --- LGTM Acked-by: William Tu On the other hand, maybe we should have an upper limit on the mask cash size? Regards, William` > net/openvswitch/flow_table.c | 33 +++-- > 1 file changed, 23 insertions(+), 10 deletions(-) > > d

Re: [ovs-dev] [PATCH net-next v4 02/10] net: openvswitch: convert mask list in mask array

2019-10-18 Thread William Tu
g > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH net-next v4 01/10] net: openvswitch: add flow-mask cache for performance

2019-10-18 Thread William Tu
masks can > | affect packet processing performance. > > Link: > https://github.com/openvswitch/ovs/commit/5604935e4e1cbc16611d2d97f50b717aa31e8ec5 > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu ___

Re: [ovs-dev] [PATCH net-next v4 10/10] net: openvswitch: simplify the ovs_dp_cmd_new

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:56 AM wrote: > > From: Tonghao Zhang > > use the specified functions to init resource. > > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- Looks like this is simply moving code around. I don't have any opinion. > net/openvswitch/datapath.c | 60 >

Re: [ovs-dev] [PATCH net-next v4 09/10] net: openvswitch: don't unlock mutex when changing the user_features fails

2019-10-18 Thread William Tu
t OvS recirc_id from tc chain index") > Cc: Paul Blakey > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu > net/openvswitch/datapath.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/openvswit

Re: [ovs-dev] [PATCH net-next v4 07/10] net: openvswitch: add likely in flow_lookup

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:55 AM wrote: > > From: Tonghao Zhang > > The most case *index < ma->max, and flow-mask is not NULL. > We add un/likely for performance. > > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu &g

Re: [ovs-dev] [PATCH net-next v4 06/10] net: openvswitch: simplify the flow_hash

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:54 AM wrote: > > From: Tonghao Zhang > > Simplify the code and remove the unnecessary BUILD_BUG_ON. > > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu > net/openvswitch/flow_table.c | 8 ++-- >

Re: [ovs-dev] [PATCH net-next v4 05/10] net: openvswitch: optimize flow-mask looking up

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:54 AM wrote: > > From: Tonghao Zhang > > The full looking up on flow table traverses all mask array. > If mask-array is too large, the number of invalid flow-mask > increase, performance will be drop. > > One bad case, for example: M means flow-mask is valid and NULL > o

Re: [ovs-dev] [PATCH ovs v3 2/2] netdev-dpdk: Add dpdkvdpa port

2019-10-17 Thread William Tu
On Thu, Oct 17, 2019 at 02:16:56PM +0300, Noa Ezra wrote: Hi Noa, Thanks for the patch. I'm new to this and have a question below. > dpdkvdpa netdev works with 3 components: > vhost-user socket, vdpa device: real vdpa device or a VF and > representor of "vdpa device". > > In order to add a new

[ovs-dev] [PATCHv4] netdev-linux: Detect numa node id.

2019-10-17 Thread William Tu
o use case. Signed-off-by: William Tu --- v4: Feedbacks from Eelco - Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/599308893 v3: Feedbacks from Ilya and Eelco - update doc, afxdp.rst - fix coding style - fix limit of numa node max, by using ovs_numa_numa_id_is_valid

[ovs-dev] [PATCHv3] ofproto-dpif: Expose datapath capability to ovsdb.

2019-10-17 Thread William Tu
e \ ct_orig_tuple=true ct_eventmask=true ct_state=true \ ct_clear=true max_vlan_headers=1 recirc=true ct_label=true \ max_hash_alg=1 ct_state_nat=true ct_timeout=true \ ct_mark=true ct_orig_tuple6=true check_pkt_len=true \ masked_set_action=true max_mpls_depth=3 trunc=true ct_zone=true Signed-off

[ovs-dev] [PATCH] debian and rhel: Add libunwind dev package.

2019-10-17 Thread William Tu
The patch add libunwind dev package to debian and rhel. Signed-off-by: William Tu --- debian/control | 3 ++- rhel/openvswitch.spec.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ad4b187860f3..de092b898cd7 100644 --- a

Re: [ovs-dev] [PATCHv3] netdev-linux: Detect numa node id.

2019-10-17 Thread William Tu
On Tue, Oct 15, 2019 at 01:45:19PM +0200, Eelco Chaudron wrote: > See some comment below… Thank you. Sorry for my late response. > > On 2 Oct 2019, at 22:26, William Tu wrote: > > >The patch detects the numa node id from the name of the netdev, > >by reading the

Re: [ovs-dev] [PATCH] compat: Fix small naming issue

2019-10-17 Thread William Tu
On Wed, Oct 16, 2019 at 01:26:39PM -0700, Yifeng Sun wrote: > LGTM, thanks Greg. > > Reviewed-by: Yifeng Sun > Thanks! Applied to master. Sorry Yifeng, I forgot to add your Reviewed-by tag. William > On Wed, Oct 16, 2019 at 1:21 PM Greg Rose wrote: > > > > In commit 057772cf2477 the functio

Re: [ovs-dev] [PATCHv2] ofproto-dpif: Expose datapath capability to ovsdb.

2019-10-17 Thread William Tu
On Wed, Oct 16, 2019 at 9:36 AM Gregory Rose wrote: > > > On 10/15/2019 2:06 PM, Gregory Rose wrote: > > > On 10/4/2019 3:32 PM, William Tu wrote: > > The patch adds support for fetching the datapath's capabilities > from the result of 'check_support()',

Re: [ovs-dev] [PATCH v2] configure: Properly handle case where libunwind.h is not available.

2019-10-17 Thread William Tu
On Wed, Oct 16, 2019 at 09:35:55PM -0700, Yi-Hung Wei wrote: > It is possible that user install libunwind but not libunwind-devel, > and it will run into a compilation error. So we need to check the > existence of the library and the header file. > > Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGS

Re: [ovs-dev] [PATCHv5] netdev-afxdp: Add need_wakeup supprt.

2019-10-17 Thread William Tu
On Wed, Oct 16, 2019 at 9:13 AM Loftus, Ciara wrote: > > > > > The patch adds support for using need_wakeup flag in AF_XDP rings. > > A new option, use_need_wakeup, is added. When this option is used, > > it means that OVS has to explicitly wake up the kernel RX, using poll() > > syscall and wake

Re: [ovs-dev] [PATCH] netdev-afxdp: Fix umem creation failure due to uninitialized config.

2019-10-11 Thread William Tu
On Fri, Oct 11, 2019 at 01:16:55PM +0200, Ilya Maximets wrote: > On 10.10.2019 20:21, William Tu wrote: > >On Wed, Oct 09, 2019 at 04:17:58PM +0200, Ilya Maximets wrote: > >>Later version of 'struct xsk_umem_config' contains additional field > >>'f

Re: [ovs-dev] [PATCH] netdev-afxdp: Update memory locking limits unconditionally.

2019-10-11 Thread William Tu
On Fri, Oct 11, 2019 at 01:17:59PM +0200, Ilya Maximets wrote: > On 10.10.2019 20:29, William Tu wrote: > >On Wed, Oct 09, 2019 at 04:23:31PM +0200, Ilya Maximets wrote: > >>Any type of AF_XDP socket in all modes implies creation of BPF map of > >>type BPF_MAP_

Re: [ovs-dev] [PATCH] tests: Allow valgrind check for afxdp testsuite.

2019-10-10 Thread William Tu
On Wed, Oct 09, 2019 at 04:18:38PM -0700, William Tu wrote: > On Wed, Oct 09, 2019 at 11:20:00AM -0700, Ben Pfaff wrote: > > On Wed, Oct 09, 2019 at 04:36:49PM +0200, Ilya Maximets wrote: > > > New 'make' target 'check-afxdp-valgrind'. > > > >

Re: [ovs-dev] [PATCH] netdev-afxdp: Update memory locking limits unconditionally.

2019-10-10 Thread William Tu
On Wed, Oct 09, 2019 at 04:23:31PM +0200, Ilya Maximets wrote: > Any type of AF_XDP socket in all modes implies creation of BPF map of > type BPF_MAP_TYPE_XSKMAP. This leads to BPF_MAP_CREATE syscall and > subsequently 'xsk_map_alloc()' function that will charge required > memory from the memlock

Re: [ovs-dev] [PATCH] netdev-afxdp: Fix umem creation failure due to uninitialized config.

2019-10-10 Thread William Tu
On Wed, Oct 09, 2019 at 04:17:58PM +0200, Ilya Maximets wrote: > Later version of 'struct xsk_umem_config' contains additional field > 'flags'. OVS doesn't use that field passing uninitialized stack > memory to the 'xsk_umem__create()' call that could fail with > 'Invalid argument' if 'flags' are

Re: [ovs-dev] [PATCH] appveyor: Update OpenSSL link and python3 to path

2019-10-09 Thread William Tu
On Wed, Oct 09, 2019 at 09:44:14AM -0700, Ben Pfaff wrote: > On Wed, Oct 09, 2019 at 05:10:08PM +0300, Alin Gabriel Serdean wrote: > > This patch fixes the appveyor build by adding the python version 3 to path > > as per: > > https://www.appveyor.com/docs/windows-images-software/#python > > > > We

Re: [ovs-dev] [PATCH] tests: Allow valgrind check for afxdp testsuite.

2019-10-09 Thread William Tu
On Wed, Oct 09, 2019 at 11:20:00AM -0700, Ben Pfaff wrote: > On Wed, Oct 09, 2019 at 04:36:49PM +0200, Ilya Maximets wrote: > > New 'make' target 'check-afxdp-valgrind'. > > > > Signed-off-by: Ilya Maximets > > Makes sense to me. I did not test it. > > Acked-by: Ben Pfaff Thanks, I tested th

Re: [ovs-dev] [PATCH lib:] Avoid clobbered variable warning on ppc64le.

2019-10-08 Thread William Tu
On Tue, Oct 08, 2019 at 10:04:17AM -0700, David Wilder wrote: > Since commit e2ed6fbeb1, Ci on ppc64le with Ubuntu 16.04.6 LTS throws > this error: > > lib/fatal-signal.c: In function 'send_backtrace_to_monitor': > lib/fatal-signal.c:168:9: error: variable 'dep' might be clobbered by > 'longjmp' o

Re: [ovs-dev] [PATCH] flow: Fix using pointer to member of packed struct icmp6_hdr.

2019-10-08 Thread William Tu
is new structure. > Removed redundant conversions between network and host representations. > Now fields are always in be. > > This also, probably, makes flow_compose_l4 more robust by avoiding > possible unaligned accesses to 32 bit value. > > Fixes: 9b2b84973db7 (&quo

<    2   3   4   5   6   7   8   9   10   11   >