diff mbox series

[ovs-dev] dpif-netlink: Allow offloading of flows with dl_type 0x1234.

Message ID 20190730151244.15319-1-i.maximets@samsung.com
State Accepted
Headers show
Series [ovs-dev] dpif-netlink: Allow offloading of flows with dl_type 0x1234. | expand

Commit Message

Ilya Maximets July 30, 2019, 3:12 p.m. UTC
'dpif_probe_feature()' always has DPIF_FP_PROBE flag set. Other probing
code uses dpif_execute() with DPIF_OP_EXECUTE, hence never calls
parse_flow_put().
Thus, this 'if' statement is wrong and should be removed as it only
forbids offloading of the real legitimate flows with dl_type 0x1234.
Dummy flows never reach this code.

CC: Paul Blakey <paulb@mellanox.com>
Fixes: 8b668ee3f0cc ("dpif-netlink: Use netdev flow put api to insert a flow")
Reported-by: Eli Britstein <elibr@mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/dpif-netlink.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Roi Dayan July 31, 2019, 5:57 a.m. UTC | #1
On 2019-07-30 6:12 PM, Ilya Maximets wrote:
> 'dpif_probe_feature()' always has DPIF_FP_PROBE flag set. Other probing
> code uses dpif_execute() with DPIF_OP_EXECUTE, hence never calls
> parse_flow_put().
> Thus, this 'if' statement is wrong and should be removed as it only
> forbids offloading of the real legitimate flows with dl_type 0x1234.
> Dummy flows never reach this code.
> 
> CC: Paul Blakey <paulb@mellanox.com>
> Fixes: 8b668ee3f0cc ("dpif-netlink: Use netdev flow put api to insert a flow")
> Reported-by: Eli Britstein <elibr@mellanox.com>
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  lib/dpif-netlink.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
> index 985a28426..7bc71d6d1 100644
> --- a/lib/dpif-netlink.c
> +++ b/lib/dpif-netlink.c
> @@ -2005,11 +2005,6 @@ parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
>          return err;
>      }
>  
> -    /* When we try to install a dummy flow from a probed feature. */
> -    if (match.flow.dl_type == htons(0x1234)) {
> -        return EOPNOTSUPP;
> -    }
> -
>      in_port = match.flow.in_port.odp_port;
>      dev = netdev_ports_get(in_port, dpif_class);
>      if (!dev) {
> 

Acked-by: Roi Dayan <roid@mellanox.com>
Ilya Maximets July 31, 2019, 2:07 p.m. UTC | #2
On 31.07.2019 8:57, Roi Dayan wrote:
> On 2019-07-30 6:12 PM, Ilya Maximets wrote:
>> 'dpif_probe_feature()' always has DPIF_FP_PROBE flag set. Other probing
>> code uses dpif_execute() with DPIF_OP_EXECUTE, hence never calls
>> parse_flow_put().
>> Thus, this 'if' statement is wrong and should be removed as it only
>> forbids offloading of the real legitimate flows with dl_type 0x1234.
>> Dummy flows never reach this code.
>>
>> CC: Paul Blakey <paulb@mellanox.com>
>> Fixes: 8b668ee3f0cc ("dpif-netlink: Use netdev flow put api to insert a flow")
>> Reported-by: Eli Britstein <elibr@mellanox.com>
>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>> ---
>>  lib/dpif-netlink.c | 5 -----
>>  1 file changed, 5 deletions(-)
>>
>> diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
>> index 985a28426..7bc71d6d1 100644
>> --- a/lib/dpif-netlink.c
>> +++ b/lib/dpif-netlink.c
>> @@ -2005,11 +2005,6 @@ parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
>>          return err;
>>      }
>>  
>> -    /* When we try to install a dummy flow from a probed feature. */
>> -    if (match.flow.dl_type == htons(0x1234)) {
>> -        return EOPNOTSUPP;
>> -    }
>> -
>>      in_port = match.flow.in_port.odp_port;
>>      dev = netdev_ports_get(in_port, dpif_class);
>>      if (!dev) {
>>
> 
> Acked-by: Roi Dayan <roid@mellanox.com>

Thanks! Applied to master and backported down to branch-2.8.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
index 985a28426..7bc71d6d1 100644
--- a/lib/dpif-netlink.c
+++ b/lib/dpif-netlink.c
@@ -2005,11 +2005,6 @@  parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
         return err;
     }
 
-    /* When we try to install a dummy flow from a probed feature. */
-    if (match.flow.dl_type == htons(0x1234)) {
-        return EOPNOTSUPP;
-    }
-
     in_port = match.flow.in_port.odp_port;
     dev = netdev_ports_get(in_port, dpif_class);
     if (!dev) {