netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: Support RXFCS feature flag.
@ 2012-02-06 18:39 greearb
  2012-02-06 18:39 ` [PATCH 2/2] e100: " greearb
  0 siblings, 1 reply; 4+ messages in thread
From: greearb @ 2012-02-06 18:39 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

When set on hardware that supports the feature,
this causes the Ethernet FCS to be appended
to the end of the skb.

Useful for sniffing packets.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 4b1c0dc... 7d27812... M	Documentation/networking/netdev-features.txt
:100644 100644 77f5202... d133186... M	include/linux/netdev_features.h
:100644 100644 3f79db1... 0801619... M	net/core/ethtool.c
 Documentation/networking/netdev-features.txt |    6 ++++++
 include/linux/netdev_features.h              |    2 ++
 net/core/ethtool.c                           |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt
index 4b1c0dc..7d27812 100644
--- a/Documentation/networking/netdev-features.txt
+++ b/Documentation/networking/netdev-features.txt
@@ -152,3 +152,9 @@ NETIF_F_VLAN_CHALLENGED should be set for devices which can't cope with VLAN
 headers. Some drivers set this because the cards can't handle the bigger MTU.
 [FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU
 VLANs. This may be not useful, though.]
+
+*  rx-fcs
+
+This requests that the NIC append the Ethernet Frame Checksum (FCS)
+to the end of the skb data.  This allows sniffers and other tools to
+read the CRC recorded by the NIC on receipt of the packet.
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 77f5202..d133186 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -54,6 +54,7 @@ enum {
 	NETIF_F_RXCSUM_BIT,		/* Receive checksumming offload */
 	NETIF_F_NOCACHE_COPY_BIT,	/* Use no-cache copyfromuser */
 	NETIF_F_LOOPBACK_BIT,		/* Enable loopback */
+	NETIF_F_RXFCS_BIT,		/* Append FCS to skb pkt data */
 
 	/*
 	 * Add your fresh new feature above and remember to update
@@ -98,6 +99,7 @@ enum {
 #define NETIF_F_TSO		__NETIF_F(TSO)
 #define NETIF_F_UFO		__NETIF_F(UFO)
 #define NETIF_F_VLAN_CHALLENGED	__NETIF_F(VLAN_CHALLENGED)
+#define NETIF_F_RXFCS		__NETIF_F(RXFCS)
 
 /* Features valid for ethtool to change */
 /* = all defined minus driver/device-class-related */
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 3f79db1..0801619 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -73,6 +73,7 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
 	[NETIF_F_RXCSUM_BIT] =           "rx-checksum",
 	[NETIF_F_NOCACHE_COPY_BIT] =     "tx-nocache-copy",
 	[NETIF_F_LOOPBACK_BIT] =         "loopback",
+	[NETIF_F_RXFCS_BIT] =            "rx-fcs",
 };
 
 static int ethtool_get_features(struct net_device *dev, void __user *useraddr)
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH 0/2] Enable RXFCS as a feature.
@ 2011-06-23 23:13 greearb
  2011-06-23 23:13 ` [PATCH 2/2] e100: Support RXFCS feature flag greearb
  0 siblings, 1 reply; 4+ messages in thread
From: greearb @ 2011-06-23 23:13 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

These patches are on top of the features work that
Michal Miroslaw posted recently.

A small patch to ethtool is needed as well.

These are just for comment until his patches go in.

Ben Greear (2):
  net:  Support RXFCS feature flag.
  e100:  Support RXFCS feature flag.

 drivers/net/e100.c              |   15 ++++++++++++---
 include/linux/ethtool.h         |    1 +
 include/linux/netdev_features.h |    2 ++
 net/core/ethtool.c              |   10 ++++++++--
 4 files changed, 23 insertions(+), 5 deletions(-)

-- 
1.7.3.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-07 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 18:39 [PATCH 1/2] net: Support RXFCS feature flag greearb
2012-02-06 18:39 ` [PATCH 2/2] e100: " greearb
2012-02-07 23:55   ` Ben Greear
  -- strict thread matches above, loose matches on Subject: below --
2011-06-23 23:13 [PATCH 0/2] Enable RXFCS as a feature greearb
2011-06-23 23:13 ` [PATCH 2/2] e100: Support RXFCS feature flag greearb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).