On 7 Jan 2026, at 20:31, Aaron Conole wrote:

> Eelco Chaudron via dev <[email protected]> writes:
>
>> This patch introduces a common port management layer for
>> offload providers and integrates it into the dpif-offload
>> subsystem.  Existing dummy offload provider is updated to
>> use the new APIs.
>>
>> Signed-off-by: Eelco Chaudron <[email protected]>
>> ---

[...]

>> @@ -200,7 +202,7 @@ dpif_offload_attach_dp_offload(struct dpif *dpif,
>>  {
>>      ovsrcu_set(&dpif->dp_offload, dp_offload);
>>      ovs_refcount_ref(&dp_offload->ref_cnt);
>> -    return 0;
>> +    return EEXIST;
>
> I don't understand this - this function doesn't have the right
> information to declare something already exists so the interface really
> looks broken to me here.

Fixed as part of your comments on the first patch

>>  }

[...]

>>
>> +    CMAP_FOR_EACH_WITH_HASH (port, netdev_node, hash_pointer(netdev, 0),
>> +                             &mgr->netdev_to_port)
>> +    {
>
> Brace placement (nit)

Will fix in v5

>> +        if (port->netdev == netdev) {
>> +            return port;
>> +        }
>> +    }
>> +    return NULL;
>> +}
>> +
>> +struct dpif_offload_port_mgr_port *
>> +dpif_offload_port_mgr_find_by_odp_port(struct dpif_offload_port_mgr *mgr,
>> +                                       odp_port_t port_no)
>> +{
>> +    struct dpif_offload_port_mgr_port *port;
>> +
>> +    CMAP_FOR_EACH_WITH_HASH (port, odp_port_node,
>> +                             hash_int(odp_to_u32(port_no), 0),
>> +                             &mgr->odp_port_to_port)
>> +    {
>
> Again

Will fix in v5 in addition, found a similar problem in patch one’s 
dpif_offload_free_dp_offload_rcu(), which I also fixed.

>> +        if (port->port_no == port_no) {
>> +            return port;
>> +        }
>> +    }
>> +    return NULL;
>> +}

[…]

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to