Re: [ovs-dev] [PATCH] net: openvswitch: Fix Use-After-Free in ovs_ct_exit

2024-04-22 Thread Eric Dumazet via dev
nd > the key will be free. > > To prevent this, it should be changed to hlist_for_each_entry_safe. > > Fixes: 11efd5cb04a1 ("openvswitch: Support conntrack zone limit") > Signed-off-by: Hyunwoo Kim Reviewed-by: Eric Dumazet Thanks ! __

Re: [ovs-dev] [PATCH net 1/2] net: openvswitch: limit the number of recursions from action sets

2024-02-06 Thread Eric Dumazet via dev
On Tue, Feb 6, 2024 at 3:55 PM Aaron Conole wrote: > > > Oops - I didn't consider it. > > Given that, maybe the best approach would not to rely on per-cpu > counter. I'll respin in the next series with a depth counter that I pass > to the function instead and compare that. I guess that should

Re: [ovs-dev] [PATCH net 1/2] net: openvswitch: limit the number of recursions from action sets

2024-02-06 Thread Eric Dumazet via dev
On Tue, Feb 6, 2024 at 2:11 PM Aaron Conole wrote: > > The ovs module allows for some actions to recursively contain an action > list for complex scenarios, such as sampling, checking lengths, etc. > When these actions are copied into the internal flow table, they are > evaluated to validate that

Re: [ovs-dev] [PATCH net-next v2] openvswitch: reduce stack usage in do_execute_actions

2023-09-21 Thread Eric Dumazet via dev
b0 01 00 00sub$0x1b0,%rsp > > NSH is not a very common protocol, but the space is allocated on every > recursive call or re-entry multiplying the wasted stack space. > Reviewed-by: Eric Dumazet ___ dev mailing list d...@openvswitch.org

Re: [ovs-dev] [PATCH net-next] openvswitch: reduce stack usage in do_execute_actions

2023-09-21 Thread Eric Dumazet via dev
On Thu, Sep 21, 2023 at 9:03 PM Ilya Maximets wrote: > > do_execute_actions() function can be called recursively multiple > times while executing actions that require pipeline forking or > recirculations. It may also be re-entered multiple times if the packet > leaves openvswitch module and

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

2023-04-07 Thread Eric Dumazet via dev
essage. If this does not happen just retry. > Below there is also the output of bpftrace for the functions mentioned > in the output. > ... Reviewed-by: Eric Dumazet ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

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

2023-04-04 Thread Eric Dumazet via dev
On Tue, Apr 4, 2023 at 9:33 AM 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

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 9:04 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 8:19 PM Ilya Maximets wrote: > > > > On 6/22/22 19:03, Eric Dumazet wrote: > > > On Wed, Jun 22, 2022 at 6:47 PM Eric Dumazet wrote: > > >> > > >>

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 8:19 PM Ilya Maximets wrote: > > On 6/22/22 19:03, Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 6:47 PM Eric Dumazet wrote: > >> > >> On Wed, Jun 22, 2022 at 6:39 PM Eric Dumazet wrote: > >>> > >>&g

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 6:47 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 6:39 PM Eric Dumazet wrote: > > > > On Wed, Jun 22, 2022 at 6:29 PM Eric Dumazet wrote: > > > > > > On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > > &

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 6:39 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 6:29 PM Eric Dumazet wrote: > > > > On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > > > > > On 6/22/22 13:43, Eric Dumazet wrote: > > > > > > > >

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 6:29 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > > > On 6/22/22 13:43, Eric Dumazet wrote: > > > > > I tested the patch below and it seems to fix the issue seen > > with OVS testsui

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > On 6/22/22 13:43, Eric Dumazet wrote: > > I tested the patch below and it seems to fix the issue seen > with OVS testsuite. Though it's not obvious for me why this > happens. Can you explain a bit more? Anyway, I am no

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > On 6/22/22 13:43, Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 1:32 PM Ilya Maximets wrote: > >> > >> On 6/22/22 12:36, Eric Dumazet wrote: > >>> On Wed, Jun 22, 2022 at 12:28 PM Florian W

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 1:32 PM Ilya Maximets wrote: > > On 6/22/22 12:36, Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 12:28 PM Florian Westphal wrote: > >> > >> Eric Dumazet wrote: > >>> On Sun, Jun 19, 2022 at 2:39 AM Ilya Maximets wrote: &g

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 12:28 PM Florian Westphal wrote: > > Eric Dumazet wrote: > > On Sun, Jun 19, 2022 at 2:39 AM Ilya Maximets wrote: > > > > > > Open vSwitch system test suite is broken due to inability to > > > load/unload netfilter modu

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 12:02 PM Eric Dumazet wrote: > > On Sun, Jun 19, 2022 at 2:39 AM Ilya Maximets wrote: > > > > Open vSwitch system test suite is broken due to inability to > > load/unload netfilter modules. kworker thread is getting trapped > > in the inf

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
issue rather than a proper solution and will not cover possible > issues in other parts of the code. > > Additionally checking for skb_zcopy() while deferring. This might > not be necessary, as I'm not sure if we can actually have zero copy > packets on this path, but seems worth h

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

2022-06-09 Thread Eric Dumazet via dev
On Thu, Jun 9, 2022 at 4:50 AM Paolo Abeni wrote: > > On Wed, 2022-06-08 at 16:00 -0700, Eric Dumazet wrote: > > On Wed, Jun 8, 2022 at 3:58 PM David Ahern wrote: > > > > > > On 6/8/22 8:58 AM, Jakub Kicinski wrote: > > > > IMO to encourage use of the t

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

2022-06-09 Thread Eric Dumazet via dev
On Wed, Jun 8, 2022 at 3:58 PM 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(). > > I like that

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

2021-08-18 Thread Eric Dumazet
On 8/18/21 4:22 AM, fankaixi...@bytedance.com wrote: > From: kaixi.fan > > 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

Re: [ovs-dev] [PATCH] net: openvswitch: use do_div() for 64-by-32 divisions:

2020-04-24 Thread Eric Dumazet
On 4/24/20 5:10 AM, Geert Uytterhoeven wrote: > On 32-bit architectures (e.g. m68k): > > ERROR: modpost: "__udivdi3" [net/openvswitch/openvswitch.ko] undefined! > ERROR: modpost: "__divdi3" [net/openvswitch/openvswitch.ko] undefined! > > Fixes: e57358873bb5d6ca ("net: openvswitch: use

Re: [ovs-dev] [PATCH v2 0/4] Check size of packets before sending

2018-01-25 Thread Eric Dumazet
On Fri, 2018-01-26 at 00:44 +1100, Daniel Axtens wrote: > Hi Eric, > > > May I ask which tree are you targeting ? > > > > ( Documentation/networking/netdev-FAQ.txt ) > > I have been targeting net-next, but I haven't pulled for about two > weeks. I will rebase and if there are conflicts I will

Re: [ovs-dev] [PATCH v2 0/4] Check size of packets before sending

2018-01-25 Thread Eric Dumazet
On Thu, 2018-01-25 at 15:31 +1100, Daniel Axtens wrote: > There are a few ways we can send packets that are too large to a > network driver. > > When non-GSO packets are forwarded, we validate their size, based on > the MTU of the destination device. However, when GSO packets are > forwarded, we