net: Support RX-ALL feature flag.
authorBen Greear <greearb@candelatech.com>
Sat, 11 Feb 2012 15:39:45 +0000 (15:39 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 24 Feb 2012 09:42:07 +0000 (01:42 -0800)
This flag requests that network devices pass all
received frames up the stack, even ones with errors
such as invalid FCS (frame check sum).  This will
allow sniffers to see bad packets and perhaps
give the user some idea how to fix the problem.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Documentation/networking/netdev-features.txt
include/linux/netdev_features.h
net/core/ethtool.c

index 7d2781230d30ec566164aa09d120752b69b6e947..4164f5c02e4bbdf406956818fc34b8306610ba55 100644 (file)
@@ -158,3 +158,10 @@ VLANs. This may be not useful, though.]
 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.
+
+*  rx-all
+
+This requests that the NIC receive all possible frames, including errored
+frames (such as bad FCS, etc).  This can be helpful when sniffing a link with
+bad packets on it.  Some NICs may receive more packets if also put into normal
+PROMISC mdoe.
index d1331865f830b2207e61305a5e4dac23c17c2533..5ac32123035a5159c7c017a3ac29aec8ee9291af 100644 (file)
@@ -55,6 +55,7 @@ enum {
        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 */
+       NETIF_F_RXALL_BIT,              /* Receive errored frames too */
 
        /*
         * Add your fresh new feature above and remember to update
@@ -100,6 +101,7 @@ enum {
 #define NETIF_F_UFO            __NETIF_F(UFO)
 #define NETIF_F_VLAN_CHALLENGED        __NETIF_F(VLAN_CHALLENGED)
 #define NETIF_F_RXFCS          __NETIF_F(RXFCS)
+#define NETIF_F_RXALL          __NETIF_F(RXALL)
 
 /* Features valid for ethtool to change */
 /* = all defined minus driver/device-class-related */
index 080161924a0d499359dd8d2f00404ac276783c17..6d6d7d25caaa30319870c6b1d62b38eb8972e543 100644 (file)
@@ -74,6 +74,7 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
        [NETIF_F_NOCACHE_COPY_BIT] =     "tx-nocache-copy",
        [NETIF_F_LOOPBACK_BIT] =         "loopback",
        [NETIF_F_RXFCS_BIT] =            "rx-fcs",
+       [NETIF_F_RXALL_BIT] =            "rx-all",
 };
 
 static int ethtool_get_features(struct net_device *dev, void __user *useraddr)
This page took 0.028188 seconds and 5 git commands to generate.