diff mbox series

[ovs-dev] tc: Set action flags for tunnel_key release

Message ID 20210809072655.68540-1-roid@nvidia.com
State Accepted
Headers show
Series [ovs-dev] tc: Set action flags for tunnel_key release | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-Build_and_Test success github build: passed

Commit Message

Roi Dayan Aug. 9, 2021, 7:26 a.m. UTC
From: Vlad Buslov <vladbu@nvidia.com>

The commit that enabled 'no_percpu' flag for compatible actions missed the
tunnel_key release action code. Add missing call to nl_msg_put_act_flags().

Fixes: 292d5bd9bb34 ("tc: Set 'no_percpu' flag for compatible actions")
Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
---
 lib/tc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ilya Maximets Aug. 11, 2021, 11:39 a.m. UTC | #1
On 8/9/21 9:26 AM, Roi Dayan via dev wrote:
> From: Vlad Buslov <vladbu@nvidia.com>
> 
> The commit that enabled 'no_percpu' flag for compatible actions missed the
> tunnel_key release action code. Add missing call to nl_msg_put_act_flags().
> 
> Fixes: 292d5bd9bb34 ("tc: Set 'no_percpu' flag for compatible actions")
> Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
> Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
> Reviewed-by: Roi Dayan <roid@nvidia.com>
> ---

Hi, Marcelo.
Can you, please, take a look at this patch?

Best regards, Ilya Maximets.

>  lib/tc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/tc.c b/lib/tc.c
> index 33287ea05e7a..38a1dfc0ebc8 100644
> --- a/lib/tc.c
> +++ b/lib/tc.c
> @@ -2638,6 +2638,7 @@ nl_msg_put_flower_acts(struct ofpbuf *request, struct tc_flower *flower)
>                  if (!released && flower->tunnel) {
>                      act_offset = nl_msg_start_nested(request, act_index++);
>                      nl_msg_put_act_tunnel_key_release(request);
> +                    nl_msg_put_act_flags(request);
>                      nl_msg_end_nested(request, act_offset);
>                      released = true;
>                  }
>
Marcelo Leitner Aug. 11, 2021, 6:31 p.m. UTC | #2
On Wed, Aug 11, 2021 at 01:39:41PM +0200, Ilya Maximets wrote:
> On 8/9/21 9:26 AM, Roi Dayan via dev wrote:
> > From: Vlad Buslov <vladbu@nvidia.com>
> >
> > The commit that enabled 'no_percpu' flag for compatible actions missed the
> > tunnel_key release action code. Add missing call to nl_msg_put_act_flags().
> >
> > Fixes: 292d5bd9bb34 ("tc: Set 'no_percpu' flag for compatible actions")
> > Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
> > Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
> > Reviewed-by: Roi Dayan <roid@nvidia.com>
> > ---
>
> Hi, Marcelo.
> Can you, please, take a look at this patch?

Hi,

Just tested it. It works:

# tc filter show dev vxlan_sys_4789 parent ffff: | head -n 30
filter ingress protocol ip pref 3 flower chain 0
filter ingress protocol ip pref 3 flower chain 0 handle 0x1
  dst_mac 6a:66:2d:48:92:c2
  src_mac 00:00:00:00:00:0a
  eth_type ipv4
  enc_dst_ip 1.1.1.1
  enc_src_ip 1.1.1.2
  enc_key_id 0
  enc_dst_port 4789
  enc_tos 0
  ip_flags nofrag
  in_hw in_hw_count 1
        action order 1: tunnel_key  unset pipe
         index 5 ref 1 bind 1
        no_percpu                  <---- [A]
        used_hw_stats delayed

        action order 2: mirred (Egress Redirect to device enp130s0f0_0) stolen
        index 5 ref 1 bind 1
        cookie 722d78c06e4b7c21285241b7a4654607
        no_percpu
        used_hw_stats delayed
 ....

[A] is the one that was missing.

Tested-by: Marcelo Ricardo Leitner <mleitner@redhat.com>

Thanks,
Marcelo

>
> Best regards, Ilya Maximets.
>
> >  lib/tc.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/tc.c b/lib/tc.c
> > index 33287ea05e7a..38a1dfc0ebc8 100644
> > --- a/lib/tc.c
> > +++ b/lib/tc.c
> > @@ -2638,6 +2638,7 @@ nl_msg_put_flower_acts(struct ofpbuf *request, struct tc_flower *flower)
> >                  if (!released && flower->tunnel) {
> >                      act_offset = nl_msg_start_nested(request, act_index++);
> >                      nl_msg_put_act_tunnel_key_release(request);
> > +                    nl_msg_put_act_flags(request);
> >                      nl_msg_end_nested(request, act_offset);
> >                      released = true;
> >                  }
> >
>
Ilya Maximets Aug. 16, 2021, 8:06 p.m. UTC | #3
On 8/11/21 8:31 PM, Marcelo Ricardo Leitner wrote:
> On Wed, Aug 11, 2021 at 01:39:41PM +0200, Ilya Maximets wrote:
>> On 8/9/21 9:26 AM, Roi Dayan via dev wrote:
>>> From: Vlad Buslov <vladbu@nvidia.com>
>>>
>>> The commit that enabled 'no_percpu' flag for compatible actions missed the
>>> tunnel_key release action code. Add missing call to nl_msg_put_act_flags().
>>>
>>> Fixes: 292d5bd9bb34 ("tc: Set 'no_percpu' flag for compatible actions")
>>> Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
>>> Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
>>> Reviewed-by: Roi Dayan <roid@nvidia.com>
>>> ---
>>
>> Hi, Marcelo.
>> Can you, please, take a look at this patch?
> 
> Hi,
> 
> Just tested it. It works:
> 
> # tc filter show dev vxlan_sys_4789 parent ffff: | head -n 30
> filter ingress protocol ip pref 3 flower chain 0
> filter ingress protocol ip pref 3 flower chain 0 handle 0x1
>   dst_mac 6a:66:2d:48:92:c2
>   src_mac 00:00:00:00:00:0a
>   eth_type ipv4
>   enc_dst_ip 1.1.1.1
>   enc_src_ip 1.1.1.2
>   enc_key_id 0
>   enc_dst_port 4789
>   enc_tos 0
>   ip_flags nofrag
>   in_hw in_hw_count 1
>         action order 1: tunnel_key  unset pipe
>          index 5 ref 1 bind 1
>         no_percpu                  <---- [A]
>         used_hw_stats delayed
> 
>         action order 2: mirred (Egress Redirect to device enp130s0f0_0) stolen
>         index 5 ref 1 bind 1
>         cookie 722d78c06e4b7c21285241b7a4654607
>         no_percpu
>         used_hw_stats delayed
>  ....
> 
> [A] is the one that was missing.
> 
> Tested-by: Marcelo Ricardo Leitner <mleitner@redhat.com>

Thanks!  Applied to master and backported down to 2.14.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/lib/tc.c b/lib/tc.c
index 33287ea05e7a..38a1dfc0ebc8 100644
--- a/lib/tc.c
+++ b/lib/tc.c
@@ -2638,6 +2638,7 @@  nl_msg_put_flower_acts(struct ofpbuf *request, struct tc_flower *flower)
                 if (!released && flower->tunnel) {
                     act_offset = nl_msg_start_nested(request, act_index++);
                     nl_msg_put_act_tunnel_key_release(request);
+                    nl_msg_put_act_flags(request);
                     nl_msg_end_nested(request, act_offset);
                     released = true;
                 }