Commit 5e0c03c8cd40e5c3b7ba624b8ba9a343de79ade1

Authored by Ben Greear
Committed by Jeff Kirsher
1 parent 943146de22

net: Support RX-ALL feature flag.

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>

Showing 3 changed files with 10 additions and 0 deletions Side-by-side Diff

Documentation/networking/netdev-features.txt
... ... @@ -158,4 +158,11 @@
158 158 This requests that the NIC append the Ethernet Frame Checksum (FCS)
159 159 to the end of the skb data. This allows sniffers and other tools to
160 160 read the CRC recorded by the NIC on receipt of the packet.
  161 +
  162 +* rx-all
  163 +
  164 +This requests that the NIC receive all possible frames, including errored
  165 +frames (such as bad FCS, etc). This can be helpful when sniffing a link with
  166 +bad packets on it. Some NICs may receive more packets if also put into normal
  167 +PROMISC mdoe.
include/linux/netdev_features.h
... ... @@ -55,6 +55,7 @@
55 55 NETIF_F_NOCACHE_COPY_BIT, /* Use no-cache copyfromuser */
56 56 NETIF_F_LOOPBACK_BIT, /* Enable loopback */
57 57 NETIF_F_RXFCS_BIT, /* Append FCS to skb pkt data */
  58 + NETIF_F_RXALL_BIT, /* Receive errored frames too */
58 59  
59 60 /*
60 61 * Add your fresh new feature above and remember to update
... ... @@ -100,6 +101,7 @@
100 101 #define NETIF_F_UFO __NETIF_F(UFO)
101 102 #define NETIF_F_VLAN_CHALLENGED __NETIF_F(VLAN_CHALLENGED)
102 103 #define NETIF_F_RXFCS __NETIF_F(RXFCS)
  104 +#define NETIF_F_RXALL __NETIF_F(RXALL)
103 105  
104 106 /* Features valid for ethtool to change */
105 107 /* = all defined minus driver/device-class-related */
... ... @@ -74,6 +74,7 @@
74 74 [NETIF_F_NOCACHE_COPY_BIT] = "tx-nocache-copy",
75 75 [NETIF_F_LOOPBACK_BIT] = "loopback",
76 76 [NETIF_F_RXFCS_BIT] = "rx-fcs",
  77 + [NETIF_F_RXALL_BIT] = "rx-all",
77 78 };
78 79  
79 80 static int ethtool_get_features(struct net_device *dev, void __user *useraddr)