Re: [ovs-dev] [PATCH net v2 1/1] openvswitch: Fix setting ipv6 fields causing hw csum failure

2022-02-14 Thread Jakub Kicinski
On Mon, 14 Feb 2022 14:48:51 +0200 Paul Blakey wrote: > Ipv6 ttl, label and tos fields are modified without first > pulling/pushing the ipv6 header, which would have updated > the hw csum (if available). This might cause csum validation > when sending the packet to the stack, as can be seen in >

[ovs-dev] [PATCH v5 2/2] ofproto-dpif: avoid unneccesary backer revalidation

2022-02-14 Thread lic121
If lldp didn't change, we are not supposed to trigger backer revalidation. Without this patch, bridge_reconfigure() always trigger udpif revalidator because of lldp. This patch also fix lldp memory leak bug: lldp_create() malloc memory for lldp->lldpd->g_hardware. lldp_unref is supposed to free

[ovs-dev] [PATCH v5 1/2] ofproto-dpif: trigger revalidation when ipfix config set

2022-02-14 Thread lic121
Currently, ipfix conf creation/deletion don't trigger dpif backer revalidation. This is not expected, as we need the revalidation to commit ipfix into xlate. So that xlate can generate ipfix actions. This patch covers only new creation/deletion of ipfix config. Will upload one more patch to cover

[ovs-dev] [PATCH v5 0/2] fix dpif backer revalidation

2022-02-14 Thread lic121
v5: - merge patch #2 and patch #3 to retrigger CI, as it could be failed by anccident. v4: - fix lldp memory leak - add '!smap_is_empty(cfg)' condition v3: - fix lldp test case failure v2: - add TODO comments to clear ipfix patch coverage - test lldp enabling more than pointer - add test

Re: [ovs-dev] [PATCH ovn 12/15] Introduce LSP:options:requested-additional-chassis

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Ihar Hrachyshka, 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: -e 's,[@]PKIDIR[@],/usr/local/var/lib/openvswitch/pki,g' \ -e

[ovs-dev] [PATCH ovn 13/15] Clone packets to both port chassis

2022-02-14 Thread Ihar Hrachyshka
When requested-additional-chassis is set, port binding is configured in two cluster locations. In case of live migration scenario, only one of the locations run a workload at a particular point in time. Yet, it's expected that the workload may switch to running at the additional-chassis at any

[ovs-dev] [PATCH ovn 15/15] Implement RARP activation strategy for ports

2022-02-14 Thread Ihar Hrachyshka
When options:activation-strategy is set to "rarp" for LSP, when used in combination with options:requested-additional-chassis, the additional chassis will install special flows that would block all ingress and egress traffic for the port until a special activation event happens. For "rarp"

[ovs-dev] [PATCH ovn 12/15] Introduce LSP:options:requested-additional-chassis

2022-02-14 Thread Ihar Hrachyshka
If used in conjunction with requested-chassis, OVN will attempt to bind the port at another location in addition to the main chassis. This is useful in live migration scenarios where it's important to prepare the environment for workloads to move to, avoiding costly flow configuration at the

[ovs-dev] [PATCH ovn 11/15] Update port-up on main chassis only

2022-02-14 Thread Ihar Hrachyshka
In a future patch, there will be a scenario where the same port has attachments at multiple (specifically, 2) chassis, so make sure that 'up' property is updated by the main chassis only. Signed-off-by: Ihar Hrachyshka --- controller/binding.c| 10 +++--- controller/binding.h

[ovs-dev] [PATCH ovn 14/15] Enforce tunneling when additional-chassis is set

2022-02-14 Thread Ihar Hrachyshka
When additional-chassis is set, we cannot guarantee the upstream switch to deliver a unicast packet sent through a localnet port to both port chassis locations (pb->chassis and pb->additional_chassis). To deliver packets to both locations, switch to tunneling. Signed-off-by: Ihar Hrachyshka ---

[ovs-dev] [PATCH ovn 06/15] Pass chassis and encap into get_port_binding_tun

2022-02-14 Thread Ihar Hrachyshka
Next patches will need the same functionality while passing a different chassis / encap configuration that is not the primary for a port binding. Signed-off-by: Ihar Hrachyshka --- controller/physical.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

[ovs-dev] [PATCH ovn 10/15] Tag all packets that arrived from a tunnel as LOCAL_ONLY

2022-02-14 Thread Ihar Hrachyshka
A next patch may need to clone packets to another chassis as part of "port migration" procedure, but only if they haven't originated at another chassis. This LOCAL_ONLY tag will enforce the requirement. Signed-off-by: Ihar Hrachyshka --- controller/physical.c | 1 + 1 file changed, 1

[ovs-dev] [PATCH ovn 07/15] Introduce match_outport_dp_and_port_keys in physical.c

2022-02-14 Thread Ihar Hrachyshka
This helper prepares a 'match' struct to match against a datapath and a port key. All existing spots in the file that use such a 'match' struct were updated. It will also be reused later. Signed-off-by: Ihar Hrachyshka --- controller/physical.c | 65 +++

[ovs-dev] [PATCH ovn 08/15] Split code to set zone info into put_zones_ofpacts

2022-02-14 Thread Ihar Hrachyshka
Signed-off-by: Ihar Hrachyshka --- controller/physical.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/controller/physical.c b/controller/physical.c index e0afd83ab..c47b15f3e 100644 --- a/controller/physical.c +++ b/controller/physical.c @@

[ovs-dev] [PATCH ovn 09/15] Use get_port_binding_tun instead of chassis_tunnel_find

2022-02-14 Thread Ihar Hrachyshka
Right now consider_port_binding first extracts *a* tunnel for a chassis, then later in put_remote_port_redirect_overlay it fetches *the* proper tunnel before configuring encapsulation. Instead of doing it in two steps, just extract the proper tunnel info earlier. Signed-off-by: Ihar Hrachyshka

[ovs-dev] [PATCH ovn 05/15] northd: separate code for nb->sb port binding chassis update

2022-02-14 Thread Ihar Hrachyshka
The ovn_port_update_sbrec function became too long, and the next patches will touch the code to update chassis mapping for ports. This patch prepares for the next step. Signed-off-by: Ihar Hrachyshka --- northd/northd.c | 62 - 1 file changed, 36

[ovs-dev] [PATCH ovn 04/15] northd: introduce separate function to look up chassis

2022-02-14 Thread Ihar Hrachyshka
This function will be reused later. Signed-off-by: Ihar Hrachyshka --- northd/northd.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index fc7a64f99..0f694cb2d 100644 --- a/northd/northd.c +++ b/northd/northd.c @@

[ovs-dev] [PATCH ovn 02/15] tests: don't bail from OVN_CHECK_PACKETS_CONTAIN prematurily

2022-02-14 Thread Ihar Hrachyshka
When the expected number of packets arrive, OVN_CHECK_PACKETS_CONTAIN bails out. But it should bail out from waiting only when the expected packets were observed or when timeout reached, because the whole point of the function is to allow to ignore some packets (usually garps generated by ports)

[ovs-dev] [PATCH ovn 03/15] Introduce chassis_is_vtep

2022-02-14 Thread Ihar Hrachyshka
This tiny helper will be reused later. Signed-off-by: Ihar Hrachyshka --- controller/physical.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/controller/physical.c b/controller/physical.c index 6bfa2304d..3a7fbfb21 100644 --- a/controller/physical.c +++

[ovs-dev] [PATCH ovn 01/15] tests: log more info on OVN_CHECK_PACKETS* failure

2022-02-14 Thread Ihar Hrachyshka
Right now it logs diff between expected and observed only when enough packets arrived. If less than expected packets arrived, only the number of packets observed was logged, but not the packets themselves. This patch makes the functions log the expected packets, the observed packets, as well as

[ovs-dev] [PATCH ovn 00/15] Support additional-chassis for ports

2022-02-14 Thread Ihar Hrachyshka
This is a series of patches that was initially sent to the ML as a single draft blob. The new series is much improved in functionality, quality and test coverage. It starts with a number of small preparatory patches that move the code around and fix test suite helper functions that are later used

Re: [ovs-dev] [External] Re: [PATCH 2/5] ipf: add ipf context

2022-02-14 Thread . 贺鹏
On Tue, Feb 15, 2022 at 2:10 AM Ilya Maximets wrote: > > On 1/28/22 17:14, Aaron Conole wrote: > > From: Peng He > > > > ipf_postprocess will emit packets into the datapath pipeline ignoring > > the conntrack context, this might casuse weird issues when a packet > > batch has less space to hold

Re: [ovs-dev] [PATCH v2] ofproto-dpif: fix packet_execute_prepare

2022-02-14 Thread Peng He
Aaron Conole 于2022年2月15日周二 01:33写道: > Peng He writes: > > > In the commit 1df7f7aac8c976690167261fec9a50d832ef9e7e, the packet > > metadata's in_port has been changed from ofp port into odp port, > > however, the odp->flow->in_port is still ofp_port. This patch changes > > the

Re: [ovs-dev] [PATCH v2] ofproto-dpif: fix packet_execute_prepare

2022-02-14 Thread Peng He
Ilya Maximets 于2022年2月15日周二 01:42写道: > On 2/14/22 18:32, Aaron Conole wrote: > > Peng He writes: > > > >> In the commit 1df7f7aac8c976690167261fec9a50d832ef9e7e, the packet > >> metadata's in_port has been changed from ofp port into odp port, > >> however, the odp->flow->in_port is still

Re: [ovs-dev] [PATCH v3 08/14] treewide: Avoid offsetting NULL pointers.

2022-02-14 Thread Ilya Maximets
On 1/24/22 15:19, Dumitru Ceara wrote: > This is undefined behavior and was reported by UB Sanitizer: > lib/meta-flow.c:3445:16: runtime error: member access within null pointer > of type 'struct vl_mf_field' > #0 0x6aad0f in mf_get_vl_mff lib/meta-flow.c:3445 > #1 0x6d96d7 in

Re: [ovs-dev] [PATCH v2 ovn] introduce rdnss, dnssl and route_info opt in put_nd_ra_opts action

2022-02-14 Thread Numan Siddique
On Fri, Feb 11, 2022 at 5:41 PM Lorenzo Bianconi wrote: > > > On Tue, Feb 8, 2022 at 1:27 PM Mark Michelson wrote: > > > > > > Thanks Lorenzo. > > > > > > Acked-by: Mark Michelson > > > > Thanks. I applied to the main branch. > > Thanks Numan. I guess this patch can be considered a bug-fix, so

Re: [ovs-dev] [PATCH v3 04/14] treewide: Fix invalid bit shift operations.

2022-02-14 Thread Ilya Maximets
On 1/24/22 15:18, Dumitru Ceara wrote: > UB Sanitizer reports: > tests/test-hash.c:59:40: runtime error: shift exponent 64 is too large for > 64-bit type 'long unsigned int' > #0 0x44c3c9 in get_range128 tests/test-hash.c:59 > #1 0x44cb2e in check_hash_bytes128 tests/test-hash.c:178

Re: [ovs-dev] [PATCH 5/5] system-traffic.at: Do not use ranges with broadcast address.

2022-02-14 Thread Ilya Maximets
On 1/28/22 17:14, Aaron Conole wrote: > From: Paolo Valerio > > turn a bunch of test ranges from 10.1.1.240-10.1.1.255 to > 10.1.1.240-10.1.1.254. 10.1.1.255 is the broadcast address for > 10.1.1.0/24 and can be picked to SNAT packets causing the subsequent > failure of the test. > > Fixes:

Re: [ovs-dev] [PATCH] conntrack: Avoid sporadic failures during IPv6 HTTP/FTP tests

2022-02-14 Thread Ilya Maximets
On 12/27/21 14:27, Paolo Valerio wrote: > Some sporadic false positive may be visible for the following tests: > > - conntrack - IPv6 HTTP > - conntrack - FTP over IPv6 > > The failures show up randomly. > The reason appears to be source address used when performing the > request using wget: >

Re: [ovs-dev] [PATCH ovn] NEWS: add info about ovn-controller-vtep version pinning

2022-02-14 Thread Numan Siddique
On Mon, Feb 14, 2022 at 12:54 PM Vladislav Odintsov wrote: > > Signed-off-by: Vladislav Odintsov Thanks. Applied. Numan > --- > NEWS | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/NEWS b/NEWS > index bf052838d..984e9977e 100644 > --- a/NEWS > +++ b/NEWS > @@ -7,6 +7,9 @@ Post

Re: [ovs-dev] [PATCH ovn v9 4/6] northd, utils: support for RouteTables in LRs

2022-02-14 Thread Vladislav Odintsov
Hi Dumitru, I’ve got a general question about what the logical topology you’d like to implement. Also, please see inline comments. Regards, Vladislav Odintsov > On 14 Feb 2022, at 15:51, Dumitru Ceara wrote: > > Hi Vladislav, > > I was looking at what options we have in OVN to implement a

Re: [ovs-dev] [PATCH 2/5] ipf: add ipf context

2022-02-14 Thread Ilya Maximets
On 1/28/22 17:14, Aaron Conole wrote: > From: Peng He > > ipf_postprocess will emit packets into the datapath pipeline ignoring > the conntrack context, this might casuse weird issues when a packet > batch has less space to hold all the fragments belonging to single > packet. > > Given the

Re: [ovs-dev] [PATCH ovn] vtep: provide option to check ovn-controller-vtep and ovn-northd versions

2022-02-14 Thread Vladislav Odintsov
Thanks Numan, done: https://patchwork.ozlabs.org/project/ovn/patch/20220214175335.1956758-1-odiv...@gmail.com/ Regards, Vladislav Odintsov > On 11 Feb 2022, at 23:56, Numan Siddique wrote: > > On Wed, Feb 2, 2022 at 3:39 PM Vladislav Odintsov > wrote: >> >> Simlar

[ovs-dev] [PATCH ovn] NEWS: add info about ovn-controller-vtep version pinning

2022-02-14 Thread Vladislav Odintsov
Signed-off-by: Vladislav Odintsov --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index bf052838d..984e9977e 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ Post v21.12.0 - ovn-nbctl copp-list - ovn-nbctl ls-copp-add - ovn-nbctl lr-copp-add + -

Re: [ovs-dev] [PATCH v2] ofproto-dpif: fix packet_execute_prepare

2022-02-14 Thread Ilya Maximets
On 2/14/22 18:32, Aaron Conole wrote: > Peng He writes: > >> In the commit 1df7f7aac8c976690167261fec9a50d832ef9e7e, the packet >> metadata's in_port has been changed from ofp port into odp port, >> however, the odp->flow->in_port is still ofp_port. This patch changes >> the odp->flow->in_port

Re: [ovs-dev] [PATCH v2] dpif-netdev-dpcls: Make subtable reprobe thread-safe.

2022-02-14 Thread Ilya Maximets
On 2/14/22 17:39, Stokes, Ian wrote: >> The subtable search function can be used at any time by a PMD thread. >> Setting the subtable search function should be done atomically to >> prevent garbage data from being read. >> >> A dpcls_subtable_lookup_reprobe() call can happen at the same time that

Re: [ovs-dev] [PATCH v2] ofproto-dpif: fix packet_execute_prepare

2022-02-14 Thread Aaron Conole
Peng He writes: > In the commit 1df7f7aac8c976690167261fec9a50d832ef9e7e, the packet > metadata's in_port has been changed from ofp port into odp port, > however, the odp->flow->in_port is still ofp_port. This patch changes > the odp->flow->in_port into odp_port. > > Fixes: 1df7f7aac8

Re: [ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-14 Thread Ilya Maximets
On 2/14/22 11:13, Adrian Moreno wrote: > Using the SHORT version of the *_SAFE loops makes the code cleaner > and less error-prone. So, use the SHORT version and remove the extra > variable when possible. > > In order to be able to use both long and short versions without changing > the name of

[ovs-dev] [PATCH 1/1] ovs-monitor-ipsec: Migration from ipsec.conf to swanctl.conf

2022-02-14 Thread Emeel Hakim via dev
As strongswan moved to the modern vici-based interface,this patch modifies ovs-monitor-ipsec to use strongswan's vici-based configuration instead of the legacy stroke-based configuration. Signed-off-by: Emeel Hakim Reviewed-by: Nick Desaulniers is interface name (as in OVSDB) and is

Re: [ovs-dev] ovs/ipsec: Libreswan report connection failures to ovs logs

2022-02-14 Thread Mike Pattrick
On Thu, Feb 3, 2022 at 9:17 AM Mohammad Heib wrote: > > Currently when the user adds an IPsec tunnel port to the > ovs bridge the ovs-monitor-ipsec script will submit a request > to start the IPsec connection for this port and ignores > the request output which can contain an error message. > >

Re: [ovs-dev] [PATCH v2] dpif-netdev-dpcls: Make subtable reprobe thread-safe.

2022-02-14 Thread Stokes, Ian
> The subtable search function can be used at any time by a PMD thread. > Setting the subtable search function should be done atomically to > prevent garbage data from being read. > > A dpcls_subtable_lookup_reprobe() call can happen at the same time that > DPCLS subtables are being sorted. This

Re: [ovs-dev] [PATCH ovn v4] acl-log: Log the direction (logical pipeline) of the matching ACL.

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Dumitru Ceara, 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. git-am: error: Failed to merge in the changes. hint: Use 'git am --show-current-patch' to see the failed

Re: [ovs-dev] [PATCH ovn v3] acl-log: Log the direction (logical pipeline) of the matching ACL.

2022-02-14 Thread Dumitru Ceara
On 2/11/22 19:31, Numan Siddique wrote: > On Fri, Feb 11, 2022 at 9:42 AM Dumitru Ceara wrote: >> It's useful to differentiate between ingress and egress pipelines in the >> ACL logs. To achieve this we determine the direction by interpreting the >> openflow table ID when processing packets

[ovs-dev] [PATCH ovn v4] acl-log: Log the direction (logical pipeline) of the matching ACL.

2022-02-14 Thread Dumitru Ceara
It's useful to differentiate between ingress and egress pipelines in the ACL logs. To achieve this we determine the direction by interpreting the openflow table ID when processing packets punted to pinctrl by "log()" action. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1992641

Re: [ovs-dev] [PATCH 1/1] ovs-monitor-ipsec: Migration from ipsec.conf to swanctl.conf

2022-02-14 Thread Mohammad Heib
Hi Emeel, Thank you for submitting this patch. please see few comments below On 2/14/22 16:21, Emeel Hakim wrote: As strongswan moved to the modern vici-based interface,this patch modifies ovs-monitor-ipsec to use strongswan's vici-based configuration instead of the legacy stroke-based

Re: [ovs-dev] [PATCH ovn v9 4/6] northd, utils: support for RouteTables in LRs

2022-02-14 Thread Dumitru Ceara
Hi Vladislav, I was looking at what options we have in OVN to implement a VRF-like behavior and then remembered you had worked on the multiple routing table feature. On 11/19/21 17:07, Vladislav Odintsov wrote: > This patch extends Logical Router's routing functionality. > Now user may create

[ovs-dev] [PATCH net v2 1/1] openvswitch: Fix setting ipv6 fields causing hw csum failure

2022-02-14 Thread Paul Blakey via dev
Ipv6 ttl, label and tos fields are modified without first pulling/pushing the ipv6 header, which would have updated the hw csum (if available). This might cause csum validation when sending the packet to the stack, as can be seen in the trace below. Fix this by updating skb->csum if available.

Re: [ovs-dev] [PATCH] ofproto: fix use-after-free for "ofproto".

2022-02-14 Thread Adrian Moreno
On 1/18/22 14:28, wangyunjian via dev wrote: http://patchwork.ozlabs.org/project/openvswitch/patch/20200306130555.19884-1-guohongz...@huawei.com/ This patch has been applied. But this patch do not fix the problem I stated. I think this problem is that hmap does not support concurrent access.

Re: [ovs-dev] [PATCH v3 2/2] ofproto-dpif: avoid unneccesary backer revalidation

2022-02-14 Thread lic121
>On 6 Feb 2022, at 4:58, lic121 wrote: > >>> If lldp didn't change, we are not supposed to trigger backer >>> revalidation. >>> >>> Without this patch, bridge_reconfigure() always trigger udpif >>> revalidator because of lldp. >>> >>> Signed-off-by: lic121 >>> Co-authored-by: Eelco Chaudron >>>

[ovs-dev] [PATCH v4 3/3] ofproto-dpif: avoid unneccesary backer revalidation

2022-02-14 Thread lic121
If lldp didn't change, we are not supposed to trigger backer revalidation. Without this patch, bridge_reconfigure() always trigger udpif revalidator because of lldp. Signed-off-by: lic121 Signed-off-by: Eelco Chaudron Co-authored-by: Eelco Chaudron --- lib/ovs-lldp.c | 8

Re: [ovs-dev] [PATCH 1/5] ofproto-dpif: fix packet_execute_prepare

2022-02-14 Thread Ilya Maximets
On 2/13/22 03:32, Peng He wrote: > > > Ilya Maximets mailto:i.maxim...@ovn.org>> 于2022年2月12日周六 > 05:34写道: > > On 1/28/22 17:14, Aaron Conole wrote: > > From: Peng He mailto:xnhp0...@gmail.com>> > > > > In the commit 1df7f7aac8c976690167261fec9a50d832ef9e7e, the packet > >

[ovs-dev] [PATCH v4 2/3] lldp: fix memory leak

2022-02-14 Thread lic121
lldp_create() malloc memory for lldp->lldpd->g_hardware. lldp_unref is supposed to free the memory, but it doesn't. Signed-off-by: lic121 --- lib/lldp/lldpd.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c index

[ovs-dev] [PATCH v4 1/3] ofproto-dpif: trigger revalidation when ipfix config set

2022-02-14 Thread lic121
Currently, ipfix conf creation/deletion don't trigger dpif backer revalidation. This is not expected, as we need the revalidation to commit ipfix into xlate. So that xlate can generate ipfix actions. This patch covers only new creation/deletion of ipfix config. Will upload one more patch to cover

[ovs-dev] [PATCH v4 0/3] fix dpif backer revalidation

2022-02-14 Thread lic121
v4: - one patch is added to fix lldp memory leak - add '!smap_is_empty(cfg)' condition v3: - fix lldp test case failure v2: - add TODO comments to clear ipfix patch coverage - test lldp enabling more than pointer - add test cases for lldp ovsdb change or netlink notification trigger

Re: [ovs-dev] [External] Re: [PATCH] dpif-netdev: add an option to assign pmd rxq to all numas

2022-02-14 Thread Wan Junjie
On Mon, Feb 14, 2022 at 6:54 PM Jan Scheurich wrote: > > > > We do acknowledge the benefit of non-pinned polling of phy rx queues by > > PMD threads on all NUMA nodes. It gives the auto-load balancer much better > > options to utilize spare capacity on PMDs on all NUMA nodes. > > > > > > Our

Re: [ovs-dev] [PATCH v2 15/16] sparse: bump recommended version and include headers

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Co-author Dumitru Ceara needs to sign off. Lines checked: 45, Warnings: 0, Errors: 1

Re: [ovs-dev] [PATCH v2 11/16] hindex: remove the next variable in safe loops

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #122 FILE: tests/test-hindex.c:296:

Re: [ovs-dev] [PATCH v2 10/16] hindex: use multi-variable iterators

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #92 FILE: tests/test-hindex.c:269:

Re: [ovs-dev] [PATCH v2 09/16] cmap: use multi-variable iterators

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #74 FILE: tests/test-cmap.c:77: assert(e ==

Re: [ovs-dev] [External] Re: [PATCH] dpif-netdev: add an option to assign pmd rxq to all numas

2022-02-14 Thread Jan Scheurich via dev
> > We do acknowledge the benefit of non-pinned polling of phy rx queues by > PMD threads on all NUMA nodes. It gives the auto-load balancer much better > options to utilize spare capacity on PMDs on all NUMA nodes. > > > > Our patch proposed in > >

Re: [ovs-dev] [PATCH v2 08/16] hmap: use short version of safe loops if possible

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Inappropriate bracing around statement #87 FILE: include/openvswitch/hmap.h:182:

Re: [ovs-dev] [PATCH v2 07/16] hmap: implement UB-safe hmap pop iterator

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #76 FILE: tests/test-hmap.c:320:

Re: [ovs-dev] [PATCH v2 06/16] hmap: use multi-variable helpers for hmap loops

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Inappropriate bracing around statement #77 FILE: include/openvswitch/hmap.h:182:

Re: [ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #1174 FILE: tests/test-list.c:148:

Re: [ovs-dev] [PATCH v2 03/16] list: use multi-variable helpers for list loops

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #128 FILE: tests/test-list.c:64: assert(e ==

Re: [ovs-dev] [External] Re: [PATCH] dpif-netdev: add an option to assign pmd rxq to all numas

2022-02-14 Thread Wan Junjie
On Mon, Feb 14, 2022 at 6:12 PM Jan Scheurich wrote: > > > > > > > Btw, this patch is similar in functionality to the one posted by > > > Anurag [0] and there was also some discussion about this approach here > > > [1]. > > > > > > > Thanks for pointing this out. > > IMO, setting interface

Re: [ovs-dev] [PATCH 15/16] sparse: bump recommended version and include headers

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: WARNING: Unexpected sign-offs from developers who are not authors or co-authors or

Re: [ovs-dev] [PATCH 11/16] hindex: remove the next variable in safe loops

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #122 FILE: tests/test-hindex.c:296:

[ovs-dev] [PATCH v2 11/16] hindex: remove the next variable in safe loops

2022-02-14 Thread Adrian Moreno
Using SHORT version of the *_SAFE loops makes the code cleaner and less error prone. So, use the SHORT version and remove the extra variable when possible for HINDEX_*_SAFE. In order to be able to use both long and short versions without changing the name of the macro for all the clients,

[ovs-dev] [PATCH v2 10/16] hindex: use multi-variable iterators

2022-02-14 Thread Adrian Moreno
Re-write hindex's loops using multi-variable helpers. For safe loops, use the LONG version to maintain backwards compatibility. Signed-off-by: Adrian Moreno --- lib/hindex.h| 42 +++--- tests/test-hindex.c | 6 ++ 2 files changed, 29

[ovs-dev] [PATCH v2 08/16] hmap: use short version of safe loops if possible

2022-02-14 Thread Adrian Moreno
Using SHORT version of the *_SAFE loops makes the code cleaner and less error prone. So, use the SHORT version and remove the extra variable when possible for hmap and all its derived types. In order to be able to use both long and short versions without changing the name of the macro for all the

[ovs-dev] [PATCH v2 14/16] idlc: support short version of SAFE macros

2022-02-14 Thread Adrian Moreno
In order to be consistent with the rest of the SAFE loop macros, overload each of the generated *_SAFE macro with a SHORT version that does not require the user to provide the NEXT variable. Signed-off-by: Adrian Moreno --- ovsdb/ovsdb-idlc.in | 23 +--

[ovs-dev] [PATCH v2 12/16] rculist: use multi-variable helpers for loop macros

2022-02-14 Thread Adrian Moreno
Use multi-variable iteration helpers to rewrite rculist loops macros. There is an important behavior change compared with the previous implementation: When the loop ends normally (i.e: not via "break;"), the object pointer provided by the user is NULL. This is safer because it's not guaranteed

[ovs-dev] [PATCH v2 16/16] sset: add SHORT version of SAFE loop macros

2022-02-14 Thread Adrian Moreno
Add SHORT version of SAFE loop macros and overload the current macro name to keep backwards compatibility. Signed-off-by: Adrian Moreno --- lib/sset.c | 8 lib/sset.h | 16 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/sset.c b/lib/sset.c index

Re: [ovs-dev] [PATCH 10/16] hindex: use multi-variable iterators

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #92 FILE: tests/test-hindex.c:269:

[ovs-dev] [PATCH v2 15/16] sparse: bump recommended version and include headers

2022-02-14 Thread Adrian Moreno
It seems versions older than 0.6.2 generate false positives. Bump the recommended version and make sure we uset the headers from the Co-authored-by: Dumitru Ceara Signed-off-by: Adrian Moreno --- Documentation/intro/install/general.rst | 2 +- acinclude.m4| 2 +- 2

[ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-14 Thread Adrian Moreno
Using the SHORT version of the *_SAFE loops makes the code cleaner and less error-prone. So, use the SHORT version and remove the extra variable when possible. In order to be able to use both long and short versions without changing the name of the macro for all the clients, overload the existing

[ovs-dev] [PATCH v2 09/16] cmap: use multi-variable iterators

2022-02-14 Thread Adrian Moreno
Re-write cmap's loops using multi-variable helpers. For iterators based on cmap_cursor, we just need to make sure the NODE variable is not used after the loop, so we set it to NULL. Signed-off-by: Adrian Moreno --- lib/cmap.h| 24 ++-- tests/test-cmap.c | 3 +++ 2

[ovs-dev] [PATCH v2 13/16] vtep: use _SAFE iterator if freeing the iterator

2022-02-14 Thread Adrian Moreno
The _SAFE version of the iterator allows the user to free the iterator structure safely. Signed-off-by: Adrian Moreno --- vtep/vtep-ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index 99c4adcd5..685b0007a 100644 --- a/vtep/vtep-ctl.c

[ovs-dev] [PATCH v2 06/16] hmap: use multi-variable helpers for hmap loops

2022-02-14 Thread Adrian Moreno
Rewrite hmap's loops using multi-variable helpers. For SAFE loops, use the LONG version of the multi-variable macros to keep backwards compatibility. Signed-off-by: Adrian Moreno --- include/openvswitch/hmap.h | 62 -- lib/ovs-numa.h | 4 +--

[ovs-dev] [PATCH v2 07/16] hmap: implement UB-safe hmap pop iterator

2022-02-14 Thread Adrian Moreno
HMAP_FOR_EACH_POP iterator has an additional difficulty, which is the use of two iterator variables of different types. In order to re-write this loop in a UB-safe manner, create a iterator struct to be used as loop variable. Signed-off-by: Adrian Moreno --- include/openvswitch/hmap.h | 31

[ovs-dev] [PATCH v2 04/16] list: ensure iterator is NULL after pop loop

2022-02-14 Thread Adrian Moreno
After the loop ends, the iterator is not guaranteed to point to a valid object and should not be used. Make it NULL to avoid undefined behavior. Signed-off-by: Adrian Moreno --- include/openvswitch/list.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[ovs-dev] [PATCH v2 03/16] list: use multi-variable helpers for list loops

2022-02-14 Thread Adrian Moreno
Use multi-variable iteration helpers to rewrite non-safe loops. There is an important behavior change compared with the previous implementation: When the loop ends normally (i.e: not via "break;"), the object pointer provided by the user is NULL. This is safer because it's not guaranteed that it

[ovs-dev] [PATCH v2 02/16] util: add safe multi-variable iterators

2022-02-14 Thread Adrian Moreno
Safe version of multi-variable iterator helpers declare an internal variable to store the next value of the iterator temporarily. Two versions of the macro are provided, one that still uses the NEXT variable for backwards compatibility and a shorter version that does not require the use of an

Re: [ovs-dev] [PATCH 09/16] cmap: use multi-variable iterators

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #74 FILE: tests/test-cmap.c:77: assert(e ==

[ovs-dev] [PATCH v2 01/16] util: add multi-variable loop iterator macros

2022-02-14 Thread Adrian Moreno
Multi-variable loop iterators avoid potential undefined behavior by using an internal iterator variable to perform the iteration and only referencing the containing object (via OBJECT_CONTAINING) if the iterator has been validated via the second expression of the for statement. That way, the user

[ovs-dev] [PATCH v2 00/16] Fix undefined behavior in loop macros

2022-02-14 Thread Adrian Moreno
When running builds with UBSan, some undefined behavior was detected in the iteration of common data data structures in OVS. Coincidentally, a bug was reported [1] whose root cause whas another, this time undetected, undefined behavior in the iteration macros. >From both cases, we conclude that

Re: [ovs-dev] [PATCH 08/16] hmap: use short version of safe loops if possible

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Inappropriate bracing around statement #87 FILE: include/openvswitch/hmap.h:182:

Re: [ovs-dev] [External] Re: [PATCH] dpif-netdev: add an option to assign pmd rxq to all numas

2022-02-14 Thread Jan Scheurich via dev
> > > > Btw, this patch is similar in functionality to the one posted by > > Anurag [0] and there was also some discussion about this approach here [1]. > > > > Thanks for pointing this out. > IMO, setting interface cross-numa would be good for phy port but not good for > vhu. Since vhu can be

Re: [ovs-dev] [PATCH 07/16] hmap: implement UB-safe hmap pop iterator

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #76 FILE: tests/test-hmap.c:320:

Re: [ovs-dev] [PATCH 06/16] hmap: use multi-variable helpers for hmap loops

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Inappropriate bracing around statement #77 FILE: include/openvswitch/hmap.h:182:

Re: [ovs-dev] [PATCH 05/16] list: use short version of safe loops if possible

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #1174 FILE: tests/test-list.c:148:

Re: [ovs-dev] [PATCH 03/16] list: use multi-variable helpers for list loops

2022-02-14 Thread 0-day Robot
Bleep bloop. Greetings Adrian Moreno, 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. checkpatch: ERROR: Use ovs_assert() in place of assert() #128 FILE: tests/test-list.c:64: assert(e ==

[ovs-dev] [PATCH 14/16] idlc: support short version of SAFE macros

2022-02-14 Thread Adrian Moreno
In order to be consistent with the rest of the SAFE loop macros, overload each of the generated *_SAFE macro with a SHORT version that does not require the user to provide the NEXT variable. Signed-off-by: Adrian Moreno --- ovsdb/ovsdb-idlc.in | 23 +--

[ovs-dev] [PATCH 16/16] sset: add SHORT version of SAFE loop macros

2022-02-14 Thread Adrian Moreno
Add SHORT version of SAFE loop macros and overload the current macro name to keep backwards compatibility. Signed-off-by: Adrian Moreno --- lib/sset.c | 8 lib/sset.h | 16 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/sset.c b/lib/sset.c index

[ovs-dev] [PATCH 15/16] sparse: bump recommended version and include headers

2022-02-14 Thread Adrian Moreno
It seems versions older than 0.6.2 generate false positives. Bump the recommended version and make sure we uset the headers from the Signed-off-by: Dumitru Ceara Signed-off-by: Adrian Moreno --- Documentation/intro/install/general.rst | 2 +- acinclude.m4| 2 +- 2

[ovs-dev] [PATCH 12/16] rculist: use multi-variable helpers for loop macros

2022-02-14 Thread Adrian Moreno
Use multi-variable iteration helpers to rewrite rculist loops macros. There is an important behavior change compared with the previous implementation: When the loop ends normally (i.e: not via "break;"), the object pointer provided by the user is NULL. This is safer because it's not guaranteed

[ovs-dev] [PATCH 13/16] vtep: use _SAFE iterator if freeing the iterator

2022-02-14 Thread Adrian Moreno
The _SAFE version of the iterator allows the user to free the iterator structure safely. Signed-off-by: Adrian Moreno --- vtep/vtep-ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index 99c4adcd5..685b0007a 100644 --- a/vtep/vtep-ctl.c

[ovs-dev] [PATCH 11/16] hindex: remove the next variable in safe loops

2022-02-14 Thread Adrian Moreno
Using SHORT version of the *_SAFE loops makes the code cleaner and less error prone. So, use the SHORT version and remove the extra variable when possible for HINDEX_*_SAFE. In order to be able to use both long and short versions without changing the name of the macro for all the clients,

[ovs-dev] [PATCH 10/16] hindex: use multi-variable iterators

2022-02-14 Thread Adrian Moreno
Re-write hindex's loops using multi-variable helpers. For safe loops, use the LONG version to maintain backwards compatibility. Signed-off-by: Adrian Moreno --- lib/hindex.h| 42 +++--- tests/test-hindex.c | 6 ++ 2 files changed, 29

  1   2   >