On 1 Jul 2026, at 15:58, Eli Britstein wrote:

> Move this define to be public as a pre-step towards using it in other
> files.
> Also reorder the ETH_TYPE_XXX defines by their values.
>
> Acked-by: Eelco Chaudron <[email protected]>
> Signed-off-by: Eli Britstein <[email protected]>

Hi Eli,

I acked this before, but when looking at the list again I noticed
ETH_TYPE_NSH was in the wrong place.

//Eelco

> ---
>  lib/ovs-lldp.c  | 1 -
>  lib/packets.h   | 7 ++++---
>  tests/test-aa.c | 2 --
>  3 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/lib/ovs-lldp.c b/lib/ovs-lldp.c
> index 4470b5d92..486860b8d 100644
> --- a/lib/ovs-lldp.c
> +++ b/lib/ovs-lldp.c
> @@ -54,7 +54,6 @@ VLOG_DEFINE_THIS_MODULE(ovs_lldp);
>  #define LLDP_PROTOCOL_VERSION   0x00
>  #define LLDP_TYPE_CONFIG        0x00
>  #define LLDP_CHASSIS_TTL        120
> -#define ETH_TYPE_LLDP           0x88cc
>  #define MINIMUM_ETH_PACKET_SIZE 68
>
>  #define AA_STATUS_MULTIPLE \
> diff --git a/lib/packets.h b/lib/packets.h
> index 4d680412a..76b970f43 100644
> --- a/lib/packets.h
> +++ b/lib/packets.h
> @@ -406,18 +406,19 @@ void add_mpls(struct dp_packet *packet, ovs_be16 
> ethtype, ovs_be32 lse,
>
>  #define ETH_TYPE_IP            0x0800
>  #define ETH_TYPE_ARP           0x0806
> +#define ETH_TYPE_ERSPAN2       0x22eb   /* version 2 type III */
>  #define ETH_TYPE_TEB           0x6558
> +#define ETH_TYPE_RARP          0x8035
>  #define ETH_TYPE_VLAN_8021Q    0x8100
>  #define ETH_TYPE_VLAN          ETH_TYPE_VLAN_8021Q
> -#define ETH_TYPE_VLAN_8021AD   0x88a8
>  #define ETH_TYPE_IPV6          0x86dd
>  #define ETH_TYPE_LACP          0x8809
> -#define ETH_TYPE_RARP          0x8035
>  #define ETH_TYPE_MPLS          0x8847
>  #define ETH_TYPE_MPLS_MCAST    0x8848
>  #define ETH_TYPE_NSH           0x894f
> +#define ETH_TYPE_VLAN_8021AD   0x88a8
>  #define ETH_TYPE_ERSPAN1       0x88be   /* version 1 type II */
> -#define ETH_TYPE_ERSPAN2       0x22eb   /* version 2 type III */
> +#define ETH_TYPE_LLDP          0x88cc

ETH_TYPE_NSH needs to be moved to the bottom.

>
>  static inline bool eth_type_mpls(ovs_be16 eth_type)
>  {
> diff --git a/tests/test-aa.c b/tests/test-aa.c
> index ba21d5908..c7687bb1b 100644
> --- a/tests/test-aa.c
> +++ b/tests/test-aa.c
> @@ -23,8 +23,6 @@
>  #include "ovs-lldp.h"
>  #include "ovstest.h"
>
> -#define ETH_TYPE_LLDP   0x88cc
> -
>  /* Dummy MAC addresses */
>  static const struct eth_addr chassis_mac = ETH_ADDR_C(5e,10,8e,e7,84,ad);
>  static const struct eth_addr eth_src = ETH_ADDR_C(5e,10,8e,e7,84,ad);
> -- 
> 2.43.0

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

Reply via email to