Re: [ovs-dev] [PATCH net-next 0/8] Use max/min to simplify the code

2024-08-27 Thread Jakub Kicinski via dev
On Tue, 27 Aug 2024 07:45:02 +0300 Kalle Valo wrote: > > Do you mean some patches will go to other branches (such as mac80211)? > > Jakub means that your patchset had compilation errors, see the red on > patchwork: > > https://patchwork.kernel.org/project/netdevbpf/list/?series=882901&state=*&o

Re: [ovs-dev] [PATCH net-next 0/8] Use max/min to simplify the code

2024-08-26 Thread Jakub Kicinski via dev
On Sat, 24 Aug 2024 15:40:25 +0800 Hongbo Li wrote: > Many Coccinelle/coccicheck warning reported by minmax.cocci > in net module, such as: > WARNING opportunity for max() > WARNING opportunity for min() > > Let's use max/min to simplify the code and fix these warnings. > These pat

Re: [ovs-dev] [PATCH net-next] net: ovs: fix ovs_drop_reasons error

2024-08-19 Thread Jakub Kicinski
On Sun, 18 Aug 2024 11:35:48 +0800 Menglong Dong wrote: > > I think it should go to net rather than net-next. > > Should I resend this patch to the net branch? Yes please! And with the results of your experiment added to the commit message. ___ dev ma

Re: [ovs-dev] [PATCH net-next] net: ovs: fix ovs_drop_reasons error

2024-08-16 Thread Jakub Kicinski
On Thu, 15 Aug 2024 20:22:45 +0800 Menglong Dong wrote: > I'm sure if I understand it correctly, but it seems that there is > something wrong with ovs_drop_reasons. > > ovs_drop_reasons[0] is "OVS_DROP_LAST_ACTION", but > OVS_DROP_LAST_ACTION == __OVS_DROP_REASON + 1, which means that > ovs_drop_r

Re: [ovs-dev] [PATCH net-next] openvswitch: switch to per-action label counting in conntrack

2024-07-18 Thread Jakub Kicinski
On Wed, 17 Jul 2024 22:10:15 -0400 Xin Long wrote: > @@ -2026,7 +2023,4 @@ void ovs_ct_exit(struct net *net) > #if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT) > ovs_ct_limit_exit(net, ovs_net); > #endif > - > - if (ovs_net->xt_label) > - nf_connlabels_put(net); > } In addition

Re: [ovs-dev] [PATCH net-next v2] selftests: openvswitch: retry instead of sleep

2024-07-11 Thread Jakub Kicinski
On Thu, 11 Jul 2024 09:41:08 + Adrián Moreno wrote: > This patch is supposed to fix openvswitch selftests on "-dbg" machines. > However, as Simon points out, all recent rounds are failing [1]. I don't > see this patch being included in the batches and I was wondering why. > > Also I see a (pre

Re: [ovs-dev] [PATCH net-next 0/3] selftests: openvswitch: Address some flakes in the CI environment

2024-07-05 Thread Jakub Kicinski
On Fri, 05 Jul 2024 09:49:12 -0400 Aaron Conole wrote: > > The results look solid on normal builds now, but with a debug kernel > > the test is failing consistently: > > > > https://netdev.bots.linux.dev/contest.html?executor=vmksft-net-dbg&test=openvswitch-sh > > > > Yes - it shows a test case

Re: [ovs-dev] [PATCH net-next 0/3] selftests: openvswitch: Address some flakes in the CI environment

2024-07-05 Thread Jakub Kicinski
On Tue, 2 Jul 2024 09:28:27 -0400 Aaron Conole wrote: > These patches aim to make using the openvswitch testsuite more reliable. > These should address the major sources of flakiness in the openvswitch > test suite allowing the CI infrastructure to exercise the openvswitch > module for patch serie

Re: [ovs-dev] [PATCH net-next v8 00/10] net: openvswitch: Add sample multicasting.

2024-07-03 Thread Jakub Kicinski
On Tue, 2 Jul 2024 11:53:17 +0200 Adrian Moreno wrote: > selftests: openvswitch: add psample action > selftests: openvswitch: add userspace parsing > selftests: openvswitch: parse trunc action > selftests: openvswitch: add psample test Sorry for applying things slightly out of order but w

Re: [ovs-dev] [PATCH net-next v7 05/10] net: openvswitch: add psample action

2024-07-02 Thread Jakub Kicinski
On Tue, 2 Jul 2024 20:16:51 +0200 Ilya Maximets wrote: > On 7/2/24 20:06, Jakub Kicinski wrote: > > On Tue, 2 Jul 2024 11:53:01 +0200 Ilya Maximets wrote: > >> Or create a simple static function and mark all the arguments as unused, > >> which kind of compliant to the

Re: [ovs-dev] [PATCH net-next v7 05/10] net: openvswitch: add psample action

2024-07-02 Thread Jakub Kicinski
On Tue, 2 Jul 2024 11:53:01 +0200 Ilya Maximets wrote: > Or create a simple static function and mark all the arguments as unused, > which kind of compliant to the coding style, but the least pretty. To be clear - kernel explicitly disables warnings about unused arguments. Unused arguments are not

Re: [ovs-dev] [PATCH net-next v3 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-28 Thread Jakub Kicinski
On Fri, 28 Jun 2024 14:04:09 -0400 Aaron Conole wrote: > > I also added the OvS tests themselves, and those are not passing, yet: > > https://netdev.bots.linux.dev/contest.html?test=openvswitch-sh > > Could you take a look and LMK if these are likely env issues or > > something bad in the test itse

Re: [ovs-dev] [PATCH net-next v3 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-28 Thread Jakub Kicinski
On Tue, 25 Jun 2024 13:22:38 -0400 Aaron Conole wrote: > Currently, if a user wants to run pmtu.sh and cover all the provided test > cases, they need to install the Open vSwitch userspace utilities. This > dependency is difficult for users as well as CI environments, because the > userspace build

Re: [ovs-dev] [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-25 Thread Jakub Kicinski
On Tue, 25 Jun 2024 11:17:14 -0400 Aaron Conole wrote: > > BTW I popped the v2 back into the queue, so the next run (in 20min) > > will tell us if that's the only thing we were missing 🤞️ > > :) I'll wait to post the v3 then. So far, the only change I have is: > > --- a/tools/testing/selftest

Re: [ovs-dev] [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-25 Thread Jakub Kicinski
On Tue, 25 Jun 2024 10:14:24 -0400 Aaron Conole wrote: > > Sorry for not checking it earlier, looks like the runner was missing > > pyroute: > > > > # python3 ./tools/testing/selftests/net/openvswitch/ovs-dpctl.py > > Need to install the python pyroute2 package >= 0.6. > > > > I guess run_cmd count

Re: [ovs-dev] [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-25 Thread Jakub Kicinski
On Tue, 25 Jun 2024 09:20:29 -0400 Aaron Conole wrote: > > I'm still wondering if the issue is Kconfig-related (plus possibly bad > > interaction with vng). I don't see the OVS knob enabled in the self- > > tests config. If it's implied by some other knob, and ends-up being > > selected as a module

Re: [ovs-dev] [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-24 Thread Jakub Kicinski
On Mon, 24 Jun 2024 12:53:45 -0400 Aaron Conole wrote: > Additionally, the "Cannot find device ..." text comes from an iproute2 > utility output. The only place we actually interact with that is via > the call at pmtu.sh:973: > > run_cmd ip link set ovs_br0 up > > Maybe it is possible that

Re: [ovs-dev] [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-21 Thread Jakub Kicinski
On Thu, 20 Jun 2024 08:55:54 -0400 Aaron Conole wrote: > This series enhances the ovs-dpctl utility to provide support for set() > and tunnel() flow specifiers, better ipv6 handling support, and the > ability to add tunnel vports, and LWT interfaces. Finally, it modifies > the pmtu.sh script to ca

Re: [ovs-dev] [PATCH net-next v3 05/10] net: openvswitch: add emit_sample action

2024-06-19 Thread Jakub Kicinski
On Wed, 19 Jun 2024 23:00:06 +0200 Adrian Moreno wrote: > + OVS_EMIT_SAMPLE_ATTR_UNPSEC, Are you using this one? Looking closely I presume not, since it's misspelled ;) You can assign = 1 to GROUP, no need to name the value for 0. > + OVS_EMIT_SAMPLE_ATTR_GROUP, /* u32 number. */ > +

Re: [ovs-dev] [PATCH net-next 1/2] selftests: openvswitch: fix action formatting

2024-06-03 Thread Jakub Kicinski
On Mon, 03 Jun 2024 15:00:03 -0400 Aaron Conole wrote: > I agree, this is an issue. BUT I think it might be better to just > filter by field type up front. See: > > https://github.com/apconole/linux-next-work/commit/7262107de7170d44b6dbf6c5ea6f7e6c0bb71d36#diff-3e72e7405c6bb4e9842bed5f63883ca930

Re: [ovs-dev] selftests: openvswitch: Questions about possible enhancements

2024-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2024 19:57:19 +0100 Simon Horman wrote: > openvswitch.sh does not appear to have any dependencies on Open vSwitch > user-space. My understanding is that, rather, it makes use of > tools/testing/selftests/net/openvswitch/ovs-dpctl.py to talk to the Kernel > using Netlink (which is als

Re: [ovs-dev] selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2024 17:44:05 +0100 Simon Horman wrote: > I have recently been exercising the Open vSwitch kernel selftests, > using vng, Speaking of ovs tests, we currently don't run them in CI (and suffer related skips in pmtu.sh) because Amazon Linux doesn't have ovs packaged and building it loo

Re: [ovs-dev] [PATCH net-next v4] net: openvswitch: Check vport netdev name

2024-04-22 Thread Jakub Kicinski
On Fri, 19 Apr 2024 14:14:25 +0800 Jun Gu wrote: > vport->dev = dev_get_by_name(ovs_dp_get_net(vport->dp), name); > - if (!vport->dev) { > + /* Ensure that the device exists and that the provided > + * name is not one of its aliases. > + */ > + if (!vport->dev || strcmp(

Re: [ovs-dev] [PATCH net-next v4] net: openvswitch: Check vport netdev name

2024-04-19 Thread Jakub Kicinski
On Fri, 19 Apr 2024 12:31:33 +0800 Jun Gu wrote: > From: "jun.gu" > > Ensure that the provided netdev name is not one of its aliases to > prevent unnecessary creation and destruction of the vport by > ovs-vswitchd. > > Signed-off-by: jun.gu > Acked-by: Eelco Chaudron I said: When you repost,

Re: [ovs-dev] [PATCH net-next v4] net: openvswitch: Check vport netdev name

2024-04-18 Thread Jakub Kicinski
On Thu, 18 Apr 2024 10:32:42 +0800 jun.gu wrote: > + if ((!vport->dev) || strcmp(name, ovs_vport_name(vport))) { Please drop the unnecessary brackets. When you repost, start a new thread, do not post new version in-reply-to. -- pw-bot: cr ___ dev ma

[ovs-dev] [PATCH net-next v3 2/3] net: openvswitch: remove unnecessary linux/genetlink.h include

2024-03-29 Thread Jakub Kicinski
genl_family perhaps? it's not necessary, types of externs do not need to be known). Signed-off-by: Jakub Kicinski --- CC: pshe...@ovn.org CC: d...@openvswitch.org --- net/openvswitch/meter.h | 1 - 1 file changed, 1 deletion(-) diff --git a/net/openvswitch/meter.h b/net/openvswitch/meter.h

[ovs-dev] [PATCH net-next v3 3/3] genetlink: remove linux/genetlink.h

2024-03-29 Thread Jakub Kicinski
ed-by: Sven Eckelmann Signed-off-by: Jakub Kicinski --- v3: - fix double space in a comment v2: - remove extern - include linux/net.h - improve the comment, not "all" requests are serialized CC: ja...@zx2c4.com CC: mareklind...@neomailbox.ch CC: s...@simonwunderlich.de CC: a...@unsta

Re: [ovs-dev] [PATCH net-next v2 3/3] genetlink: remove linux/genetlink.h

2024-03-25 Thread Jakub Kicinski
On Mon, 25 Mar 2024 19:45:05 +0200 Andy Shevchenko wrote: > > +/* Non-parallel generic netlink requests are serialized by a global lock. > > */ > > While at it, maybe drop extra space? (I noticed it was originally like this. Fair, I'll post v3. > > +#define MODULE_ALIAS_GENL_FAMILY(family) \

[ovs-dev] [PATCH net-next v2 2/3] net: openvswitch: remove unnecessary linux/genetlink.h include

2024-03-25 Thread Jakub Kicinski
genl_family perhaps? it's not necessary, types of externs do not need to be known). Signed-off-by: Jakub Kicinski --- CC: pshe...@ovn.org CC: d...@openvswitch.org --- net/openvswitch/meter.h | 1 - 1 file changed, 1 deletion(-) diff --git a/net/openvswitch/meter.h b/net/openvswitch/meter.h

[ovs-dev] [PATCH net-next v2 3/3] genetlink: remove linux/genetlink.h

2024-03-25 Thread Jakub Kicinski
ed-by: Sven Eckelmann Signed-off-by: Jakub Kicinski --- v2: - remove extern - include linux/net.h - improve the comment, not "all" requests are serialized CC: ja...@zx2c4.com CC: mareklind...@neomailbox.ch CC: s...@simonwunderlich.de CC: a...@unstable.cc CC: pshe...@ovn.org CC:

[ovs-dev] [PATCH net-next 3/3] genetlink: remove linux/genetlink.h

2024-03-09 Thread Jakub Kicinski
d-off-by: Jakub Kicinski --- CC: ja...@zx2c4.com CC: mareklind...@neomailbox.ch CC: s...@simonwunderlich.de CC: a...@unstable.cc CC: s...@narfation.org CC: pshe...@ovn.org CC: andriy.shevche...@linux.intel.com CC: wiregu...@lists.zx2c4.com CC: d...@openvswitch.org --- drivers/net/wireguard/m

[ovs-dev] [PATCH net-next 2/3] net: openvswitch: remove unnecessary linux/genetlink.h include

2024-03-09 Thread Jakub Kicinski
genl_family perhaps? it's not necessary, types of externs do not need to be known). Signed-off-by: Jakub Kicinski --- CC: pshe...@ovn.org CC: d...@openvswitch.org --- net/openvswitch/meter.h | 1 - 1 file changed, 1 deletion(-) diff --git a/net/openvswitch/meter.h b/net/openvswitch/meter.h

Re: [ovs-dev] [RFC 0/7] selftests: openvswitch: cleanups for running as selftests

2024-02-19 Thread Jakub Kicinski
On Fri, 16 Feb 2024 10:28:39 -0500 Aaron Conole wrote: > The series is a host of cleanups to the openvswitch selftest suite > which should be ready to run under the netdev selftest runners using > vng. For now, the testing has been done with RW directories, but > additional testing will be done to

Re: [ovs-dev] [PATCH 00/14] Batch 1: Annotate structs with __counted_by

2023-10-02 Thread Jakub Kicinski
On Wed, 27 Sep 2023 08:57:36 -0700 Kees Cook wrote: > > Since the element count member must be set before accessing the annotated > > flexible array member, some patches also move the member's initialization > > earlier. (These are noted in the individual patches.) > > Hi, just checking on this

Re: [ovs-dev] [PATCH net] net: openvswitch: reject negative ifindex

2023-08-15 Thread Jakub Kicinski
0\x01\x00\x08\x00\x00\x00'], > > 'bad-attr': '.ifindex'} > > > > Accept 0 since it used to be silently ignored. > > > > Fixes: 54c4ef34c4b6 ("openvswitch: allow specifying ifindex of new > > interfaces") > > Reported-by: sy

[ovs-dev] [PATCH net-next v3 03/10] genetlink: remove userhdr from struct genl_info

2023-08-14 Thread Jakub Kicinski
-by: Jakub Kicinski --- CC: philipp.reis...@linbit.com CC: lars.ellenb...@linbit.com CC: christoph.boehmwal...@linbit.com CC: ax...@kernel.dk CC: pshe...@ovn.org CC: jma...@redhat.com CC: ying@windriver.com CC: jacob.e.kel...@intel.com CC: drbd-...@lists.linbit.com CC: linux-bl...@vger.kernel.org CC

[ovs-dev] [PATCH net] net: openvswitch: reject negative ifindex

2023-08-14 Thread Jakub Kicinski
x27;\x0c\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x03\x00\xff\xff\xff\x7f\x00\x00\x00\x00\x08\x00\x01\x00\x08\x00\x00\x00'], 'bad-attr': '.ifindex'} Accept 0 since it used to be silently ignored. Fixes: 54c4ef34c4b6 ("openvswitch: allow specifying ifindex of new in

Re: [ovs-dev] [net-next v4 1/7] net: openvswitch: add last-action drop reason

2023-08-10 Thread Jakub Kicinski
On Thu, 10 Aug 2023 14:13:29 -0400 Aaron Conole wrote: > I think they can be resolved in the same way the mac80211 drops are > resolved by using (__force u32) to pass the reason argument. Yup, preferably by creating a helper which takes enum ovs_drop_reason and does the forcing, rather than annota

[ovs-dev] [PATCH net-next v2 03/10] genetlink: remove userhdr from struct genl_info

2023-08-10 Thread Jakub Kicinski
-by: Jakub Kicinski --- CC: philipp.reis...@linbit.com CC: lars.ellenb...@linbit.com CC: christoph.boehmwal...@linbit.com CC: ax...@kernel.dk CC: pshe...@ovn.org CC: jma...@redhat.com CC: ying@windriver.com CC: jacob.e.kel...@intel.com CC: drbd-...@lists.linbit.com CC: linux-bl...@vger.kernel.org CC

Re: [ovs-dev] [PATCH net-next 03/10] genetlink: remove userhdr from struct genl_info

2023-08-09 Thread Jakub Kicinski
On Wed, 09 Aug 2023 22:59:47 +0200 Johannes Berg wrote: > On Wed, 2023-08-09 at 11:26 -0700, Jakub Kicinski wrote: > > Only three families use info->userhdr and fixed headers > > are discouraged for new families. So remove the pointer > > from struct genl_info to save som

[ovs-dev] [PATCH net-next 03/10] genetlink: remove userhdr from struct genl_info

2023-08-09 Thread Jakub Kicinski
Only three families use info->userhdr and fixed headers are discouraged for new families. So remove the pointer from struct genl_info to save some space. Compute the header pointer at runtime. Saved space will be used for a family pointer in later patches. Signed-off-by: Jakub Kicinski ---

Re: [ovs-dev] [PATCH net-next 0/3] net: handle the exp removal problem with ovs upcall properly

2023-07-18 Thread Jakub Kicinski
On Sun, 16 Jul 2023 17:09:16 -0400 Xin Long wrote: > With the OVS upcall, the original ct in the skb will be dropped, and when > the skb comes back from userspace it has to create a new ct again through > nf_conntrack_in() in either OVS __ovs_ct_lookup() or TC tcf_ct_act(). > > However, the new ct

Re: [ovs-dev] [PATCH net-next 2/2] net: openvswitch: add drop action

2023-07-10 Thread Jakub Kicinski
On Mon, 10 Jul 2023 20:39:11 +0200 Ilya Maximets wrote: > > As far as I understand what you're proposing, yes :) > > OK. Just to spell it all out: > > Userspace will install a flow with an OVS_FLOW_CMD_NEW: > > match:ip,tcp,... actions:something,something,drop(0) > match:ip,udp,... action

Re: [ovs-dev] [PATCH net-next 2/2] net: openvswitch: add drop action

2023-07-10 Thread Jakub Kicinski
On Mon, 10 Jul 2023 18:51:19 +0200 Ilya Maximets wrote: > Makes sense. I wasn't sure that's a good solution from a kernel perspective > either. It's better than defining all these reasons, IMO, but it's not good > enough to be considered acceptable, I agree. > > How about we define just 2 reason

Re: [ovs-dev] [PATCH net-next 2/2] net: openvswitch: add drop action

2023-07-07 Thread Jakub Kicinski
On Fri, 7 Jul 2023 18:04:36 +0200 Ilya Maximets wrote: > >> That already exists, right? Johannes added it in the last release for > >> WiFi. > > > > I'm not sure. The SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE behaves > > similarly > > to that on a surface. However, looking closer, any value t

Re: [ovs-dev] [PATCH net-next 2/2] net: openvswitch: add drop action

2023-07-07 Thread Jakub Kicinski
On Fri, 7 Jul 2023 12:30:38 +0200 Ilya Maximets wrote: > A wild idea: How about we do not define actual reasons? i.e. define a > subsystem and just call kfree_skb_reason(skb, SUBSYSTEM | value), where > 'value' is whatever userspace gives as long as it is within a subsystem > range? That already

Re: [ovs-dev] [PATCH net v3] net: openvswitch: fix race on port output

2023-04-06 Thread Jakub Kicinski
On Wed, 5 Apr 2023 07:53:41 + Felix Huettner wrote: > assume the following setup on a single machine: > 1. An openvswitch instance with one bridge and default flows > 2. two network namespaces "server" and "client" > 3. two ovs interfaces "server" and "client" on the bridge > 4. for each ovs in

Re: [ovs-dev] [PATCH] net: openvswitch: fix race on port output

2023-04-03 Thread Jakub Kicinski
On Mon, 3 Apr 2023 11:18:46 + Felix Hüttner wrote: > On Sat, 1 Apr 2023 6:25:00 +0000 Jakub Kicinski wrote: > > On Fri, 31 Mar 2023 06:25:13 + Felix Hüttner wrote: > > > diff --git a/net/core/dev.c b/net/core/dev.c > > > index 253584777101..6628323b7bea 100644

Re: [ovs-dev] [PATCH] net: openvswitch: fix race on port output

2023-03-31 Thread Jakub Kicinski
On Fri, 31 Mar 2023 08:19:09 + Felix Huettner wrote: > 1. An openvswitch instance with one bridge and default flows > 2. two network namespaces "server" and "client" > 3. two ovs interfaces "server" and "client" on the bridge > 4. for each ovs interface a veth pair with a matching name and 32 r

Re: [ovs-dev] [PATCH] net: openvswitch: fix race on port output

2023-03-31 Thread Jakub Kicinski
On Fri, 31 Mar 2023 06:25:13 + Felix Hüttner wrote: > diff --git a/net/core/dev.c b/net/core/dev.c > index 253584777101..6628323b7bea 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -3199,6 +3199,7 @@ static u16 skb_tx_hash(const struct net_device *dev, > } > > if (sk

Re: [ovs-dev] [PATCHv2 net-next 0/5] net: move more duplicate code of ovs and tc conntrack into nf_conntrack_ovs

2023-02-09 Thread Jakub Kicinski
On Tue, 7 Feb 2023 17:52:05 -0500 Xin Long wrote: > We've moved some duplicate code into nf_nat_ovs in: > > "net: eliminate the duplicate code in the ct nat functions of ovs and tc" > > This patchset addresses more code duplication in the conntrack of ovs > and tc then creates nf_conntrack_ovs

Re: [ovs-dev] [PATCH net-next v2 1/3] string_helpers: Move string_is_valid() to the header

2023-02-07 Thread Jakub Kicinski
On Mon, 6 Feb 2023 18:13:12 +0200 Andy Shevchenko wrote: > +static inline bool string_is_valid(const char *s, int len) > +{ > + return memchr(s, '\0', len) ? true : false; > +} I was tempted to suggest adding a kdoc, but perhaps the function doesn't have an obvious enough name? Maybe we shoul

Re: [ovs-dev] 回复: [PATCH v2 1/1] net: openvswitch: reduce cpu_used_mask memory

2023-02-01 Thread Jakub Kicinski
On Wed, 1 Feb 2023 21:35:15 -0800 Jakub Kicinski wrote: > On Thu, 2 Feb 2023 05:09:51 + 陶 缘 wrote: > > I guest you are pointing to the field "From: taoyuan_e...@hotmail.com" in > > the patch header linked from "Headers show" section in the patch page > &g

Re: [ovs-dev] 回复: [PATCH v2 1/1] net: openvswitch: reduce cpu_used_mask memory

2023-02-01 Thread Jakub Kicinski
On Thu, 2 Feb 2023 05:09:51 + 陶 缘 wrote: > I guest you are pointing to the field "From: taoyuan_e...@hotmail.com" in the > patch header linked from "Headers show" section in the patch page > > > https://patchwork.kernel.org/project/netdevbpf/patch/os3p286mb22954422e3dd09ff5fd6b091f5...@os3p2

Re: [ovs-dev] [PATCH] scripts/spelling.txt: add "exsits" pattern and fix typo instances

2023-01-26 Thread Jakub Kicinski
On Thu, 26 Jan 2023 16:22:05 +0100 Luca Ceresoli wrote: > Fix typos and add the following to the scripts/spelling.txt: > > exsits||exists > > Signed-off-by: Luca Ceresoli You need to split this up per subsystem, I reckon :( ___ dev mailing list d...

Re: [ovs-dev] [PATCH] [PATCH v6 net-next] net: openvswitch: Add support to count upcall packets

2022-11-30 Thread Jakub Kicinski
On Wed, 30 Nov 2022 04:15:59 -0500 wangchuanlei wrote: > +/** > + * ovs_vport_get_upcall_stats - retrieve upcall stats > + * > + * @vport: vport from which to retrieve the stats > + * @ovs_vport_upcall_stats: location to store stats s/ovs_vport_upcall_// > + * > + * Retrieves upcall stats for t

[ovs-dev] [PATCH net] net: openvswitch: add missing .resv_start_op

2022-10-27 Thread Jakub Kicinski
enetlink: start to validate reserved header bytes") Signed-off-by: Jakub Kicinski --- CC: pshe...@ovn.org CC: p...@paul-moore.com CC: d...@openvswitch.org --- net/openvswitch/datapath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.

Re: [ovs-dev] [PATCH 02/12] skbuff: Proactively round up to kmalloc bucket size

2022-09-22 Thread Jakub Kicinski
hw(data + size); I'd rename osize here to alloc_size for consistency but one could argue either way :) Acked-by: Jakub Kicinski ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH v2 net 2/2] net: openvswitch: allow conntrack in non-initial user namespace

2022-09-22 Thread Jakub Kicinski
On Wed, 21 Sep 2022 03:19:46 +0200 Michael Weiß wrote: > Similar to the previous commit, the Netlink interface of the OVS > conntrack module was restricted to global CAP_NET_ADMIN by using > GENL_ADMIN_PERM. This is changed to GENL_UNS_ADMIN_PERM to support > unprivileged containers in non-initial

[ovs-dev] [PATCH net-next] genetlink: start to validate reserved header bytes

2022-08-24 Thread Jakub Kicinski
new families do the right thing by default put the onus of opting out of validation on existing families. Signed-off-by: Jakub Kicinski --- CC: j...@resnulli.us CC: johan...@sipsolutions.net CC: linux-bl...@vger.kernel.org CC: osmocom-net-g...@lists.osmocom.org CC: linux-w...@vger.kernel.org CC

Re: [ovs-dev] [PATCH net-next v2 1/3] openvswitch: allow specifying ifindex of new interfaces

2022-08-23 Thread Jakub Kicinski
On Tue, 23 Aug 2022 16:50:21 +0300 Andrey Zhadchenko wrote: > > Are you 100% sure that all user space making this call initializes > > dp_ifindex to 0? There is no validation in the kernel today that > > the field is not garbage as far as I can tell. > > > > If you are sure, please add the appropr

Re: [ovs-dev] [PATCH net-next v2 3/3] openvswitch: add OVS_DP_ATTR_PER_CPU_PIDS to get requests

2022-08-22 Thread Jakub Kicinski
On Fri, 19 Aug 2022 18:30:44 +0300 Andrey Zhadchenko wrote: > -static size_t ovs_dp_cmd_msg_size(void) > +static size_t ovs_dp_cmd_msg_size(struct datapath *dp) > { > size_t msgsize = NLMSG_ALIGN(sizeof(struct ovs_header)); > + struct dp_nlsk_pids *pids = ovsl_dereference(dp->upcall_port

Re: [ovs-dev] [PATCH net-next v2 2/3] openvswitch: fix memory leak at failed datapath creation

2022-08-22 Thread Jakub Kicinski
On Mon, 22 Aug 2022 08:53:44 -0400 Aaron Conole wrote: > Thanks for this patch. I guess independent of this series, this patch > should be applied to the net tree as well - it fixes an existing issue. Yes, please, this needs to be reposted separately as [PATCH net]. __

Re: [ovs-dev] [PATCH net-next v2 1/3] openvswitch: allow specifying ifindex of new interfaces

2022-08-22 Thread Jakub Kicinski
On Fri, 19 Aug 2022 18:30:42 +0300 Andrey Zhadchenko wrote: > CRIU is preserving ifindexes of net devices after restoration. However, > current Open vSwitch API does not allow to target ifindex, so we cannot > correctly restore OVS configuration. > > Use ovs_header->dp_ifindex during OVS_DP_CMD_NE

Re: [ovs-dev] [PATCH net-next 1/2] openvswitch: Fix double reporting of drops in dropwatch

2022-07-29 Thread Jakub Kicinski
On Thu, 28 Jul 2022 12:12:58 -0400 Mike Pattrick wrote: > Frames sent to userspace can be reported as dropped in > ovs_dp_process_packet, however, if they are dropped in the netlink code > then netlink_attachskb will report the same frame as dropped. > > This patch checks for error codes which ind

Re: [ovs-dev] [PATCH net-next] net: rename reference+tracking helpers

2022-06-08 Thread Jakub Kicinski
On Wed, 8 Jun 2022 16:58:08 -0600 David Ahern wrote: > On 6/8/22 8:58 AM, Jakub Kicinski wrote: > > IMO to encourage use of the track-capable API we could keep their names > > short and call the legacy functions __netdev_hold() as I mentioned or > > maybe netdev_hold_notrack(

Re: [ovs-dev] [PATCH net-next] net: rename reference+tracking helpers

2022-06-08 Thread Jakub Kicinski
On Wed, 8 Jun 2022 10:27:15 +0200 Jiri Pirko wrote: > Wed, Jun 08, 2022 at 06:39:55AM CEST, k...@kernel.org wrote: > >Netdev reference helpers have a dev_ prefix for historic > >reasons. Renaming the old helpers would be too much churn > > Hmm, I think it would be great to eventually rename the

[ovs-dev] [PATCH net-next] net: rename reference+tracking helpers

2022-06-07 Thread Jakub Kicinski
ack() -> netdev_put() dev_replace_track() -> netdev_ref_replace() Signed-off-by: Jakub Kicinski --- CC: dsah...@kernel.org CC: steffen.klass...@secunet.com CC: jreu...@yaina.de CC: ra...@blackwall.org CC: j...@resnulli.us CC: kgr...@linux.ibm.com CC: ivec...@redhat.com CC: jma...@redhat.com

Re: [ovs-dev] [PATCH RFC 4/5] net/tls: Add support for PF_TLSH (a TLS handshake listener)

2022-04-28 Thread Jakub Kicinski
On Thu, 28 Apr 2022 10:09:17 -0400 Benjamin Coddington wrote: > > Noob reply: wish I knew. (I somewhat hoped _you_ would've been able to > > tell me.) > > > > Thing is, the only method I could think of for fd passing is the POSIX fd > > passing via unix_attach_fds()/unix_detach_fds(). But that's

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-03-09 Thread Jakub Kicinski
On Wed, 9 Mar 2022 14:43:07 +0100 Ilya Maximets wrote: > >> It's a bit of an uncharted territory, hard to say what's right. > >> It may be a little easier to code up the rejection if we have > >> the types defined (which I think we need to do in > >> __parse_flow_nlattrs()? seems OvS does its own n

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-03-08 Thread Jakub Kicinski
On Tue, 8 Mar 2022 19:25:31 +0100 Ilya Maximets wrote: > > since its rc7 we end up with kernel and ovs broken with each other. > > can we revert the kernel patches anyway and introduce them again later > > when ovs userspace is also updated? > > I don't think this patch is part of 5-17-rc7. AFA

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-03-08 Thread Jakub Kicinski
On Tue, 8 Mar 2022 20:33:12 +0100 Ilya Maximets wrote: > On 3/8/22 17:17, Jakub Kicinski wrote: > > On Tue, 8 Mar 2022 15:12:45 +0100 Ilya Maximets wrote: > >> Yes, that is something that I had in mind too. The only thing that makes > >> me uncomfortable is OVS_KEY

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-03-08 Thread Jakub Kicinski
On Tue, 8 Mar 2022 15:12:45 +0100 Ilya Maximets wrote: > >> diff --git a/include/uapi/linux/openvswitch.h > >> b/include/uapi/linux/openvswitch.h > >> index 9d1710f20505..ab6755621e02 100644 > >> --- a/include/uapi/linux/openvswitch.h > >> +++ b/include/uapi/linux/openvswitch.h > >> @@ -351,11 +35

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-03-07 Thread Jakub Kicinski
On Tue, 8 Mar 2022 01:04:00 +0100 Ilya Maximets wrote: > > Thanks for the explanation, we can apply a revert if that'd help your > > CI / ongoing development but sounds like the fix really is in user > > space. Expecting netlink attribute lists not to grow is not fair. > > I don't think it was i

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-03-07 Thread Jakub Kicinski
On Mon, 7 Mar 2022 23:14:13 +0100 Ilya Maximets wrote: > The main problem is that userspace uses the modified copy of the uapi header > which looks like this: > > https://github.com/openvswitch/ovs/blob/f77dbc1eb2da2523625cd36922c6fccfcb3f3eb7/datapath/linux/compat/include/linux/openvswitch.h#L3

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-03-07 Thread Jakub Kicinski
On Mon, 7 Mar 2022 10:49:31 +0200 Roi Dayan wrote: > >> I think there is a missing userspace fix. didnt verify yet. > >> but in ovs userspace odp-netlink.h created from > >> datapath/linux/compat/include/linux/openvswitch.h > >> and that file is not synced the change here. > >> So the new enum OVS

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

2022-02-22 Thread Jakub Kicinski
You'll need to rebase, the patch which made everything force inlined got merged. On Sun, 20 Feb 2022 15:21:14 +0200 Paul Blakey wrote: > +static inline __wsum > +csum_block_replace(__wsum csum, __wsum old, __wsum new, int offset) > +{ > + return csum_block_add(csum_block_sub(csum, old, offset)

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

2022-02-17 Thread Jakub Kicinski
On Wed, 16 Feb 2022 15:53:08 +0200 Paul Blakey wrote: > + skb->csum = > + ~csum_block_add(csum_block_sub(~skb->csum, > +(__force __wsum) > (ipv6_tclass << 4), 1), > + (__force __

Re: [ovs-dev] [PATCH net 1/1] net/sched: act_ct: Fix flow table lookup failure with no originating ifindex

2022-02-17 Thread Jakub Kicinski
On Thu, 17 Feb 2022 11:34:24 +0200 Paul Blakey wrote: > Fixes: 9795ded7f924 ("net/sched: act_ct: Fill offloading tupledx") Fixes tag: Fixes: 9795ded7f924 ("net/sched: act_ct: Fill offloading tupledx") Has these problem(s): - Subject does not match target commit subject Just use

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

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

2022-02-10 Thread Jakub Kicinski
On Thu, 10 Feb 2022 10:53:24 +0200 Paul Blakey wrote: > > The calls seem a little heavy for single byte replacements. > > Can you instead add a helper based on csum_replace4() maybe? > > > > BTW doesn't pedit have the same problem? > > I don't think they are heavier then csum_replace4, csum_repl

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2022-02-09 Thread Jakub Kicinski
On Wed, 9 Feb 2022 12:46:01 -0800 Cpp Code wrote: > > ok, I see advantage of using skb_header_pointer() in this case, but > > replacing all check_header() with skb_header_pointer() would add lot > > of copy operation in flow extract. Anyways for this use case > > skb_header_pointer() is fine. > > >

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

2022-02-08 Thread Jakub Kicinski
On Mon, 7 Feb 2022 16:41:01 +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 > the

Re: [ovs-dev] [PATCH net 1/1] net: openvswitch: Fix ct_state nat flags for conns arriving from tc

2022-01-04 Thread Jakub Kicinski
On Tue, 4 Jan 2022 10:28:21 +0200 Paul Blakey wrote: > Netfilter conntrack maintains NAT flags per connection indicating > whether NAT was configured for the connection. Openvswitch maintains > NAT flags on the per packet flow key ct_state field, indicating > whether NAT was actually executed on th

Re: [ovs-dev] [PATCH net v2 2/3] net/sched: flow_dissector: Fix matching on zone id for invalid conns

2021-12-10 Thread Jakub Kicinski
On Thu, 9 Dec 2021 09:57:33 +0200 Paul Blakey wrote: > @@ -238,10 +239,12 @@ void > skb_flow_dissect_ct(const struct sk_buff *skb, > struct flow_dissector *flow_dissector, > void *target_container, u16 *ctinfo_map, > - size_t mapsize, bool post_c

Re: [ovs-dev] [PATCH net 0/3] net/sched: Fix ct zone matching for invalid conntrack state

2021-12-08 Thread Jakub Kicinski
On Wed, 8 Dec 2021 19:02:37 +0200 Paul Blakey wrote: > Currently, when a packet is marked as invalid conntrack_in in act_ct, > post_ct will be set, and connection info (nf_conn) will be removed > from the skb. Later openvswitch and flower matching will parse this > as ct_state=+trk+inv. But because

Re: [ovs-dev] [PATCH net-next v8] net: openvswitch: IPv6: Add IPv6 extension header support

2021-11-02 Thread Jakub Kicinski
On Fri, 29 Oct 2021 11:20:08 -0700 Toms Atteka wrote: > This change adds a new OpenFlow field OFPXMT_OFB_IPV6_EXTHDR and > packets can be filtered using ipv6_ext flag. > > Signed-off-by: Toms Atteka Hi! This patch didn't get reviewed in time for the v5.16 merge window, please continue the work b

Re: [ovs-dev] [PATCH net-next v6] net: openvswitch: IPv6: Add IPv6 extension header support

2021-09-29 Thread Jakub Kicinski
On Wed, 29 Sep 2021 08:19:05 +0200 Nicolas Dichtel wrote: > > /* Insert a kernel only KEY_ATTR */ > > #define OVS_KEY_ATTR_TUNNEL_INFO__OVS_KEY_ATTR_MAX > > #undef OVS_KEY_ATTR_MAX > > #define OVS_KEY_ATTR_MAX__OVS_KEY_ATTR_MAX > Following the other thread [1], this will break if

Re: [ovs-dev] [PATCH net-next v6] net: openvswitch: IPv6: Add IPv6 extension header support

2021-09-28 Thread Jakub Kicinski
On Tue, 28 Sep 2021 12:47:27 -0700 Toms Atteka wrote: > diff --git a/include/uapi/linux/openvswitch.h > b/include/uapi/linux/openvswitch.h > index a87b44cd5590..dc6eb5f6399f 100644 > --- a/include/uapi/linux/openvswitch.h > +++ b/include/uapi/linux/openvswitch.h > @@ -346,6 +346,13 @@ enum ovs_key

Re: [ovs-dev] [PATCH net-next v5] net: openvswitch: IPv6: Add IPv6 extension header support

2021-09-21 Thread Jakub Kicinski
On Mon, 20 Sep 2021 11:20:38 -0700 Toms Atteka wrote: > This change adds a new OpenFlow field OFPXMT_OFB_IPV6_EXTHDR and > packets can be filtered using ipv6_ext flag. > > Signed-off-by: Toms Atteka Please make sure to check the files you touch with ./scripts/kernel-doc -none You're adding kdo

Re: [ovs-dev] [PATCH v2] openvswitch: Fix condition check in do_execute_actions() by using nla_ok()

2021-09-17 Thread Jakub Kicinski
On Fri, 17 Sep 2021 08:07:14 + Jiasheng Jiang wrote: > Just using 'rem > 0' might be unsafe, so it's better > to use the nla_ok() instead. > Because we can see from the nla_next() that > '*remaining' might be smaller than 'totlen'. And nla_ok() > will avoid it happening. > For example, ovs_dp_p

Re: [ovs-dev] [PATCH] openvswitch: Fix condition check by using nla_ok()

2021-09-16 Thread Jakub Kicinski
On Thu, 16 Sep 2021 07:36:40 -0700 Jakub Kicinski wrote: > On Thu, 16 Sep 2021 01:43:23 + Jiasheng Jiang wrote: > > Just using 'rem > 0' might be unsafe, so it's better > > to use the nla_ok() instead. > > Because we can see from the nla_next() that

Re: [ovs-dev] [PATCH] openvswitch: Fix condition check by using nla_ok()

2021-09-16 Thread Jakub Kicinski
On Thu, 16 Sep 2021 01:43:23 + Jiasheng Jiang wrote: > Just using 'rem > 0' might be unsafe, so it's better > to use the nla_ok() instead. > Because we can see from the nla_next() that > '*remaining' might be smaller than 'totlen'. And nla_ok() > will avoid it happening. > > Signed-off-by: Jia

Re: [ovs-dev] [External] [PATCH] ovs: datapath: clear skb->tstamp in forwarding path

2021-08-17 Thread Jakub Kicinski
On Tue, 17 Aug 2021 10:25:24 +0800 范开喜 wrote: > fq qdisc requires tstamp to be cleared in the forwarding path. Now ovs > doesn't clear skb->tstamp. We encountered a problem with linux > version 5.4.56 and ovs version 2.14.1, and packets failed to > dequeue from qdisc when fq qdisc was attached to o

Re: [ovs-dev] [PATCH net v2] net: openvswitch: fix TTL decrement exception action execution

2020-12-14 Thread Jakub Kicinski
On Mon, 7 Dec 2020 05:08:39 -0500 Eelco Chaudron wrote: > Currently, the exception actions are not processed correctly as the wrong > dataset is passed. This change fixes this, including the misleading > comment. > > In addition, a check was added to make sure we work on an IPv4 packet, > and not

Re: [ovs-dev] [PATCH net] net: openvswitch: fix TTL decrement exception action execution

2020-12-04 Thread Jakub Kicinski
On Fri, 4 Dec 2020 07:16:23 -0500 Eelco Chaudron wrote: > Currently, the exception actions are not processed correctly as the wrong > dataset is passed. This change fixes this, including the misleading > comment. > > In addition, a check was added to make sure we work on an IPv4 packet, > and not

Re: [ovs-dev] [PATCH net] openvswitch: fix error return code in validate_and_copy_dec_ttl()

2020-12-04 Thread Jakub Kicinski
On Fri, 04 Dec 2020 13:07:48 +0100 Eelco Chaudron wrote: > > Fix to return a negative error code from the error handling > > case instead of 0, as done elsewhere in this function. > > > > Changing 'return start' to 'return action_start' can fix this bug. > > > > Fixes: 69929d4c49e1 ("net: openvswit

Re: [ovs-dev] [PATCH net] net: openvswitch: fix TTL decrement action netlink message format

2020-11-23 Thread Jakub Kicinski
On Mon, 23 Nov 2020 20:36:39 +0100 Matteo Croce wrote: > On Fri, Nov 20, 2020 at 10:12 PM Jakub Kicinski wrote: > > On Thu, 19 Nov 2020 04:04:04 -0500 Eelco Chaudron wrote: > > > Currently, the openvswitch module is not accepting the correctly formated > > >

Re: [ovs-dev] [PATCH net] net: openvswitch: fix TTL decrement action netlink message format

2020-11-20 Thread Jakub Kicinski
On Thu, 19 Nov 2020 04:04:04 -0500 Eelco Chaudron wrote: > Currently, the openvswitch module is not accepting the correctly formated > netlink message for the TTL decrement action. For both setting and getting > the dec_ttl action, the actions should be nested in the > OVS_DEC_TTL_ATTR_ACTION attri

Re: [ovs-dev] [PATCH net-next v2] net: openvswitch: Be liberal in tcp conntrack.

2020-11-20 Thread Jakub Kicinski
On Fri, 20 Nov 2020 07:32:11 +0100 Florian Westphal wrote: > Jakub Kicinski wrote: > > On Mon, 16 Nov 2020 18:31:26 +0530 nusid...@redhat.com wrote: > > > From: Numan Siddique > > > > > > There is no easy way to distinguish if a conntracked tcp packe

  1   2   >