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

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
> 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 >

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
. 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 - move

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

2019-10-17 Thread William Tu
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-by: William Tu --- v3: fix 32-bit build

[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

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

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()', and wri

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

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 > >>'flags'. OVS doe

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_M

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'. > > > > > > Signed-o

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 > > > >

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

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'

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

2019-10-08 Thread William Tu
> 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 ("Support for match & set ICMPv6 reserved and options > type fields") > Signed-off-by: Ilya M

Re: [ovs-dev] [PATCH 2/2] backtrace: Fix 32-bit libunwind build.

2019-10-08 Thread William Tu
On Tue, Oct 8, 2019 at 9:33 AM Ilya Maximets wrote: > > On 08.10.2019 18:13, William Tu wrote: > > On Mon, Oct 07, 2019 at 07:10:26PM +0200, Ilya Maximets wrote: > >> On 07.10.2019 18:11, Ilya Maximets wrote: > >>> On 07.10.2019 18:07, William Tu wrote: > >

Re: [ovs-dev] [PATCH 2/2] backtrace: Fix 32-bit libunwind build.

2019-10-08 Thread William Tu
On Mon, Oct 07, 2019 at 07:10:26PM +0200, Ilya Maximets wrote: > On 07.10.2019 18:11, Ilya Maximets wrote: > >On 07.10.2019 18:07, William Tu wrote: > >>On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets wrote: > >>> > >>>On 04.10.2019 23:21, William Tu

Re: [ovs-dev] [PATCH 2/2] backtrace: Fix 32-bit libunwind build.

2019-10-07 Thread William Tu
On Mon, Oct 7, 2019 at 5:06 AM Ilya Maximets wrote: > > On 04.10.2019 23:21, William Tu wrote: > > The libunwind unw_word_t type is defined as uint32_t for 32-bit > > system and uint64_t for 64-bit system. The patch fixes the > > compile error using PRIxPTR to print t

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

2019-10-04 Thread William Tu
in kernel. The patch enables loading the user-provide XDP program by doing $ovs-vsctl -- set int afxdp-p0 options:xdpobj= 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-by: William

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

2019-10-04 Thread William Tu
vis/builds/593749381 Signed-off-by: William Tu --- v2: rebase to master --- ofproto/ofproto-dpif.c | 51 +++ ofproto/ofproto-provider.h | 2 ++ ofproto/ofproto.c | 12 ofproto/ofproto.h | 2 ++ tests/ovs-vsctl.at | 10 ++

[ovs-dev] [PATCH 2/2] backtrace: Fix 32-bit libunwind build.

2019-10-04 Thread William Tu
The libunwind unw_word_t type is defined as uint32_t for 32-bit system and uint64_t for 64-bit system. The patch fixes the compile error using PRIxPTR to print this value. Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.") Signed-off-by: William Tu Acked-by: Ily

Re: [ovs-dev] [PATCH] travis: Fix 32-bit libunwind system build.

2019-10-04 Thread William Tu
On Fri, Oct 04, 2019 at 08:53:49PM +0200, Ilya Maximets wrote: > On 04.10.2019 2:34, William Tu wrote: > >On Thu, Oct 3, 2019 at 10:15 AM Ilya Maximets wrote: > >> > >>On 03.10.2019 18:13, Ilya Maximets wrote: > >>>On 02.10.2019 20:15, William Tu wrote

[ovs-dev] [PATCH 1/2] travis: Fix 32-bit libunwind system build.

2019-10-04 Thread William Tu
32-bit and 64-bit libunwind can not be installed at the same time. For 32-bit build, this patch removes the 64-bit libunwind and install 32-bit version. Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.") Signed-off-by: William Tu Acked-by: Ilya Maximets --- .tr

Re: [ovs-dev] [PATCH] travis: Fix 32-bit libunwind system build.

2019-10-03 Thread William Tu
On Thu, Oct 3, 2019 at 10:15 AM Ilya Maximets wrote: > > On 03.10.2019 18:13, Ilya Maximets wrote: > > On 02.10.2019 20:15, William Tu wrote: > >> 32-bit and 64-bit libunwind can not be installed at the same time. > >> For 32-bit build, this patch removes the 64-bit

Re: [ovs-dev] [PATCH net-next 0/9] optimize openvswitch flow looking up

2019-10-03 Thread William Tu
Hi Tonghao, Thanks for the patch. > On 29 Sep 2019, at 19:09, xiangxia.m@gmail.com wrote: > > > From: Tonghao Zhang > > > > This series patch optimize openvswitch. > > > > Patch 1, 2, 4: Port Pravin B Shelar patches to > > linux upstream with little changes. > > I thought the idea of

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

2019-10-02 Thread William Tu
. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/592728452 Signed-off-by: William Tu --- 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 - move the function to netdev-linux - cache

[ovs-dev] [PATCH] travis: Fix 32-bit libunwind system build.

2019-10-02 Thread William Tu
trace.") Signed-off-by: William Tu --- .travis/linux-prepare.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/.travis/linux-prepare.sh b/.travis/linux-prepare.sh index 70fd98f715ed..164adf7ec4f8 100755 --- a/.travis/linux-prepare.sh +++ b/.travis/linux-prepare.sh @@ -14,3 +14,9 @@ cd

Re: [ovs-dev] [PATCH] m4: Fix 32bit build with 64bit version of libunwind-dev installed.

2019-10-02 Thread William Tu
On Wed, Oct 02, 2019 at 06:46:36PM +0300, Ilya Maximets wrote: > On 02.10.2019 17:46, Ben Pfaff wrote: > >On Tue, Oct 01, 2019 at 06:40:10PM -0700, William Tu wrote: > >>On Tue, Oct 1, 2019 at 4:19 PM William Tu wrote: > >>> > >>>On Tue, Oct 01, 201

Re: [ovs-dev] [PATCH] m4: Fix 32bit build with 64bit version of libunwind-dev installed.

2019-10-01 Thread William Tu
On Tue, Oct 1, 2019 at 4:19 PM William Tu wrote: > > On Tue, Oct 01, 2019 at 08:29:41PM +0300, Ilya Maximets wrote: > > On 01.10.2019 19:56, Ben Pfaff wrote: > > >On Tue, Oct 01, 2019 at 07:46:10PM +0300, Ilya Maximets wrote: > > >>On 01.10.2019 19:17, Ben Pfaff w

Re: [ovs-dev] [PATCH] m4: Fix 32bit build with 64bit version of libunwind-dev installed.

2019-10-01 Thread William Tu
nally check for actual compiling possibility before enabling > >>>>the feature. Otherwise 'make' will fail due to inability to > >>>>build with 64bit libunwind headers: > >>>> > >>>> https://travis-ci.org/openvswitch/ovs/jobs/5905803

Re: [ovs-dev] [PATCHv4] fatal-signal: Catch SIGSEGV and print backtrace.

2019-10-01 Thread William Tu
On Tue, Oct 01, 2019 at 02:25:22PM +0300, Ilya Maximets wrote: > On 01.10.2019 12:01, Ilya Maximets wrote: > >>On Fri, Sep 27, 2019 at 10:22:55AM -0700, William Tu wrote: > >>>The patch catches the SIGSEGV signal and prints the backtrace > >>>using libunwi

Re: [ovs-dev] [PATCHv2] netdev-afxdp: Detect numa node id.

2019-10-01 Thread William Tu
linux? > 2. netdev-linux caches most of things like mtu and ifindex. >Maybe we could cache numa_id too and not read it all the time >from the filesystem? > 3. More comments inline. > OK, let me see how to make it more generic in netdev-linux. > Best regards, Ilya Maximets.

Re: [ovs-dev] [PATCHv2] netdev-afxdp: Detect numa node id.

2019-10-01 Thread William Tu
On Mon, Sep 30, 2019 at 12:40:59PM +0200, Eelco Chaudron wrote: > > > On 27 Sep 2019, at 19:26, 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

[ovs-dev] [PATCHv2] netdev-afxdp: Detect numa node id.

2019-09-27 Thread William Tu
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 error happens, return numa id 0. Signed-off-by: William Tu --- v2: Address feedback from Eelco fix memory leak of xaspintf log

[ovs-dev] [PATCHv4] fatal-signal: Catch SIGSEGV and print backtrace.

2019-09-27 Thread William Tu
the stack info using libunwind, which is signal-safe, and issues 'write' to the pipe, where the monitor thread reads and prints to ovs-vswitchd.log. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/590503433 Signed-off-by: William Tu -- v4: add missing include in lib/backtrace.

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

2019-09-26 Thread William Tu
sical port improves from 6.1Mpps to 7.3Mpps. Suggested-by: Ilya Maximets Signed-off-by: William Tu --- v5: - address feedback from Ilya - update commit msg about kernel version using bpf-next tree - remove __func__, and use DBG in log_ - fix alignment - remove the kernel version r

[ovs-dev] [PATCHv3] fatal-signal: Catch SIGSEGV and print backtrace.

2019-09-26 Thread William Tu
the stack info using libunwind, which is signal-safe, and issues 'write' to the pipe, where the monitor thread reads and prints to ovs-vswitchd.log. Tested-at: https://travis-ci.org/williamtu/ovs-travis/builds/590070724 Signed-off-by: William Tu -- v3: Some refactoring fix sparse error v2: Add

Re: [ovs-dev] [PATCH] netdev-afxdp: Detect numa node id.

2019-09-26 Thread William Tu
On Thu, Sep 26, 2019 at 02:18:15PM +0200, Eelco Chaudron wrote: > > > On 13 Sep 2019, at 19:15, 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

Re: [ovs-dev] [PATCHv2] fatal-signal: Catch SIGSEGV and print backtrace.

2019-09-26 Thread William Tu
On Wed, Sep 25, 2019 at 4:58 PM 0-day Robot wrote: > > Bleep bloop. Greetings William Tu, I am a robot and I have tried out your > patch. > Thanks for your contribution. > > I encountered some error that I wasn't expecting. See the details below. > > > build: &g

Re: [ovs-dev] Regarding TSO using AF_PACKET in OVS

2019-09-25 Thread William Tu
On Thu, Sep 19, 2019 at 2:16 AM Ramana Reddy wrote: > > Hi William, > Thanks for your reply. Please find the inline comments. > > On Fri, Aug 30, 2019 at 9:26 PM William Tu wrote: >> >> Hi Ramana, >> >> I'm trying to understand your setup. >> &g

[ovs-dev] [PATCHv2] fatal-signal: Catch SIGSEGV and print backtrace.

2019-09-25 Thread William Tu
(monitor)|ERR|1 crashes: pid 106155 died, killed \ (Segmentation fault), core dumped, restarting Signed-off-by: William Tu --- v2: Address comments from Ben about async-signal-safety --- .travis.yml| 1 + configure.ac | 1 + lib/backtrace.h| 18 ++ lib/daemon-

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

2019-09-25 Thread William Tu
On Tue, Sep 24, 2019 at 7:48 AM Ilya Maximets wrote: > > Hi. > Thanks for a new version. > > Comments inline. Hi Ilya, Thanks for your feedback. > > static struct xsk_socket_info * > > -xsk_configure(int ifindex, int xdp_queue_id, int xdpmode) > > +xsk_configure(int ifindex, int

[ovs-dev] [PATCH RFC] ofproto-dpif: Expose datapath's capability to ovsdb.

2019-09-20 Thread William Tu
set, https://patchwork.ozlabs.org/cover/1154903/ So not applicable to the current master, mark it as RFC. Signed-off-by: William Tu --- ofproto/ofproto-dpif.c | 51 +++ ofproto/ofproto-provider.h | 2 ++ ofproto/ofproto.c | 12 ofproto/ofproto.h | 1 +

Re: [ovs-dev] [PATCHv2] stream_ssl: fix important memory leak in ssl_connect() function

2019-09-20 Thread William Tu
Hi Ben, I'm not the co-author of this patch, I'm just sending for the original author. Please remove me, thanks William On Fri, Sep 20, 2019 at 10:01 AM 0-day Robot wrote: > > Bleep bloop. Greetings William Tu, I am a robot and I have tried out your > patch. > Thanks for your

Re: [ovs-dev] [PATCH] fatal-signal: Catch SIGSEGV and print backtrace.

2019-09-20 Thread William Tu
On Wed, Sep 18, 2019 at 04:27:46PM -0700, Ben Pfaff wrote: > On Wed, Sep 18, 2019 at 01:16:37PM -0700, William Tu wrote: > > Thanks for the feedback. > > > > On Wed, Sep 18, 2019 at 11:30 AM Ben Pfaff wrote: > > > > > > On Tue, Sep 17, 201

Re: [ovs-dev] [PATCH 1/1] stream_ssl: fix important memory leak in ssl_connect() function

2019-09-20 Thread William Tu
On Wed, Sep 18, 2019 at 09:26:34AM -0700, Ben Pfaff wrote: > On Mon, Sep 16, 2019 at 04:44:11PM -0700, William Tu wrote: > > On Mon, Sep 16, 2019 at 12:20 AM Damijan Skvarc > > wrote: > > > > > > Hi William and thanks for your review. > &g

[ovs-dev] [PATCHv2] stream_ssl: fix important memory leak in ssl_connect() function

2019-09-20 Thread William Tu
is retrieved by calling SSL_get_peer_certificate() where its reference counter is incremented. After retrieved certificate is not used any more its reference counter must be decremented by calling X509_free(). If not, allocated memory is never freed despite the ssl connection is properly closed.

Re: [ovs-dev] [PATCH] fatal-signal: Catch SIGSEGV and print backtrace.

2019-09-18 Thread William Tu
Thanks for the feedback. On Wed, Sep 18, 2019 at 11:30 AM Ben Pfaff wrote: > > On Tue, Sep 17, 2019 at 04:13:24PM -0700, William Tu wrote: > > The patch catches the SIGSEGV signal and prints the backtrace > > using libunwind, hopefully makes it easier to debug. > > >

[ovs-dev] [PATCH] fatal-signal: Catch SIGSEGV and print backtrace.

2019-09-17 Thread William Tu
The patch catches the SIGSEGV signal and prints the backtrace using libunwind, hopefully makes it easier to debug. Signed-off-by: William Tu --- .travis.yml| 1 + configure.ac | 1 + lib/fatal-signal.c | 40 +++- m4/openvswitch.m4 | 10

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

2019-09-17 Thread William Tu
on 5.2.0-rc6 using libbpf from 5.3.0-rc3 does not work due to libbpf API change. Users have to use the older libbpf for older kernel. Suggested-by: Ilya Maximets Signed-off-by: William Tu --- v4: - move use_need_wakeup check inside xsk_rx_wakeup_if_needed v3: - add warning when user enables

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

2019-09-17 Thread William Tu
On Tue, Sep 17, 2019 at 01:41:17PM +0200, Eelco Chaudron wrote: > Two comments below… > > > On 11 Sep 2019, at 19:58, William Tu wrote: > > >The patch adds support for using need_wakeup flag in AF_XDP rings. > >A new option, use_need_wakeup,

Re: [ovs-dev] [PATCH 10/10] conntrack: Validate accessing of conntrack data in pkt_metadata

2019-09-17 Thread William Tu
> ==24039==by 0x5319E0: process_command (unixctl.c:308) > ==24039==by 0x5319E0: run_connection (unixctl.c:342) > ==24039==by 0x5319E0: unixctl_server_run (unixctl.c:393) > ==24039==by 0x40761E: main (ovs-vswitchd.c:128) > > According to comments in pkt_metadata_init(),

Re: [ovs-dev] [PATCH 09/10] db-ctl-base: Free leaked ovsdb_datum

2019-09-17 Thread William Tu
(ovs-vsctl.c:2626) > ==19252==by 0x406E2E: main (ovs-vsctl.c:183) > > This patch fixes them. > > Signed-off-by: Yifeng Sun LGTM. Acked-by: William Tu ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH 08/10] ofproto-dpif: Free leaked 'webster'

2019-09-17 Thread William Tu
un (ofproto.c:1845) > ==16884==by 0x40BA63: bridge_run__ (bridge.c:2971) > ==16884==by 0x410CF3: bridge_run (bridge.c:3029) > ==16884==by 0x407614: main (ovs-vswitchd.c:127) > > This patch fixes it. > > Signed-off-by: Yifeng Sun LGTM. Acked-by: William Tu > -

Re: [ovs-dev] [PATCH 07/10] dns-resolve: Free 'struct ub_result' when callback returns error results

2019-09-17 Thread William Tu
by 0x457FE8: connmgr_run (connmgr.c:367) > ==5499==by 0x41E0F5: ofproto_run (ofproto.c:1845) > ==5499==by 0x40BA63: bridge_run__ (bridge.c:2971) > > In ub_resolve_async's callback function, 'struct ub_result' should be > finally freed even if there is a resolving error. T

Re: [ovs-dev] [PATCH 06/10] ovsdb-client: Free ovsdb_schema

2019-09-17 Thread William Tu
ma_from_file (ovsdb.c:101) > ==10727==by 0x40B156: do_convert (ovsdb-client.c:1639) > ==10727==by 0x4061C6: main (ovsdb-client.c:282) > > This patch fixes it. > > Signed-off-by: Yifeng Sun LGTM Acked-by: William Tu > --- > ovsdb/ovsdb-client.c | 1 + > 1 file changed

Re: [ovs-dev] [PATCH 05/10] trigger: Free leaked ovsdb_schema

2019-09-17 Thread William Tu
eed when there is no error. > This patch fixes it. > > Signed-off-by: Yifeng Sun LGTM Acked-by: William Tu > --- > ovsdb/trigger.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ovsdb/trigger.c b/ovsdb/trigger.c > index 6f4ed96

Re: [ovs-dev] [PATCH 04/10] ovs-ofctl: Free leaked minimatch

2019-09-17 Thread William Tu
7933: ovs_cmdl_run_command__ (command-line.c:223) > ==19220==by 0x406F68: main (ovs-ofctl.c:179) > > This patch fixes it. > > Signed-off-by: Yifeng Sun Looks good to me. Acked-by: William Tu > --- > utilities/ovs-ofctl.c | 1 + > 1 file changed, 1 insertion(+)

Re: [ovs-dev] [PATCH 03/10] dpif-netdev: Handle uninitialized value error for 'match.wc'

2019-09-17 Thread William Tu
created by a stack allocation > ==21214==at 0x4769C3: fast_path_processing (dpif-netdev.c:6672) > > 'match' is allocated on stack but its 'wc' is accessed in > odp_flow_key_from_flow__ without proper initialization. > This patch fixes it. > > Signed-off-by: Yifeng Sun LGTM Acked-by

Re: [ovs-dev] [PATCH 02/10] ofproto-dpif: Uninitialize 'xlate_cache' to free resources

2019-09-17 Thread William Tu
by 0x41E0F5: ofproto_run (ofproto.c:1845) > ==32205==by 0x40BA63: bridge_run__ (bridge.c:2971) > ==32205==by 0x410CF3: bridge_run (bridge.c:3029) > ==32205==by 0x407614: main (ovs-vswitchd.c:127) > > This is because 'xcache' was not destroyed properly. This patch fi

Re: [ovs-dev] [PATCH 01/10] raft: Free leaked json data

2019-09-17 Thread William Tu
8) > > This patch fixes it. > > Signed-off-by: Yifeng Sun LGTM Acked-by: William Tu > --- > ovsdb/raft.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ovsdb/raft.c b/ovsdb/raft.c > index 9eabe2cfeecd..a45c7f8ba998 100644 > --- a/ovsdb/raft

Re: [ovs-dev] [PATCH v2] vswitch: ratelimit the device add log

2019-09-16 Thread William Tu
he port. While the parameters remain invalid > the vswitch run loop will re-trigger the warning, flooding the > syslog. > > This patch adds a simple rate limit to the log. > > Signed-off-by: Aaron Conole > --- LGTM Acked-by: William Tu > v2: set errp > > vswitch

Re: [ovs-dev] [PATCH 1/1] stream_ssl: fix important memory leak in ssl_connect() function

2019-09-16 Thread William Tu
feedback. William > > > > On Thu, Sep 12, 2019 at 8:00 PM William Tu wrote: >> >> On Fri, Jul 26, 2019 at 10:11:03AM +0200, Damijan Skvarc wrote: >> > >> > While checking valgrind reports after running "make check-valgrind" I have

Re: [ovs-dev] [PATCH 3/3] flake8: also check the ovs-check-dead-ifs script

2019-09-14 Thread William Tu
On Fri, Sep 13, 2019 at 01:29:03PM -0400, Aaron Conole wrote: > Signed-off-by: Aaron Conole LGTM Acked-by: William Tu > --- > utilities/automake.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/utilities/automake.mk b/utilities/automake.mk > index c37959

Re: [ovs-dev] [PATCH 2/3] ovs-check-dead-ifs: unshadow pid variable

2019-09-14 Thread William Tu
chine and solve the flake8 error. Acked-by: William Tu > --- > utilities/ovs-check-dead-ifs.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in > index f398a3401..73e4fd9e1 100755 > -

Re: [ovs-dev] [PATCH 1/3] ovs-check-dead-ifs: python3 print format

2019-09-14 Thread William Tu
On Fri, Sep 13, 2019 at 01:29:01PM -0400, Aaron Conole wrote: > The print call changed in python3, so update it. > > Signed-off-by: Aaron Conole LGTM Acked-by: William Tu > --- > utilities/ovs-check-dead-ifs.in | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(

Re: [ovs-dev] [PATCH] netdev-afxdp: Detect numa node id.

2019-09-13 Thread William Tu
On Fri, Sep 13, 2019 at 11:40 AM Aaron Conole wrote: > > William Tu writes: > > > Hi Aaron, > > > > I think this might be a false positive? > > Looks like it. Hi Aaron, I looked at the checkpatch.py. Adding a space in front of /sys makes it PASSED, but I

Re: [ovs-dev] [PATCH] netdev-afxdp: Detect numa node id.

2019-09-13 Thread William Tu
Hi Aaron, I think this might be a false positive? I didn't find any lack whitespace here On Fri, Sep 13, 2019 at 11:01 AM 0-day Robot wrote: > > Bleep bloop. Greetings William Tu, I am a robot and I have tried out your > patch. > Thanks for your contribution. > > I enco

Re: [ovs-dev] [PATCH v5 2/9] ovs-vsctl: Add conntrack zone commands.

2019-09-13 Thread William Tu
On Fri, Sep 13, 2019 at 10:48 AM Justin Pettit wrote: > > > > On Sep 13, 2019, at 10:41 AM, William Tu wrote: > > > >> Is there a reason you limited this to 18 arguments and not use INT_MAX? > > > > I use 18 because at most we have 11 tcp, 3 udp, 2

Re: [ovs-dev] [PATCH v5 2/9] ovs-vsctl: Add conntrack zone commands.

2019-09-13 Thread William Tu
Hi Justin, Thanks for your feedbacks. On Thu, Sep 12, 2019 at 02:14:56PM -0700, Justin Pettit wrote: > > > On Aug 28, 2019, at 3:14 PM, Yi-Hung Wei wrote: > > > > diff --git a/utilities/ovs-vsctl.8.in b/utilities/ovs-vsctl.8.in > > index 7c09df79bd29..5b9883ae1c3d 100644 > > ---

[ovs-dev] [PATCH] netdev-afxdp: Detect numa node id.

2019-09-13 Thread William Tu
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 error happens, return numa id 0. Signed-off-by: William Tu --- lib/netdev-afxdp.c | 38 +- 1 file

Re: [ovs-dev] Querying OVS for OpenFlow capabilities

2019-09-12 Thread William Tu
On Thu, Sep 12, 2019 at 03:47:58PM -0400, Mark Michelson wrote: > On 9/12/19 2:46 PM, Justin Pettit wrote: > > > > > >>On Sep 12, 2019, at 11:08 AM, Mark Michelson wrote: > >> > >>Hi guys, > >> > >>I recently sent a new version of a document describing proposed OVN/OVS > >>compatibility [1]. In

[ovs-dev] [PATCH] checkpatch: Ignore utitilies/bugtool.

2019-09-12 Thread William Tu
Signed-off-by: William Tu --- utilities/checkpatch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index f8fa00e306a8..a9f27b52f3c8 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -844,6 +844,8 @@ def

Re: [ovs-dev] [PATCH] ovs-bugtool: Add ip -s -s to get_device_stats.out.

2019-09-12 Thread William Tu
On Thu, Sep 12, 2019 at 11:01 AM 0-day Robot wrote: > > Bleep bloop. Greetings William Tu, I am a robot and I have tried out your > patch. > Thanks for your contribution. > > I encountered some error that I wasn't expecting. See the details below. > > > checkp

Re: [ovs-dev] [PATCH 1/1] stream_ssl: fix important memory leak in ssl_connect() function

2019-09-12 Thread William Tu
On Fri, Jul 26, 2019 at 10:11:03AM +0200, Damijan Skvarc wrote: > > While checking valgrind reports after running "make check-valgrind" I have > noticed > reports for several tests similar to the following: > > > ==5345== Memcheck, a memory error detector > ==5345== Copyright (C)

Re: [ovs-dev] [PATCH] vswitch: ratelimit the device add log

2019-09-12 Thread William Tu
ing the port. While the parameters remain invalid > the vswitch run loop will re-trigger the warning, flooding the > syslog. > > This patch adds a simple rate limit to the log. > > Signed-off-by: Aaron Conole LGTM, hit this issue quite often. Acked-by: William Tu > --- >

[ovs-dev] [PATCH] ovs-bugtool: Add ip -s -s to get_device_stats.out.

2019-09-12 Thread William Tu
The patch adds 'ip -s -s' to file get_device_stats.out to collect device statistics. When debugging tunnel related issues, the command shows much more detailed counters, ex: frame, crc, carrier, helping to understand the root cause when packets are dropped. Signed-off-by: William Tu

[ovs-dev] [PATCH] dpdk: trivial: Fix comment and cast.

2019-09-12 Thread William Tu
Comment should start with capital letter. Remove unnecessary type casting. Signed-off-by: William Tu --- lib/dp-packet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp-packet.h index 14f0897fa637..5f703ad457b3 100644 --- a/lib/dp-packet.h +++ b

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

2019-09-11 Thread William Tu
on 5.2.0-rc6 using libbpf from 5.3.0-rc3 does not work due to libbpf API change. Users have to use the older libbpf for older kernel. Suggested-by: Ilya Maximets Signed-off-by: William Tu --- v3: - add warning when user enables it but libbpf not support it - revise documentation v2: - address

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

2019-09-10 Thread William Tu
; works, the need_wakeup is no ops, I will add warning will address the above cases in next version. > > //Eelco > > > On 5 Sep 2019, at 22:51, William Tu wrote: > > > The patch adds support for using need_wakeup flag in AF_XDP rings. > > A new option, use_need_wakeup, is added.

Re: [ovs-dev] NDP for ipv6 in OVS 2.10.0

2019-09-10 Thread William Tu
On Tue, Sep 10, 2019 at 9:06 AM Gregory Rose wrote: > > > On 9/10/2019 7:02 AM, Thomas Goirand wrote: > > Hi Ben and others, > > > > I just want to know: does OVS 2.10 has support for IPv6 mac learning / > > NDP, so that we can avoid the ipv6 broadcast storm in our cloud? > > OVS will

Re: [ovs-dev] [PATCH 2/2] netdev-afxdp: Add need_wakeup supprt.

2019-09-06 Thread William Tu
On Fri, Sep 6, 2019 at 1:14 AM Eelco Chaudron wrote: > > > > On 5 Sep 2019, at 18:21, William Tu wrote: > > >> Did some more testing and with PVP I see a performance decrease, with > >> physical to physical I see an increase. > >> Tests are per

Re: [ovs-dev] [PATCH 2/2] netdev-afxdp: Add need_wakeup supprt.

2019-09-05 Thread William Tu
On Wed, Sep 4, 2019 at 7:10 AM Ilya Maximets wrote: > > > Hi Eelco, > > > > Thanks for your testing and review. > > > > On Wed, Sep 4, 2019 at 1:04 AM Eelco Chaudron > > wrote: > >> > >> > >> > >> On 27 Aug 20

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

2019-09-05 Thread William Tu
. Suggested-by: Ilya Maximets Signed-off-by: William Tu --- v2: - address feedbacks from Ilya and Eelco - add options:use_need_wakeup, default to true - remove poll timeout=1sec, make poll() return immediately - naming change: rename to xsk_rx_wakeup_if_needing - fix indents and return value

Re: [ovs-dev] [PATCH 2/2] netdev-afxdp: Add need_wakeup supprt.

2019-09-05 Thread William Tu
> Did some more testing and with PVP I see a performance decrease, with > physical to physical I see an increase. > Tests are performed with a port redirect open flow rule on an ixgbe > (Xeon E5-2690 v4 2.60GHz): > >

Re: [ovs-dev] [PATCH 2/2] netdev-afxdp: Add need_wakeup supprt.

2019-09-04 Thread William Tu
On Wed, Sep 4, 2019 at 7:27 AM Ilya Maximets wrote: > > On 04.09.2019 17:04, William Tu wrote: > > Hi Ilya, > > > > Thanks for the feedback. > > > > On Wed, Sep 4, 2019 at 5:19 AM Ilya Maximets wrote: > >> > >> Hi William, > >>

Re: [ovs-dev] [PATCH 2/2] netdev-afxdp: Add need_wakeup supprt.

2019-09-04 Thread William Tu
disable it. > > Some comments inline. > > Best regards, Ilya Maximets. > > On 27.08.2019 2:02, William Tu wrote: > > The patch adds support for using need_wakeup flag in AF_XDP rings. > > When this flag is used, it means that OVS has to explicitly wake > &g

  1   2   3   4   5   6   >