New flags for Fibre Channel over Ethernet (FCoE) (v2)
Subsystems (3)
cover New flags for Fibre Channel over Ethernet (FCoE) (v2)
v2 of the patches to add flags for Fibre Channel over Ethernet (FCoE) at Open-FCoE.org. Apologize for the incomplete series sent earlier. Also fixed the style issue in the first patch.
The first patch adds the protocol type as ETH_P_FCOE for FCoE protocol. The second one claims 8 bits back from NETIF_F_GSO_MASK to host NETIF_F_FCOE_CRC, and the third one adds NETIF_F_FCOE_CRC, NETIF_F_GSO_FCOE, and SKB_GSO_FCOE. Feature flags regarding offload features for FCoE are based on the earlier post at http://marc.info/?l=linux-netdev&m=122228979113312&w=2.
thanks.
yi
---
Chris Leech (2):
net: define feature flags for FCoE offloads
net: reclaim 8 upper bits of the netdev->features from GSO
Yi Zou (1):
net: add ETH_P_FCOE for Fibre Channel over Ethernet (FCoE)
drivers/net/xen-netfront.c | 2 +- include/linux/if_ether.h | 1 + include/linux/netdevice.h | 5 ++++- include/linux/skbuff.h | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
Signature : Yi Zou <[email protected]>
PATCH 1/3 net: add ETH_P_FCOE for Fibre Channel over Ethernet (FCoE)
---
include/linux/if_ether.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/linux/if_ether.h +1 -0
@@ -77,6 +77,7 @@#define ETH_P_PAE 0x888E/* Port Access Entity (IEEE 802.1X) */ #define ETH_P_AOE 0x88A2/* ATA over Ethernet */ #define ETH_P_TIPC 0x88CA/* TIPC */ +#define ETH_P_FCOE 0x8906/* Fibre Channel over Ethernet */ /* * Non DIX types. Won't clash for 1500 types.
Re: [PATCH 1/3] net: add ETH_P_FCOE for Fibre Channel over Ethernet (FCoE)
include/linux/if_ether.h line 80
Quoted 12 lines · Yi Zou
include/linux/if_ether.h| 1 +1 files changed, 1 insertions(+), 0 deletions(-)include/linux/if_ether.h +1
-0@@ -77,6 +77,7 @@#define ETH_P_PAE 0x888E/* Port Access Entity (IEEE 802.1X) */ #define ETH_P_AOE 0x88A2/* ATA over Ethernet */ #define ETH_P_TIPC 0x88CA/* TIPC */ +#define ETH_P_FCOE 0x8906/* Fibre Channel over Ethernet */
No problem with this one, but I note that some of the earlier codepoints are not in the numerical order, specifically these should be higher up in the list:
71 #define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */ 72 #define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */ 73 #define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */
Signature · 3 lines
Pekka Savola "You each name yourselves king, yet the Netcore Oy kingdom bleeds." Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
PATCH 2/3 net: reclaim 8 upper bits of the netdev->features from GSO
In reply to Yi ZouFrom: Chris Leech <[email protected]>
---
drivers/net/xen-netfront.c | 2 +- include/linux/netdevice.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/xen-netfront.c +1 -1
@@ -1502,7 +1502,7 @@ static int xennet_set_tso(struct net_device *dev, u32 data)static void xennet_set_features (struct net_device *dev) {/* Turn off all GSO bits except ROBUST. */ - dev->features &= (1 <<NETIF_F_GSO_SHIFT ) -1 ; + dev->features &= ~NETIF_F_GSO_MASK ; dev->features |=NETIF_F_GSO_ROBUST ;xennet_set_sg (dev,0 );
include/linux/netdevice.h +1 -1
@@ -524,7 +524,7 @@ struct net_device/* Segmentation offload features */ #define NETIF_F_GSO_SHIFT 16 -#define NETIF_F_GSO_MASK 0xffff0000 +#define NETIF_F_GSO_MASK 0x00ff0000#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
PATCH 3/3 net: define feature flags for FCoE offloads
In reply to Yi ZouFrom: Chris Leech <[email protected]>
---
include/linux/netdevice.h | 3 +++ include/linux/skbuff.h | 2 ++ 2 files changed, 5 insertions(+), 0 deletions(-)
include/linux/netdevice.h +3 -0
@@ -522,6 +522,8 @@ struct net_device#define NETIF_F_NETNS_LOCAL 8192/* Does not change network namespaces */ #define NETIF_F_LRO 32768/* large receive offload */ +#define NETIF_F_FCOE_CRC (1 << 24)/* FCoE CRC32 */ +/* Segmentation offload features */ #define NETIF_F_GSO_SHIFT 16#define NETIF_F_GSO_MASK 0x00ff0000
@@ -530,6 +532,7 @@ struct net_device#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) +#define NETIF_F_GSO_FCOE (SKB_GSO_FCOE << NETIF_F_GSO_SHIFT)/* List of features with software fallbacks. */ #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
include/linux/skbuff.h +2 -0
@@ -188,6 +188,8 @@ enum {SKB_GSO_TCP_ECN =1 <<3 ,SKB_GSO_TCPV6 =1 <<4 , + + SKB_GSO_FCOE = 1 << 5, };#if BITS_PER_LONG >32