diff mbox series

[ovs-dev] tc: Fix nat port range when offloading ct action

Message ID 1583671823-14350-1-git-send-email-paulb@mellanox.com
State Accepted
Commit 6f37078481bc31b53090aa85bc45ce10206c3569
Headers show
Series [ovs-dev] tc: Fix nat port range when offloading ct action | expand

Commit Message

Paul Blakey March 8, 2020, 12:50 p.m. UTC
Port range struct is currently union so the last min/max port assignment
wins, and kernel doesn't receive the range.

Change it to struct type.

Fixes: 2bf6ffb76ac6 ("netdev-offload-tc: Add conntrack nat support")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
---
 lib/tc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Blakey March 11, 2020, 2:43 p.m. UTC | #1
Up

On 3/8/2020 2:50 PM, Paul Blakey wrote:
> Port range struct is currently union so the last min/max port assignment
> wins, and kernel doesn't receive the range.
>
> Change it to struct type.
>
> Fixes: 2bf6ffb76ac6 ("netdev-offload-tc: Add conntrack nat support")
> Signed-off-by: Paul Blakey <paulb@mellanox.com>
> ---
>  lib/tc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/tc.h b/lib/tc.h
> index d31c095..24a4994 100644
> --- a/lib/tc.h
> +++ b/lib/tc.h
> @@ -235,7 +235,7 @@ struct tc_action {
>                      } ipv6;
>                  };
>  
> -                union {
> +                struct {
>                      ovs_be16 min;
>                      ovs_be16 max;
>                  } port;
Ben Pfaff March 13, 2020, 5:51 p.m. UTC | #2
On Sun, Mar 08, 2020 at 02:50:23PM +0200, Paul Blakey wrote:
> Port range struct is currently union so the last min/max port assignment
> wins, and kernel doesn't receive the range.
> 
> Change it to struct type.
> 
> Fixes: 2bf6ffb76ac6 ("netdev-offload-tc: Add conntrack nat support")
> Signed-off-by: Paul Blakey <paulb@mellanox.com>

Applied to master, thanks!
Roi Dayan March 17, 2020, 2:10 p.m. UTC | #3
On 2020-03-11 4:43 PM, Paul Blakey wrote:
> Up
> 
> On 3/8/2020 2:50 PM, Paul Blakey wrote:
>> Port range struct is currently union so the last min/max port assignment
>> wins, and kernel doesn't receive the range.
>>
>> Change it to struct type.
>>
>> Fixes: 2bf6ffb76ac6 ("netdev-offload-tc: Add conntrack nat support")
>> Signed-off-by: Paul Blakey <paulb@mellanox.com>
>> ---
>>  lib/tc.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/tc.h b/lib/tc.h
>> index d31c095..24a4994 100644
>> --- a/lib/tc.h
>> +++ b/lib/tc.h
>> @@ -235,7 +235,7 @@ struct tc_action {
>>                      } ipv6;
>>                  };
>>  
>> -                union {
>> +                struct {
>>                      ovs_be16 min;
>>                      ovs_be16 max;
>>                  } port;
> 

Acked-by: Roi Dayan <roid@mellanox.com>


Hi Simon, Ilya, can you help getting this merged? small fix.

thanks,
Roi
Roi Dayan March 17, 2020, 2:14 p.m. UTC | #4
On 2020-03-17 4:10 PM, Roi Dayan wrote:
> 
> 
> On 2020-03-11 4:43 PM, Paul Blakey wrote:
>> Up
>>
>> On 3/8/2020 2:50 PM, Paul Blakey wrote:
>>> Port range struct is currently union so the last min/max port assignment
>>> wins, and kernel doesn't receive the range.
>>>
>>> Change it to struct type.
>>>
>>> Fixes: 2bf6ffb76ac6 ("netdev-offload-tc: Add conntrack nat support")
>>> Signed-off-by: Paul Blakey <paulb@mellanox.com>
>>> ---
>>>  lib/tc.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/lib/tc.h b/lib/tc.h
>>> index d31c095..24a4994 100644
>>> --- a/lib/tc.h
>>> +++ b/lib/tc.h
>>> @@ -235,7 +235,7 @@ struct tc_action {
>>>                      } ipv6;
>>>                  };
>>>  
>>> -                union {
>>> +                struct {
>>>                      ovs_be16 min;
>>>                      ovs_be16 max;
>>>                  } port;
>>
> 
> Acked-by: Roi Dayan <roid@mellanox.com>
> 
> 
> Hi Simon, Ilya, can you help getting this merged? small fix.
> 
> thanks,
> Roi
> 

My mistake. I see Ben merged it already but didn't notice.
diff mbox series

Patch

diff --git a/lib/tc.h b/lib/tc.h
index d31c095..24a4994 100644
--- a/lib/tc.h
+++ b/lib/tc.h
@@ -235,7 +235,7 @@  struct tc_action {
                     } ipv6;
                 };
 
-                union {
+                struct {
                     ovs_be16 min;
                     ovs_be16 max;
                 } port;