Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2018 12:58:00 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330537 - in head/sys: compat/linuxkpi/common/include/linux dev/mlx4/mlx4_core
Message-ID:  <201803061258.w26Cw05B076386@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Tue Mar  6 12:58:00 2018
New Revision: 330537
URL: https://svnweb.freebsd.org/changeset/base/330537

Log:
  Add mapping for several ethernet types used by Linux to FreeBSD
  ethernet types.
  
  Reviewed by:	hselasky
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D14594

Modified:
  head/sys/compat/linuxkpi/common/include/linux/if_ether.h
  head/sys/dev/mlx4/mlx4_core/mlx4.h

Modified: head/sys/compat/linuxkpi/common/include/linux/if_ether.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/if_ether.h	Tue Mar  6 12:01:31 2018	(r330536)
+++ head/sys/compat/linuxkpi/common/include/linux/if_ether.h	Tue Mar  6 12:58:00 2018	(r330537)
@@ -35,8 +35,6 @@
 
 #include <net/ethernet.h>
 
-#define	ETH_P_8021Q	ETHERTYPE_VLAN
-
 #define ETH_HLEN        ETHER_HDR_LEN   /* Total octets in header.                              */
 #ifndef ETH_ALEN
 #define ETH_ALEN        ETHER_ADDR_LEN
@@ -47,6 +45,11 @@
 /*
  * defined Ethernet Protocol ID's.
  */
-#define ETH_P_IP        0x0800          /* Internet Protocol packet                             */
+#define	ETH_P_IP        ETHERTYPE_IP
+#define	ETH_P_IPV6	ETHERTYPE_IPV6
+#define	ETH_P_MPLS_UC	ETHERTYPE_MPLS
+#define	ETH_P_MPLS_MC	ETHERTYPE_MPLS_MCAST
+#define	ETH_P_8021Q	ETHERTYPE_VLAN
+#define	ETH_P_8021AD	ETHERTYPE_QINQ
 
 #endif	/* _LINUX_IF_ETHER_H_ */

Modified: head/sys/dev/mlx4/mlx4_core/mlx4.h
==============================================================================
--- head/sys/dev/mlx4/mlx4_core/mlx4.h	Tue Mar  6 12:01:31 2018	(r330536)
+++ head/sys/dev/mlx4/mlx4_core/mlx4.h	Tue Mar  6 12:58:00 2018	(r330537)
@@ -66,8 +66,6 @@
 
 #define MLX4_QUERY_IF_STAT_RESET	BIT(31)
 
-#define	ETH_P_8021AD	0x88A8
-
 enum {
 	MLX4_HCR_BASE		= 0x80680,
 	MLX4_HCR_SIZE		= 0x0001c,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803061258.w26Cw05B076386>