On 7/1/26 1:41 PM, David Marchand wrote:
> On Mon, 29 Jun 2026 at 18:50, Ilya Maximets <[email protected]> wrote:
>>
>> Kernel doesn't support SRv6 devices.  dpif_netlink_rtnl_create()
>> returns EOPNOTSUPP for them, but we should fail earlier during
>> verification.  We should also not call destroy() for them.
>>
>> This change doesn't fix any real issues, but makes the code a
>> little cleaner.
>>
>> Fixes: 03fc1ad78521 ("userspace: Add SRv6 tunnel support.")
>> Signed-off-by: Ilya Maximets <[email protected]>
>> ---
>>  lib/dpif-netlink-rtnl.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
>> index ca803d0af..31ca35aae 100644
>> --- a/lib/dpif-netlink-rtnl.c
>> +++ b/lib/dpif-netlink-rtnl.c
>> @@ -128,9 +128,8 @@ vport_type_to_kind(enum ovs_vport_type type,
>>              return NULL;
>>          }
>>      case OVS_VPORT_TYPE_GTPU:
>> -        return NULL;
>>      case OVS_VPORT_TYPE_SRV6:
>> -        return "srv6";
>> +        return NULL;
>>      case OVS_VPORT_TYPE_BAREUDP:
>>          return "bareudp";
>>      case OVS_VPORT_TYPE_NETDEV:
> 
> Really a nit: why not move those two cases a bit later with the
> netdev/internal/unspec group?
> It would be consistent with the verify and destroy code.

Good point.  I can make the following incremental change before
applying the patch:

diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
index 31ca35aae..1a83a530e 100644
--- a/lib/dpif-netlink-rtnl.c
+++ b/lib/dpif-netlink-rtnl.c
@@ -127,13 +127,12 @@ vport_type_to_kind(enum ovs_vport_type type,
         } else {
             return NULL;
         }
-    case OVS_VPORT_TYPE_GTPU:
-    case OVS_VPORT_TYPE_SRV6:
-        return NULL;
     case OVS_VPORT_TYPE_BAREUDP:
         return "bareudp";
     case OVS_VPORT_TYPE_NETDEV:
     case OVS_VPORT_TYPE_INTERNAL:
+    case OVS_VPORT_TYPE_GTPU:
+    case OVS_VPORT_TYPE_SRV6:
     case OVS_VPORT_TYPE_UNSPEC:
     case __OVS_VPORT_TYPE_MAX:
     default:
--

> 
> 
>> @@ -517,12 +516,12 @@ dpif_netlink_rtnl_port_destroy(const char *name, const 
>> char *type)
>>      case OVS_VPORT_TYPE_ERSPAN:
>>      case OVS_VPORT_TYPE_IP6ERSPAN:
>>      case OVS_VPORT_TYPE_IP6GRE:
>> -    case OVS_VPORT_TYPE_SRV6:
>>      case OVS_VPORT_TYPE_BAREUDP:
>>          return dpif_netlink_rtnl_destroy(name);
>>      case OVS_VPORT_TYPE_NETDEV:
>>      case OVS_VPORT_TYPE_INTERNAL:
>>      case OVS_VPORT_TYPE_GTPU:
>> +    case OVS_VPORT_TYPE_SRV6:
>>      case OVS_VPORT_TYPE_UNSPEC:
>>      case __OVS_VPORT_TYPE_MAX:
>>      default:
> 
> Reviewed-by: David Marchand <[email protected]>
> 
> 

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

Reply via email to