Re: [ovs-dev] [PATCH v2] userspace: Enable non-bridge port as tunnel endpoint.

2019-08-27 Thread Yifeng Sun
Hi Ben, Could you please take a look at this patch if you have time? Thanks. Yifeng On Thu, Jul 18, 2019 at 1:07 PM Yifeng Sun wrote: > > For userspace datapath, currently only the bridge itself, the LOCAL port, > can be the tunnel endpoint to encap/decap tunnel packets. This patch

[ovs-dev] [PATCH v3] userspace: Enable non-bridge port as tunnel endpoint.

2019-08-28 Thread Yifeng Sun
Signed-off-by: Yifeng Sun --- v1->v2: Fixed an error pointed out by Ben. v2->v3: Fixed a test failure, thanks Ben for review and testing! ofproto/ofproto-dpif-xlate.c | 56 +++- tests/packet-type-aware.at | 1 - tests/tunnel-push

Re: [ovs-dev] [PATCH v3] userspace: Enable non-bridge port as tunnel endpoint.

2019-08-29 Thread Yifeng Sun
Thanks Ben and Darrell, let me check it out. On Wed, Aug 28, 2019 at 12:46 PM Darrell Ball wrote: > > Thanks for the patch > > How about writing a system test ? > > Darrell > > On Wed, Aug 28, 2019 at 10:50 AM Yifeng Sun wrote: >> >> For userspace datapa

Re: [ovs-dev] [PATCH v3] datapath: compat: Backports bugfixes for nf_conncount

2019-08-29 Thread Yifeng Sun
Thanks Yi-Hung for the explanation. On Wed, Aug 28, 2019 at 4:49 PM Yi-Hung Wei wrote: > > On Wed, Aug 28, 2019 at 4:07 PM Ben Pfaff wrote: > > > > On Wed, Aug 07, 2019 at 03:25:33PM -0700, Yifeng Sun wrote: > > > This patch backports several critical bug fixes relate

Re: [ovs-dev] [PATCH] rhel: Fix ovs-kmod-manage.sh to work with RHEL 7.3

2019-08-29 Thread Yifeng Sun
Looks good to me, thanks. Reviewed-by: Yifeng Sun On Thu, Aug 29, 2019 at 11:57 AM Greg Rose wrote: > > Add case for RHEL 7.3. This also fixes commit 22abff2 where I forgot to > update the comp_ver variable for RHEL 7.5 and while I was in there I > updated comp_ver for the R

[ovs-dev] [PATCH v4] userspace: Enable non-bridge port as tunnel endpoint.

2019-09-05 Thread Yifeng Sun
o-authored-by: William Tu Signed-off-by: Yifeng Sun --- v1->v2: Fixed an error pointed out by Ben. v2->v3: Fixed a test failure, thanks Ben for review and testing! v3->v4: When creating v3, a code rebase lead to test number change and we tested the wrong test. Thanks Ben for catching it. In a

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

2019-09-11 Thread Yifeng Sun
conntrack data is uninitialized. Signed-off-by: Yifeng Sun --- lib/conntrack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/conntrack.c b/lib/conntrack.c index e5266e579452..86c16b2fbe77 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -1138,7 +1138,8

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

2019-09-11 Thread Yifeng Sun
be finally freed even if there is a resolving error. This patch fixes it. Signed-off-by: Yifeng Sun --- lib/dns-resolve.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dns-resolve.c b/lib/dns-resolve.c index e98e65f493ed..1ff58960fe01 100644 --- a/lib/dns-resolve.c +++ b/lib/dns-resolve.c

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

2019-09-11 Thread Yifeng Sun
:282) This patch fixes it. Signed-off-by: Yifeng Sun --- ovsdb/ovsdb-client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c index 9ae15e557661..bfc90e6f7f85 100644 --- a/ovsdb/ovsdb-client.c +++ b/ovsdb/ovsdb-client.c @@ -1654,6 +1654,7

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

2019-09-11 Thread Yifeng Sun
(ovs-vswitchd.c:127) This patch fixes it. Signed-off-by: Yifeng Sun --- ofproto/ofproto-dpif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 46fa1357163b..7bb0f7bdb4f3 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c

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

2019-09-11 Thread Yifeng Sun
: ovsdb_datum_clone (ovsdb-data.c:1012) ==19252==by 0x4104D3: cmd_remove (db-ctl-base.c:1564) ==19252==by 0x406E2E: do_vsctl (ovs-vsctl.c:2626) ==19252==by 0x406E2E: main (ovs-vsctl.c:183) This patch fixes them. Signed-off-by: Yifeng Sun --- lib/db-ctl-base.c | 5 + 1 file changed, 5

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

2019-09-11 Thread Yifeng Sun
in odp_flow_key_from_flow__ without proper initialization. This patch fixes it. Signed-off-by: Yifeng Sun --- lib/dpif-netdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index a88a78f8a688..6be6e47ed127 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c

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

2019-09-11 Thread Yifeng Sun
) ==32205==by 0x407614: main (ovs-vswitchd.c:127) This is because 'xcache' was not destroyed properly. This patch fixes it. Signed-off-by: Yifeng Sun --- ofproto/ofproto-dpif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 751535249e21

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

2019-09-11 Thread Yifeng Sun
: ovsdb_storage_open__ (storage.c:81) ==29312==by 0x408FFC: open_db (ovsdb-server.c:642) ==29312==by 0x40657F: main (ovsdb-server.c:358) This patch fixes it. Signed-off-by: Yifeng Sun --- ovsdb/raft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovsdb/raft.c b/ovsdb/raft.c index 9eabe2cfeecd

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

2019-09-11 Thread Yifeng Sun
==by 0x406A6E: main_loop (ovsdb-server.c:209) ==10884==by 0x406A6E: main (ovsdb-server.c:460) 'new_schema' should also be freed when there is no error. This patch fixes it. Signed-off-by: Yifeng Sun --- ovsdb/trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovsdb

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

2019-09-11 Thread Yifeng Sun
) ==19220==by 0x465DF6: parse_ofp_flow_mod_file (ofp-flow.c:1876) ==19220==by 0x410BA3: ofctl_flow_mod_file.isra.19 (ovs-ofctl.c:1773) ==19220==by 0x417933: ovs_cmdl_run_command__ (command-line.c:223) ==19220==by 0x406F68: main (ovs-ofctl.c:179) This patch fixes it. Signed-off-by: Yifeng

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

2019-09-13 Thread Yifeng Sun
I can handle that in separate patch. Else, acked by for the series. > Acked-by: Aliasgar Ginwala > > On Wed, Sep 11, 2019 at 2:19 PM Yifeng Sun wrote: >> >> Valgrind reported: >> >> 1925: schema conversion online - standalone >> >> ==10884== 689 (56 direct

Re: [ovs-dev] [PATCH] faq: Update list of kernels supported by 2.12.

2019-09-06 Thread Yifeng Sun
Looks good to me, thanks. Reviewed-by: Yifeng Sun On Fri, Sep 6, 2019 at 4:33 PM Justin Pettit wrote: > > Signed-off-by: Justin Pettit > --- > Documentation/faq/releases.rst | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/faq/releases.rs

Re: [ovs-dev] [PATCH 2/2] db-ctl-base: Give better error messages for ambiguous abbreviations.

2019-09-18 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Wed, Sep 18, 2019 at 9:32 AM Ben Pfaff wrote: > > Tables and columns may be abbreviated to unique prefixes, but until now > the error messages have just said there's more than one match. This commit > makes the error messages list the p

Re: [ovs-dev] [PATCH 1/2] sset: New function sset_join().

2019-09-18 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Wed, Sep 18, 2019 at 9:31 AM Ben Pfaff wrote: > > This will acquire its first user in an upcoming commit. > > This function follows the pattern set by svec_join(). > > Signed-off-by: Ben Pfaff > -

Re: [ovs-dev] [PATCH] netdev-offload-dpdk : add ipv6 rte flow item support

2019-09-13 Thread Yifeng Sun
Hi Timo, Please try to format your patch in raw text. Thanks, Yifeng On Wed, Sep 11, 2019 at 7:55 PM Timo_Liu wrote: > > > > Nowadays some Nics support hw offloading via dpdk rte_flow lib. Many > layer2-layer4 fields can be offloaded to nics, including smac/dmac ipv4 > sip/dip etc. Also some

[ovs-dev] [PATCH v3] datapath: compat: Backports bugfixes for nf_conncount

2019-08-07 Thread Yifeng Sun
If kernel already has these fixes, then kernel's nf_conncount is being used. Otherwise, OVS falls back to use compat nf_conncount functions. Travis tests are at https://travis-ci.org/yifsun/ovs-travis/builds/569056850 On latest RHEL kernel, 'make check-kmod' runs good. VMware-BZ: #2396471 Signe

Re: [ovs-dev] [PATCH v2] datapath: compat: Backports bugfixes for nf_conncount

2019-08-07 Thread Yifeng Sun
Thanks YiHung for reviewing. I've sent out a new version. Best, Yifeng On Wed, Aug 7, 2019 at 10:24 AM Yi-Hung Wei wrote: > > On Tue, Aug 6, 2019 at 5:06 PM Yifeng Sun wrote: > > > > This patch backports several critical bug fixes related to > > locking and data con

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

2019-07-29 Thread Yifeng Sun
Thanks for this patch. Worked on this leak before but didn't find the fix. Tested-by: Yifeng Sun Reviewed-by: Yifeng Sun On Fri, Jul 26, 2019 at 1:11 AM Damijan Skvarc wrote: > > > While checking valgrind reports after running "make check-valgrind" I have > noticed

[ovs-dev] [PATCH] datapath: compat: Backports bugfixes for nf_conncount

2019-08-06 Thread Yifeng Sun
stead of spin_lock") VMware-BZ: #2396471 CC: Taehee Yoo Signed-off-by: Yifeng Sun --- datapath/linux/compat/nf_conncount.c | 54 ++-- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/datapath/linux/compat/nf_conncount.c b/datapath/linux/comp

[ovs-dev] [PATCH v2] datapath: compat: Backports bugfixes for nf_conncount

2019-08-06 Thread Yifeng Sun
corruption in conn_free") fd3e71a ("netfilter: nf_conncount: use spin_lock_bh instead of spin_lock") This patch also added additional compat code so that it can build on all supported kernel versions. Travis tests are at https://travis-ci.org/yifsun/ovs-travis/builds/568603796 VM

[ovs-dev] [PATCH] datapath: Apply bug fixes of nf_conncount for different kernel versions

2019-08-06 Thread Yifeng Sun
ung Wei. Signed-off-by: Yifeng Sun --- acinclude.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index f8e856d3303f..f0e38898b17a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -713,7 +713,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELS

[ovs-dev] [PATCH] userspace: Enable non-bridge port as tunnel endpoint.

2019-07-16 Thread Yifeng Sun
as the tunnel endpoint. Signed-off-by: Yifeng Sun Signed-off-by: William Tu --- ofproto/ofproto-dpif-xlate.c | 56 ++-- tests/tunnel-push-pop.at | 55 +++ 2 files changed, 104 insertions(+), 7 deletions(-) diff

[ovs-dev] [PATCH v2] userspace: Enable non-bridge port as tunnel endpoint.

2019-07-18 Thread Yifeng Sun
as the tunnel endpoint. Signed-off-by: William Tu Co-authored-by: William Tu Signed-off-by: Yifeng Sun --- v1->v2: Fixed an error pointed out by Ben. ofproto/ofproto-dpif-xlate.c | 56 +++- tests/tunnel-push-pop.at |

[ovs-dev] [PATCH] datapath: Print friendly error message when conntrack fails to init

2019-07-18 Thread Yifeng Sun
On 4.14 kernels, if kernel isn't configured with CONFIG_NF_CONNTRACK_IPV4 and CONFIG_NF_CONNTRACK_IPV6, openvswitch module will fail to load. The error message is "openvswitch: failed to init nf_conncount -91". This patch prints helpful error message for this case. Signed-off-by:

Re: [ovs-dev] [PATCH] datapath: Print friendly error message when conntrack fails to init

2019-07-19 Thread Yifeng Sun
Ok, I will do that. Thanks for reviewing. Yifeng On Fri, Jul 19, 2019 at 9:10 AM Gregory Rose wrote: > > On 7/18/2019 6:43 PM, Yifeng Sun wrote: > > On 4.14 kernels, if kernel isn't configured with CONFIG_NF_CONNTRACK_IPV4 > > and CONFIG_NF_CONNTRACK_IPV6, openvswitch module

Re: [ovs-dev] [PATCH v3] datapath: compat: Backports bugfixes for nf_conncount

2019-09-23 Thread Yifeng Sun
Hi Ben, Could you please backport this patch to 2.12? Thanks. Yifeng On Thu, Aug 29, 2019 at 8:39 AM Yifeng Sun wrote: > > Thanks Yi-Hung for the explanation. > > On Wed, Aug 28, 2019 at 4:49 PM Yi-Hung Wei wrote: > > > > On Wed, Aug 28, 2019 at 4:07 PM Ben Pfaff w

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

2019-11-18 Thread Yifeng Sun
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 openvswitch-kmod RPM installed. This patch fixes it. VMWare-BZ: #2257534 Signed-off-by: Yifeng Sun --- rhel

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

2019-11-18 Thread Yifeng Sun
build with mulitple versions, fedora") Signed-off-by: Yifeng Sun --- v1->v2: Added fix tag, thanks YiHung. rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-mana

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

2019-11-18 Thread Yifeng Sun
Will do, thanks! On Mon, Nov 18, 2019 at 11:35 AM Yi-Hung Wei wrote: > > On Mon, Nov 18, 2019 at 11:24 AM 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 i

Re: [ovs-dev] [PATCH] rhel: Support RHEL 7.8 kernel module rpm build

2019-12-06 Thread Yifeng Sun
Looks good to me, thanks YiHung. Reviewed-by: Yifeng Sun On Wed, Dec 4, 2019 at 5:22 PM Yi-Hung Wei wrote: > > This patch supports RHEL 7.8 kernel module rpm package building. > > $ make rpm-fedora-kmod \ > RPMBUILD_OPT='-D "kversion 3.10.0-1101.el7.x86_64"' >

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

2019-10-16 Thread Yifeng Sun
LGTM, thanks Greg. Reviewed-by: Yifeng Sun On Wed, Oct 16, 2019 at 1:21 PM Greg Rose wrote: > > In commit 057772cf2477 the function is missing the rpl_ prefix > and the define that replaces the original function should come > after the function definition. > > Fixes: 057

Re: [ovs-dev] [PATCH] rhel: Support RHEL7.7 build and packaging

2019-10-15 Thread Yifeng Sun
Hi Greg, Please try the following: # yum install scl-utils scl-utils-build # yum install rh-python36 # scl enable rh-python36 bash # pip install sphinx Thanks, Yifeng On Tue, Oct 15, 2019 at 12:28 PM Gregory Rose wrote: > > > On 10/11/2019 2:49 PM, Yifeng Sun wrote: > > This

Re: [ovs-dev] [PATCH] rhel: Support RHEL7.7 build and packaging

2019-10-15 Thread Yifeng Sun
Hi Greg, I added this repo: subscription-manager repos --enable rhel-server-rhscl-7-rpms Thanks, Yifeng On Tue, Oct 15, 2019 at 2:58 PM Gregory Rose wrote: > > > On 10/15/2019 2:27 PM, Yifeng Sun wrote: > > Hi Greg, > > > > Please try the following: > > >

Re: [ovs-dev] [PATCH v2 01/12] datapath: Fix linking without CONFIG_NF_CONNTRACK_LABELS

2019-10-15 Thread Yifeng Sun
LGTM. Reviewed-by: Yifeng Sun On Tue, Oct 15, 2019 at 10:40 AM Yi-Hung Wei wrote: > > From: Arnd Bergmann > > upstream commit: > commit a277d516de5f498c91d91189717ef7e01102ad27 > Author: Arnd Bergmann > Date: Fri Nov 2 16:36:55 2018 +0100 > > openv

Re: [ovs-dev] [PATCH] tests: Get rid of timeout options for control utilities.

2019-10-15 Thread Yifeng Sun
Looks good to me, thanks. Reviewed-by: Yifeng Sun On Tue, Oct 15, 2019 at 9:11 AM Ilya Maximets wrote: > > 'OVS_CTL_TIMEOUT' environment variable is exported in tests/atlocal.in > and controls timeouts for all OVS utilities in testsuite. > > There should be no manual tweaks

Re: [ovs-dev] [PATCH 03/11] datapath: add seqadj extension when NAT is used.

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:51 AM Yi-Hung Wei wrote: > > From: Flavio Leitner > > upstream patch: > > commit fa7e428c6b7ed3281610511a2b2ec716d9894be8 > Author: Flavio Leitner > Date: Mon Mar 25 15:58:31 2019 -0300 > &g

Re: [ovs-dev] [PATCH 02/11] datapath: Detect upstream nf_nat change

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:51 AM Yi-Hung Wei wrote: > > The following two upstream commits merge nf_nat_ipv4 and nf_nat_ipv6 > into nf_nat core, and move some header files around. To handle > these modifications, this patch detects the upst

Re: [ovs-dev] [PATCH 01/11] datapath: Replace nf_ct_invert_tuplepr() with nf_ct_invert_tuple()

2019-10-14 Thread Yifeng Sun
A minor issue in commit message: pl_nf_ct_invert_tuple => rpl_nf_ct_invert_tuple Other than that, LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:50 AM Yi-Hung Wei wrote: > > After upstream net-next commit 303e0c558959 ("netfilter: conntrack: &g

Re: [ovs-dev] [PATCH 05/11] datapath: Use nla_nest_start_noflag()

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:53 AM Yi-Hung Wei wrote: > > This patch backports the openvswitch changes and update the compat layer > for the following upstream patch. > > commit ae0be8de9a53cda3505865c11826d8ff0640237c > Author: Michal Kube

Re: [ovs-dev] [PATCH 04/11] datapath: Handle NF_NAT_NEEDED replacement

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:52 AM Yi-Hung Wei wrote: > > Starting from the following upstream commit, NF_NAT_NEEDED is replaced > by IS_ENABLED(CONFIG_NF_NAT) in the upstream kernel. This patch makes > some changes so that our in tree ovs k

Re: [ovs-dev] [PATCH 07/11] datapath: Load and reference the NAT helper.

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:54 AM Yi-Hung Wei wrote: > > This commit backports the following upstream commit, and two functions > in nf_conntrack_helper.h. > > Upstream commit: > commit fec9c271b8f1bde1086be5aa415cdb586e0dc800 > A

Re: [ovs-dev] [PATCH 06/11] datapath: genetlink: optionally validate strictly/dumps

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:53 AM Yi-Hung Wei wrote: > > This patch backports the following upstream commit within the > openvswitch kernel module with some checks so that it also works > in the older kernel. > > Upstrea

Re: [ovs-dev] [PATCH 10/11] datapath: Fix log message in ovs conntrack

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:55 AM Yi-Hung Wei wrote: > > Upstream commit: > commit 12c6bc38f99bb168b7f16bdb5e855a51a23ee9ec > Author: Yi-Hung Wei > Date: Wed Aug 21 17:16:10 2019 -0700 > > openvswitch: Fix log message in ovs co

Re: [ovs-dev] [PATCH 11/11] datapath: Allow attaching helper in later commit

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:56 AM Yi-Hung Wei wrote: > > Upstream commit: > commit 248d45f1e1934f7849fbdc35ef1e57151cf063eb > Author: Yi-Hung Wei > Date: Fri Oct 4 09:26:44 2019 -0700 > > openvswitch: Allow attaching h

Re: [ovs-dev] [PATCH 08/11] datapath: Check for null pointer return from nla_nest_start_noflag

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:54 AM Yi-Hung Wei wrote: > > From: Colin Ian King > > upstream commit: > > commit ca96534630e2edfd73121c487c957b17eca3b7d7 > Author: Colin Ian King > Date: Wed May 1 14:41:58 2019 +0100 > >

Re: [ovs-dev] [PATCH 09/11] datapath: Replace removed NF_NAT_NEEDED with IS_ENABLED(CONFIG_NF_NAT)

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 10:55 AM Yi-Hung Wei wrote: > > Backports the following upstream commit with some backward compatibility > change. > > commit f319ca6557c10a711facc4dd60197470796d3ec1 > Author: Geert Uytterhoeven > Date: We

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

2019-10-17 Thread Yifeng Sun
No problem, thanks! Yifeng On Thu, Oct 17, 2019 at 10:30 AM William Tu wrote: > > 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 Yi

Re: [ovs-dev] [PATCH] rhel: Support RHEL7.7 build and packaging

2019-12-02 Thread Yifeng Sun
Thanks Ben. Can you please backport this patch to 2.12? Yifeng On Thu, Oct 24, 2019 at 3:12 PM Ben Pfaff wrote: > > On Fri, Oct 11, 2019 at 02:49:14PM -0700, Yifeng Sun wrote: > > This patch provides essential fixes for OVS to support > > RHEL7.7's new kernel. > >

Re: [ovs-dev] [PATCH] rhel: Support RHEL7.7 build and packaging

2019-12-02 Thread Yifeng Sun
Thanks. On Mon, Dec 2, 2019 at 10:42 AM Ben Pfaff wrote: > > Done. > > On Mon, Dec 02, 2019 at 09:15:03AM -0800, Yifeng Sun wrote: > > Thanks Ben. Can you please backport this patch to 2.12? > > > > Yifeng > > > > On Thu, Oct 24, 2019 at 3:12 PM Ben Pfaf

Re: [ovs-dev] [PATCH] acinclude: Fix false positive search for prandom_u32

2019-10-08 Thread Yifeng Sun
LGTM, thanks Greg for the fix. Reviewed-by: Yifeng Sun On Tue, Oct 8, 2019 at 9:21 AM Greg Rose wrote: > > Searching random.h for prandom_u32 will also match when prandom_u32_max > is present and cause a false positive HAVE_PRANDOM_U32. Fix this up > by looking for the parenthes

[ovs-dev] [PATCH] rhel: Support RHEL7.7 build and packaging

2019-10-11 Thread Yifeng Sun
This patch provides essential fixes for OVS to support RHEL7.7's new kernel. make rpm-fedora-kmod \ RPMBUILD_OPT='-D "kversion 3.10.0-1062.1.2.el7.x86_64"' Signed-off-by: Yifeng Sun --- rhel/openvswitch-kmod-fedora.spec.in | 9 + rhel/usr_share_openvswitch_s

[ovs-dev] [PATCH] dpif-netlink: Free leaked nl_sock

2019-10-11 Thread Yifeng Sun
) This leak is because when vport_add_channel() returns 0, it is expected to take the ownership of 'socksp'. This patch fixes this issue. Signed-off-by: Yifeng Sun --- lib/dpif-netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c index ceb39cde1ab1

Re: [ovs-dev] [PATCH] dpif-netlink: Fix some variable naming.

2019-10-14 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Mon, Oct 14, 2019 at 11:28 AM Ben Pfaff wrote: > > Usually a plural name refers to an array, but 'socks' and 'socksp' were > only single objects, so this changes their names to 'sock' and 'sockp'. > > Usually a 'p' suffix means

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

2019-12-20 Thread Yifeng Sun
This seems to be related to netdev-afxdp's batch size bigger than kernel's xdp batch size. I created a patch to fix it. https://patchwork.ozlabs.org/patch/1214397/ Could anyone take a look at this patch? Thanks, Yifeng On Fri, Nov 22, 2019 at 9:52 AM William Tu wrote: > > Hi Ilya and Eelco, >

[ovs-dev] [PATCH] afxdp: Reduce afxdp's batch size to match kernel's xdp batch size

2019-12-20 Thread Yifeng Sun
://mail.openvswitch.org/pipermail/ovs-dev/2019-November/365076.html Signed-off-by: Yifeng Sun --- lib/netdev-afxdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-afxdp.c b/lib/netdev-afxdp.c index 58365ed483e3..38bbbeb055cc 100644 --- a/lib/netdev-afxdp.c +++ b/lib/netdev-afxdp.c

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-27 Thread Yifeng Sun
Hi Flavio, I am testing your patch using iperf between 2 VMs on the same host. But it seems that TCP connection can't be created between these 2 VMs. When inspecting further, I found that TCP packets have invalid checksums. This might be the reason. I am wondering if I missed something in the

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-29 Thread Yifeng Sun
-offload: off [fixed] rx-udp_tunnel-port-offload: off [fixed] Thanks, Yifeng On Wed, Jan 29, 2020 at 4:07 AM Ilya Maximets wrote: > > On 29.01.2020 12:25, Flavio Leitner wrote: > > On Tue, Jan 28, 2020 at 03:23:02PM -0800, Yifeng Sun wrote: > >> Sure. > >> > >>

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-29 Thread Yifeng Sun
29, 2020 at 3:25 AM Flavio Leitner wrote: > > On Tue, Jan 28, 2020 at 03:23:02PM -0800, Yifeng Sun wrote: > > Sure. > > > > Firstly, make sure userspace-tso-enable is true > > # ovs-vsctl get Open_vSwitch . other_config > > {dpdk-init="true"

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-27 Thread Yifeng Sun
this packet because it contains invalid checksum. This is what happened when I tried this patch. Best, Yifeng On Mon, Jan 27, 2020 at 12:09 PM Ilya Maximets wrote: > > On 27.01.2020 18:24, Yifeng Sun wrote: > > Hi Flavio, > > > > I am testing your patch using iperf betwee

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-28 Thread Yifeng Sun
On Tue, Jan 28, 2020 at 4:00 AM Flavio Leitner wrote: > > On Mon, Jan 27, 2020 at 05:17:01PM -0800, Yifeng Sun wrote: > > Hi Ilya, > > > > Thanks for your reply. > > > > The thing is, if checksum offloading is enabled in both VMs, then > > sender VM will s

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-29 Thread Yifeng Sun
ts will be appreciated! Thanks a lot, Yifeng On Wed, Jan 29, 2020 at 1:21 PM Flavio Leitner wrote: > > On Wed, Jan 29, 2020 at 11:19:47AM -0800, William Tu wrote: > > On Wed, Jan 29, 2020 at 3:25 AM Flavio Leitner wrote: > > > > > > On Tue, Jan 28, 2020

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-29 Thread Yifeng Sun
Got it. Thanks. Yifeng On Wed, Jan 29, 2020 at 3:04 PM Flavio Leitner wrote: > > On Wed, Jan 29, 2020 at 02:42:27PM -0800, Yifeng Sun wrote: > > Hi Flavio, > > Hi Yifend, thanks for looking into this. > > > I found this piece of code in kernel's drivers/net/virtio

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-01-28 Thread Yifeng Sun
it(skb, IPPROTO_TCP, inet_compute_pseudo)) + if (skb_checksum_init(skb, IPPROTO_TCP, inet_compute_pseudo)) static inline bool tcp_checksum_complete(struct sk_buff *skb) { return 0; } Best, Yifeng On Tue, Jan 28, 2020 at 2:52 PM Flavio Leitner wrote: > > On Tue, Jan 28, 2020 at 02:21:30PM -0800, Y

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-02-14 Thread Yifeng Sun
9, 2020 at 09:04:39AM -0800, Yifeng Sun wrote: > > Hi Flavio, > > > > Sorry in my last email, one change is incorrect. it should be: > > in tcp_v4_rcv() > > - if (skb_checksum_init(skb, IPPROTO_TCP, inet_compute_pseudo)) > > + if (0) > > >

Re: [ovs-dev] [PATCH v4 0/3] Add support for TSO with DPDK

2020-02-14 Thread Yifeng Sun
Got it, thanks! Yifeng On Fri, Feb 14, 2020 at 11:29 AM Flavio Leitner wrote: > > On Fri, Feb 14, 2020 at 09:44:52AM -0800, Yifeng Sun wrote: > > Hi Flavio, > > > > Can you please confirm the kernel versions you are using? > > > > Host KVM: 5.2.14-200.fc30.x

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

2019-12-23 Thread Yifeng Sun
/sec Thanks, Yifeng On Sun, Dec 22, 2019 at 4:40 PM Yi Yang (杨燚)-云服务集团 wrote: > > Hi, Yifeng > > I'll try it again. By the way, did you try af_packet for veth in OVS DPDK? In > my machine it can reach 4Gbps, do you think af_xdp can reach this number? > > -邮件原件--

Re: [ovs-dev] [PATCH v2 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-04-08 Thread Yifeng Sun
ofproto_get_tun_tab() calls ovsrcu_get(). This ensures our reading of tun_table is safe before quiesce state. On Wed, Apr 8, 2020 at 8:36 AM William Tu wrote: > On Wed, Apr 8, 2020 at 8:16 AM Yifeng Sun wrote: > > > > ovsrcu_set() is not necessary here because frozen_flow is on

Re: [ovs-dev] [PATCH v2 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-04-08 Thread Yifeng Sun
ovsrcu_set() is not necessary here because frozen_flow is on stack. On Wed, Apr 8, 2020 at 6:48 AM William Tu wrote: > On Tue, Apr 07, 2020 at 02:57:03PM -0700, Yi-Hung Wei wrote: > > On Tue, Apr 7, 2020 at 2:50 PM Yifeng Sun > wrote: > > > > > > Tun_met

[ovs-dev] [PATCH v3 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-04-09 Thread Yifeng Sun
-xlate: Fix segmentation fault caused by tun_table) VMware-BZ: #2526222 Signed-off-by: Yifeng Sun --- v1->v2: Drop the fix based on reference count. It doesn't fit well with RCU mechanism. Thanks William and YiHung for the offline discussion. v2->v3: frozen_metadata_to_flow() looks up and a

[ovs-dev] [PATCH v3 2/2] system-traffic: Check frozen state handling with TLV map change

2020-04-09 Thread Yifeng Sun
and triggers the core dump. Signed-off-by: Yi-Hung Wei Signed-off-by: Yifeng Sun Co-authored-by: Yi-Hung Wei --- v1-v2: Improve the test based on William's review, thanks. tests/system-traffic.at | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/system-traffic.at b/tests/system

Re: [ovs-dev] [PATCH] ofp-actions: Fix memory leak on error path.

2020-04-13 Thread Yifeng Sun
Looks good to me, thanks. Reviewed-by: Yifeng Sun On Mon, Apr 13, 2020 at 8:43 AM William Tu wrote: > Need to free the memory before return. Detected by gcc10. > > Signed-off-by: William Tu > --- > lib/ofp-actions.c | 1 + > 1 file changed, 1 insertion(+) > > diff -

Re: [ovs-dev] [PATCH V2] compat: Fix broken partial backport of extack op parameter

2020-04-14 Thread Yifeng Sun
LGTM, thanks Greg. Reviewed-by: Yifeng Sun On Tue, Apr 14, 2020 at 11:42 AM Greg Rose wrote: > A series of commits added support for the extended ack > parameter to the newlink, changelink and validate ops in > the rtnl_link_ops structure: > a8b8a889e369d ("net: add netlink

Re: [ovs-dev] [PATCHv3] fatal-signal: Remove snprintf.

2020-04-14 Thread Yifeng Sun
Thanks for fixing gcc10, looks good to me. Tested-by: Yifeng Sun Reviewed-by: Yifeng Sun On Tue, Apr 14, 2020 at 8:17 AM William Tu wrote: > Function snprintf is not async-signal-safe. Replace it with > our own implementation. Example ovs-vswitchd.log output: > 2020-03-25T01:0

Re: [ovs-dev] [PATCH v2 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-04-07 Thread Yifeng Sun
Thanks Yi-Hung. I like this idea. The code will be cleaner. Ben, could you give some suggestion? Thanks, Yifeng On Tue, Apr 7, 2020 at 2:57 PM Yi-Hung Wei wrote: > On Tue, Apr 7, 2020 at 2:50 PM Yifeng Sun wrote: > > > > Tun_metadata can be referened by flow and frozen_st

Re: [ovs-dev] [PATCH 2/2] system-traffic: Check frozen state handling with TLV map change

2020-04-07 Thread Yifeng Sun
Thanks William for the comments. I will submit a new version. Yifeng On Mon, Apr 6, 2020 at 8:56 AM William Tu wrote: > On Mon, Apr 6, 2020 at 8:29 AM William Tu wrote: > > > > Hi Yifeng, > > > > Thanks for the patch, I can reproduce the issue using > > $ make check-system-userspace

[ovs-dev] [PATCH v2 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-04-07 Thread Yifeng Sun
-xlate: Fix segmentation fault caused by tun_table) VMware-BZ: #2526222 Signed-off-by: Yifeng Sun --- v1->v2: Drop the fix based on reference count. It doesn't fit well with RCU mechanism. Thanks William and YiHung for the offline discussion. ofproto/ofproto-dpif-rid.h| 7 +++ ofpr

[ovs-dev] [PATCH v2 2/2] system-traffic: Check frozen state handling with TLV map change

2020-04-07 Thread Yifeng Sun
and triggers the core dump. Signed-off-by: Yi-Hung Wei Signed-off-by: Yifeng Sun Co-authored-by: Yi-Hung Wei --- v1-v2: Improve the test based on William's review, thanks. tests/system-traffic.at | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/system-traffic.at b/tests/system

Re: [ovs-dev] [PATCH 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-04-07 Thread Yifeng Sun
Mar 26, 2020 at 12:58:21PM -0700, Yifeng Sun wrote: > > Tun_metadata can be referened by flow and frozen_state at the same > > time. When ovs-vswitchd handles TLV table mod message, the involved > > tun_metadata gets freed. The call trace to free tun_metadata is > > shown

Re: [ovs-dev] [PATCHv2] fatal-signal: Remove snprintf.

2020-04-13 Thread Yifeng Sun
Thanks, looks good to me. Tested-by: Yifeng Sun Reviewed-by: Yifeng Sun On Wed, Mar 25, 2020 at 11:51 AM William Tu wrote: > Function snprintf is not async-signal-safe. Replace it with > our own implementation. Example ovs-vswitchd.log output: > 2020-03-25T01:08:19.673Z|000

[ovs-dev] [PATCH 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-03-26 Thread Yifeng Sun
is decreased at deallocation. In present code, pointer of tun_metadata can be passed between flows. It is safe because of RCU mechanism. VMware-BZ: #2526222 Signed-off-by: Yifeng Sun --- lib/tun-metadata.c | 29 - lib/tun-metadata.h | 2 ++ ofproto

[ovs-dev] [PATCH 2/2] system-traffic: Check frozen state handling with TLV map change

2020-03-26 Thread Yifeng Sun
and triggers the core dump. Signed-off-by: Yi-Hung Wei Signed-off-by: Yifeng Sun Co-authored-by: Yi-Hung Wei --- tests/system-traffic.at | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/system-traffic.at b/tests/system-traffic.at index 4a39c929c207..992de8546c41 100644

Re: [ovs-dev] [PATCH 1/2] tun_metadata: Fix coredump caused by use-after-free bug

2020-03-30 Thread Yifeng Sun
Thanks Tonghao. tun_metadata_ref/unref follows the practice of ovs_refcount_ref/unref. In this patch, we need return value of tun_metadata_unref to decide the way to free it. Thanks, Yifeng On Fri, Mar 27, 2020 at 2:45 AM Tonghao Zhang wrote: > > On Fri, Mar 27, 2020 at 3:58 AM Yife

[ovs-dev] [PATCH] rhel: Support RHEL8.0 build and packaging

2020-04-27 Thread Yifeng Sun
This patch provides essential fixes for OVS to build and package on RHEL8.0. The required package python3-sphinx can be installed by: $ ARCH=$( /bin/arch ) $ subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms" $ yum install python3-sphinx Signed-off-by:

Re: [ovs-dev] [PATCH 2/2] oss-fuzz: Fix miniflow_target.c.

2020-05-12 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Tue, May 12, 2020 at 8:23 AM William Tu wrote: > Clang reports: > tests/oss-fuzz/miniflow_target.c:209:26: error: suggest braces around \ > initialization of subobject > [-Werror,-Wmissing-braces] > struct flow flow2

Re: [ovs-dev] [PATCHv2] ovsdb-idl: Fix NULL deref reported by Coverity.

2020-05-18 Thread Yifeng Sun
Thanks William. Reviewed-by: Yifeng Sun On Fri, May 15, 2020 at 6:47 AM William Tu wrote: > When 'datum.values' or 'datum.keys' is NULL, some code path calling > into ovsdb_idl_txn_write__ triggers NULL deref. > > An example: > ovsrec_open_vswitch_set_cur_cfg(const struct ovsr

Re: [ovs-dev] [PATCH 3/3] ovsdb-idl: Fix NULL deref reported by Coverity.

2020-05-09 Thread Yifeng Sun
; +} if (ovsdb_atom_needs_destruction(type)) { Reviewed-by: Yifeng Sun Yifeng On Sat, May 2, 2020 at 10:29 AM William Tu wrote: > When 'datum.values' or 'datum.keys' is NULL, some code path calling > into ovsdb_idl_txn_write__ triggers NULL deref. An example is below: > > ovsrec_open_vswitch_set_c

Re: [ovs-dev] [PATCH 1/3] ovsdb-idlc: Fix memory leak reported by Coverity.

2020-05-09 Thread Yifeng Sun
Looks good to me, thanks. Reviewed-by: Yifeng Sun On Sat, May 2, 2020 at 10:29 AM William Tu wrote: > Coverity shows the following memory leak in this code pattern: > > void > ovsrec_ipfix_index_set_obs_domain_id( > { > struct ovsdb_datum datum; > // 1. alloc_fn

Re: [ovs-dev] [PATCH 2/3] ovsdb-idlc: Fix memory leak reported by Coverity.

2020-05-09 Thread Yifeng Sun
Looks good to me, thanks. Reviewed-by: Yifeng Sun On Sat, May 2, 2020 at 10:29 AM William Tu wrote: > An exmplae pattern shown below: > void > ovsrec_ct_zone_index_set_external_ids(const struct ovsrec_ct_zone... > { > // 1. alloc_fn: Storage is returned from allocation f

Re: [ovs-dev] [PATCH 05/23] datapath: Print error when ovs_execute_actions() fails

2020-08-20 Thread Yifeng Sun
LGTM, thanks. Reviewed-by: Yifeng Sun On Thu, Aug 20, 2020 at 3:50 PM Greg Rose wrote: > From: Yifeng Sun > > Upstream commit: > commit aa733660dbd8d9192b8c528ae0f4b84f3fef74e4 > Author: Yifeng Sun > Date: Sun Aug 4 19:56:11 2019 -0700 > > openv

Re: [ovs-dev] [PATCH v1 1/1] dns-resolve: Allow unbound's config file to be set through an env var.

2020-09-28 Thread Yifeng Sun
Hi Ted, There seems some indent issue with the next to last '}', can you take a look? Thanks, Yifeng On Tue, Sep 8, 2020 at 8:33 PM Ted Elhourani wrote: > When an unbound context is created, check whether OVS_UNBOUND_CONF has been > set. If a valid config file is supplied then use it to

Re: [ovs-dev] [PATCH v1 1/1] dns-resolve: Allow unbound's config file to be set through an env var.

2020-09-28 Thread Yifeng Sun
Looks good to me, thanks. Reviewed-by: Yifeng Sun On Mon, Sep 28, 2020 at 11:54 AM Ted Elhourani wrote: > When an unbound context is created, check whether OVS_UNBOUND_CONF has been > set. If a valid config file is supplied then use it to configure the > context. The procedur

[ovs-dev] [PATCH v2] bfd: Support overlay BFD

2020-07-22 Thread Yifeng Sun
for forwarding. This patch adds new test to validate BFD overlay. This patch keeps BFD's backward compatibility. Signed-off-by: Yifeng Sun --- v1->v2: Add test by William's suggestion. lib/bfd.c | 16 +--- tests/system-traffic.at |

[ovs-dev] [PATCH] bfd: Support overlay BFD

2020-06-24 Thread Yifeng Sun
for forwarding. This patch keeps BFD's backward compatibility. Signed-off-by: Yifeng Sun --- lib/bfd.c| 16 +--- vswitchd/vswitch.xml | 7 +++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/bfd.c b/lib/bfd.c index cc8c6857afa4..3c965699ace3 100644

Re: [ovs-dev] [PATCH] bfd: Support overlay BFD

2020-06-27 Thread Yifeng Sun
Thanks for the review. Please check my inline comments. Will fix them in v2. Yifeng On Sat, Jun 27, 2020 at 3:07 PM William Tu wrote: > Thanks for the patch. > > On Wed, Jun 24, 2020 at 1:58 PM Yifeng Sun wrote: > > > > Current OVS intercepts and processes all BFD

<    1   2   3   4   5   6   >