public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: greearb@candelatech•com
To: netdev@vger•kernel.org
Cc: Ben Greear <greearb@candelatech•com>
Subject: [PATCH v3 01/16] net: Support RXFCS feature flag.
Date: Fri, 10 Feb 2012 17:04:19 -0800	[thread overview]
Message-ID: <1328922274-23993-2-git-send-email-greearb@candelatech.com> (raw)
In-Reply-To: <1328922274-23993-1-git-send-email-greearb@candelatech.com>

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

  reply	other threads:[~2012-02-11  1:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-11  1:04 [PATCH v3 00/16] Low-level Ethernet debugging features greearb
2012-02-11  1:04 ` greearb [this message]
2012-02-11  1:04 ` [PATCH v3 02/16] e100: Support RXFCS feature flag greearb
2012-02-11 16:07   ` Michał Mirosław
2012-02-11 16:21     ` Ben Greear
2012-02-11 17:07   ` Eric Dumazet
2012-02-13 17:19     ` Ben Greear
2012-02-11  1:04 ` [PATCH v3 03/16] e1000e: " greearb
2012-02-11  1:04 ` [PATCH v3 04/16] net: Add framework to allow sending packets with customized CRC greearb
2012-02-11  1:04 ` [PATCH v3 05/16] e100: Support sending custom Ethernet CRC greearb
2012-02-11  1:04 ` [PATCH v3 06/16] e1000e: " greearb
2012-02-11  1:04 ` [PATCH v3 07/16] net: Support RX-ALL feature flag greearb
2012-02-11  1:04 ` [PATCH v3 08/16] e1000e: Support RXALL " greearb
2012-02-11  1:04 ` [PATCH v3 09/16] e100: " greearb
2012-02-11  1:04 ` [PATCH v3 10/16] e1000: Support sending custom Ethernet CRC greearb
2012-02-11  1:04 ` [PATCH v3 11/16] e1000: Support RX-ALL flag greearb
2012-02-11  1:04 ` [PATCH v3 12/16] e1000: Support RX-FCS flag greearb
2012-02-11  1:04 ` [PATCH v3 13/16] 8139too: Support RX-ALL logic greearb
2012-02-11  1:04 ` [PATCH v3 14/16] 8139too: Support RX-FCS flag greearb
2012-02-11  1:04 ` [PATCH v3 15/16] r8169: Support RX-ALL flag greearb
2012-02-11  1:04 ` [PATCH v3 16/16] r8169: Support RX-FCS flag greearb
2012-02-11  7:56 ` [PATCH v3 00/16] Low-level Ethernet debugging features Jeff Kirsher
2012-02-11 10:51   ` Francois Romieu
2012-02-11 16:20     ` Ben Greear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328922274-23993-2-git-send-email-greearb@candelatech.com \
    --to=greearb@candelatech$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox