diff mbox series

[ovs-dev,V2,4/4] netdev-offload-dpdk: Don't ignore frags as they are handled

Message ID 20210816135320.1922118-5-elibr@nvidia.com
State Accepted
Headers show
Series netdev datapath offload frag matching | 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

Eli Britstein Aug. 16, 2021, 1:53 p.m. UTC
Signed-off-by: Eli Britstein <elibr@nvidia.com>
---
 NEWS                      | 2 ++
 lib/netdev-offload-dpdk.c | 5 -----
 2 files changed, 2 insertions(+), 5 deletions(-)

Comments

Maxime Coquelin Aug. 27, 2021, 9:30 a.m. UTC | #1
On 8/16/21 3:53 PM, Eli Britstein via dev wrote:
> Signed-off-by: Eli Britstein <elibr@nvidia.com>
> ---
>  NEWS                      | 2 ++
>  lib/netdev-offload-dpdk.c | 5 -----
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/NEWS b/NEWS
> index 26920e215..80466c014 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -8,6 +8,8 @@ Post-v2.16.0
>         by default.  'other_config:dpdk-socket-limit' can be set equal to
>         the 'other_config:dpdk-socket-mem' to preserve the legacy memory
>         limiting behavior.
> +     * Add hardware offload support for matching IPv4/IPv6 frag types
> +       (experimental).
>  
>  
>  v2.16.0 - xx xxx xxxx
> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> index d79ad1bea..f6b1514b4 100644
> --- a/lib/netdev-offload-dpdk.c
> +++ b/lib/netdev-offload-dpdk.c
> @@ -1234,11 +1234,6 @@ parse_flow_match(struct netdev *netdev,
>          proto = spec->hdr.next_proto_id &
>                  mask->hdr.next_proto_id;
>      }
> -    /* If fragmented, then don't HW accelerate - for now. */
> -    if (match->wc.masks.nw_frag & match->flow.nw_frag) {
> -        return -1;
> -    }
> -    consumed_masks->nw_frag = 0;

As this is experimental, shouldn't it be disabled by default or at least
a possibility to disable it should be provided?

>  
>      /* IP v6 */
>      if (match->flow.dl_type == htons(ETH_TYPE_IPV6)) {
>
Eli Britstein Aug. 27, 2021, 10:12 a.m. UTC | #2
On 8/27/2021 12:30 PM, Maxime Coquelin wrote:
> External email: Use caution opening links or attachments
>
>
> On 8/16/21 3:53 PM, Eli Britstein via dev wrote:
>> Signed-off-by: Eli Britstein <elibr@nvidia.com>
>> ---
>>   NEWS                      | 2 ++
>>   lib/netdev-offload-dpdk.c | 5 -----
>>   2 files changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/NEWS b/NEWS
>> index 26920e215..80466c014 100644
>> --- a/NEWS
>> +++ b/NEWS
>> @@ -8,6 +8,8 @@ Post-v2.16.0
>>          by default.  'other_config:dpdk-socket-limit' can be set equal to
>>          the 'other_config:dpdk-socket-mem' to preserve the legacy memory
>>          limiting behavior.
>> +     * Add hardware offload support for matching IPv4/IPv6 frag types
>> +       (experimental).
>>
>>
>>   v2.16.0 - xx xxx xxxx
>> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
>> index d79ad1bea..f6b1514b4 100644
>> --- a/lib/netdev-offload-dpdk.c
>> +++ b/lib/netdev-offload-dpdk.c
>> @@ -1234,11 +1234,6 @@ parse_flow_match(struct netdev *netdev,
>>           proto = spec->hdr.next_proto_id &
>>                   mask->hdr.next_proto_id;
>>       }
>> -    /* If fragmented, then don't HW accelerate - for now. */
>> -    if (match->wc.masks.nw_frag & match->flow.nw_frag) {
>> -        return -1;
>> -    }
>> -    consumed_masks->nw_frag = 0;
> As this is experimental, shouldn't it be disabled by default or at least
> a possibility to disable it should be provided?

It is not experimental (no need for ALLOW_EXPERIMENTAL_API). This code 
section is between IPv4 and IPv6 handling.

After patch #2, this is a dead code for IPv4 anyway. If we keep it, 
patch #3 is a dead code.

>
>>       /* IP v6 */
>>       if (match->flow.dl_type == htons(ETH_TYPE_IPV6)) {
>>
Maxime Coquelin Aug. 27, 2021, 10:21 a.m. UTC | #3
On 8/27/21 12:12 PM, Eli Britstein wrote:
> 
> On 8/27/2021 12:30 PM, Maxime Coquelin wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> On 8/16/21 3:53 PM, Eli Britstein via dev wrote:
>>> Signed-off-by: Eli Britstein <elibr@nvidia.com>
>>> ---
>>>   NEWS                      | 2 ++
>>>   lib/netdev-offload-dpdk.c | 5 -----
>>>   2 files changed, 2 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/NEWS b/NEWS
>>> index 26920e215..80466c014 100644
>>> --- a/NEWS
>>> +++ b/NEWS
>>> @@ -8,6 +8,8 @@ Post-v2.16.0
>>>          by default.  'other_config:dpdk-socket-limit' can be set
>>> equal to
>>>          the 'other_config:dpdk-socket-mem' to preserve the legacy
>>> memory
>>>          limiting behavior.
>>> +     * Add hardware offload support for matching IPv4/IPv6 frag types
>>> +       (experimental).
>>>
>>>
>>>   v2.16.0 - xx xxx xxxx
>>> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
>>> index d79ad1bea..f6b1514b4 100644
>>> --- a/lib/netdev-offload-dpdk.c
>>> +++ b/lib/netdev-offload-dpdk.c
>>> @@ -1234,11 +1234,6 @@ parse_flow_match(struct netdev *netdev,
>>>           proto = spec->hdr.next_proto_id &
>>>                   mask->hdr.next_proto_id;
>>>       }
>>> -    /* If fragmented, then don't HW accelerate - for now. */
>>> -    if (match->wc.masks.nw_frag & match->flow.nw_frag) {
>>> -        return -1;
>>> -    }
>>> -    consumed_masks->nw_frag = 0;
>> As this is experimental, shouldn't it be disabled by default or at least
>> a possibility to disable it should be provided?
> 
> It is not experimental (no need for ALLOW_EXPERIMENTAL_API). This code
> section is between IPv4 and IPv6 handling.
> 
> After patch #2, this is a dead code for IPv4 anyway. If we keep it,
> patch #3 is a dead code.

OK, got it.

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

> 
>>
>>>       /* IP v6 */
>>>       if (match->flow.dl_type == htons(ETH_TYPE_IPV6)) {
>>>
>
diff mbox series

Patch

diff --git a/NEWS b/NEWS
index 26920e215..80466c014 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@  Post-v2.16.0
        by default.  'other_config:dpdk-socket-limit' can be set equal to
        the 'other_config:dpdk-socket-mem' to preserve the legacy memory
        limiting behavior.
+     * Add hardware offload support for matching IPv4/IPv6 frag types
+       (experimental).
 
 
 v2.16.0 - xx xxx xxxx
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index d79ad1bea..f6b1514b4 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -1234,11 +1234,6 @@  parse_flow_match(struct netdev *netdev,
         proto = spec->hdr.next_proto_id &
                 mask->hdr.next_proto_id;
     }
-    /* If fragmented, then don't HW accelerate - for now. */
-    if (match->wc.masks.nw_frag & match->flow.nw_frag) {
-        return -1;
-    }
-    consumed_masks->nw_frag = 0;
 
     /* IP v6 */
     if (match->flow.dl_type == htons(ETH_TYPE_IPV6)) {