Hi,
These are the patches adding flags for Fiber Channel over Ethernet (FCoE) that
have been updated to the current tip of net-next.git. The original submission
can be found by the following thread:
http://marc.info/?l=linux-netdev&m=122228979113312&w=2
Please consider inclusion of these flags.
Many 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: Yi Zou <[email protected]>
Signed-off-by: Yi Zou <[email protected]>
---
include/linux/if_ether.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index 7f3c735..35f1110 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -78,6 +78,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 */
#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
/*
From: Chris Leech <[email protected]>
Signed-off-by: Chris Leech <[email protected]>
Signed-off-by: Yi Zou <[email protected]>
---
drivers/net/xen-netfront.c | 2 +-
include/linux/netdevice.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 4b21bcf..a2bbdaa 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1504,7 +1504,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);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 12d7f44..423c7bc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -525,7 +525,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)
From: Chris Leech <[email protected]>
Signed-off-by: Chris Leech <[email protected]>
Signed-off-by: Yi Zou <[email protected]>
---
include/linux/netdevice.h | 3 +++
include/linux/skbuff.h | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 423c7bc..9347464 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -523,6 +523,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
@@ -531,6 +533,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)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index a01b6f8..81c3f7c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -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
From: Yi Zou <[email protected]>
Date: Mon, 17 Nov 2008 10:30:51 -0800
> From: Chris Leech <[email protected]>
>
> Signed-off-by: Chris Leech <[email protected]>
> Signed-off-by: Yi Zou <[email protected]>
Why would FibreChannel over Ethernet need IPV4/IPV6 segmentation
offloading?
>From: David Miller [mailto:[email protected]]
>Sent: Wednesday, November 19, 2008 3:47 PM
>
>
>Why would FibreChannel over Ethernet need IPV4/IPV6 segmentation
>offloading?
Thanks for reviewing the patch. I am hoping to make use of the existing gso logic as much as possible for fcoe segmentation as well, to hookup fcoe segmentation using ptype->gso_segment().
Thanks.
yi
From: "Zou, Yi" <[email protected]>
Date: Wed, 19 Nov 2008 16:02:03 -0800
> Thanks for reviewing the patch. I am hoping to make use of the
> existing gso logic as much as possible for fcoe segmentation as
> well, to hookup fcoe segmentation using ptype->gso_segment().
There is no way for anyone to evaluate this usage and determine
whether it makes sense or not until you post those patches.
From: David Miller <[email protected]>
Date: Wed, 19 Nov 2008 17:14:26 -0800 (PST)
BTW, the netdev address has been wrong this entire time, it's
"netdev" not "linux-netdev". Fixed.
> From: "Zou, Yi" <[email protected]>
> Date: Wed, 19 Nov 2008 16:02:03 -0800
>
> > Thanks for reviewing the patch. I am hoping to make use of the
> > existing gso logic as much as possible for fcoe segmentation as
> > well, to hookup fcoe segmentation using ptype->gso_segment().
>
> There is no way for anyone to evaluate this usage and determine
> whether it makes sense or not until you post those patches.
>From: David Miller [mailto:[email protected]]
>Sent: Wednesday, November 19, 2008 5:14 PM
>
>From: "Zou, Yi" <[email protected]>
>Date: Wed, 19 Nov 2008 16:02:03 -0800
>
>> Thanks for reviewing the patch. I am hoping to make use of the
>> existing gso logic as much as possible for fcoe segmentation as
>> well, to hookup fcoe segmentation using ptype->gso_segment().
>
>There is no way for anyone to evaluate this usage and determine
>whether it makes sense or not until you post those patches.
Sure, allow me some time to clean up and repost patches following
this to RFC for what I think can be changed to make the existing
gso logic also work for fcoe.
Thanks for the comments.
-yi