ethtool: Support get/set rx-save-fcs flag.
Subsystems (2)
PATCH v2 1/2 ethtool: Support get/set rx-save-fcs flag.
From: Ben Greear <[email protected]>
This allows users to receive the Ethernet frame checksum on supported drivers.
Signed-off-by Ben Greear <[email protected]>
---
v2: Fix typo in man-page description.
:100644 100644 c7a18f7... c059852... M ethtool-copy.h
:100644 100644 7b1cdf5... e2eca31... M ethtool.8.in
:100644 100644 c189c78... b97552c... M ethtool.c
ethtool-copy.h | 2 ++ ethtool.8.in | 18 ++++++++++++++++++ ethtool.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 1 deletions(-)
ethtool-copy.h +2 -0
@@ -751,6 +751,8 @@ enum ethtool_sfeatures_retval_bits {#define ETHTOOL_SET_DUMP 0x0000003e/* Set dump settings */ #define ETHTOOL_GET_DUMP_FLAG 0x0000003f/* Get dump settings */ #define ETHTOOL_GET_DUMP_DATA 0x00000040/* Get dump data */ +#define ETHTOOL_GET_SAVE_RXFCS 0x00000041/* Get RX Save Frame Checksum */ +#define ETHTOOL_SET_SAVE_RXFCS 0x00000042/* Set RX Save Frame Checksum */ /* compatibility with older code */ #define SPARC_ETH_GSET ETHTOOL_GSET
ethtool.8.in +18 -0
@@ -274,6 +274,13 @@ ethtool \- query or control network driver and hardware settings .IR W1 .RB ...\ ] .HP +.B ethtool \-z|\-\-get\-save\-rxfcs +.I ethX +.HP +.B ethtool\ \-Z|\-\-set\-save\-rxfcs +.I ethX +.BI \ N +.HP .B ethtool \-f|\-\-flash .I ethX .RI FILE
@@ -630,6 +637,17 @@ Sets the receive flow hash indirection table to spread flows between receive queues according to the given weights. The sum of the weights must be non-zero and must not exceed the size of the indirection table. .TP +.B \-z \-\-show\-save\-rxfcs +Retrieves the receive frame checksum flag. +.TP +.B \-Z \-\-set\-save\-rxcfs +Configures the receive frame checksum flag. +.TP +.B N +1 means enable, 0 means disable. When enabled, the 4-byte +Frame Checksum will be appended to the end of the packet. This +can be useful when sniffing packets. +.TP .B \-f \-\-flash \ FILE Flash firmware image from the specified file to a region on the adapter. By default this will flash all the regions on the adapter.
ethtool.c +54 -1
103 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH v2 2/2 ethtool: Support enabling rx of errored frames.
From: Ben Greear <[email protected]>
This can be useful when sniffing dodgy networks.
Signed-off-by Ben Greear <[email protected]>
---
:100644 100644 c059852... 91ad2e6... M ethtool-copy.h
:100644 100644 e2eca31... ca146fb... M ethtool.8.in
:100644 100644 b97552c... 3179ad8... M ethtool.c
ethtool-copy.h | 2 ++ ethtool.8.in | 19 +++++++++++++++++++ ethtool.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 75 insertions(+), 1 deletions(-)
ethtool-copy.h +2 -0
@@ -753,6 +753,8 @@ enum ethtool_sfeatures_retval_bits {#define ETHTOOL_GET_DUMP_DATA 0x00000040/* Get dump data */ #define ETHTOOL_GET_SAVE_RXFCS 0x00000041/* Get RX Save Frame Checksum */ #define ETHTOOL_SET_SAVE_RXFCS 0x00000042/* Set RX Save Frame Checksum */ +#define ETHTOOL_GET_SAVE_RXERR 0x00000043/* Get RX Save Errored Frames */ +#define ETHTOOL_SET_SAVE_RXERR 0x00000044/* Set RX Save Errored Frames */ /* compatibility with older code */ #define SPARC_ETH_GSET ETHTOOL_GSET
ethtool.8.in +19 -0
@@ -281,6 +281,13 @@ ethtool \- query or control network driver and hardware settings .I ethX .BI \ N .HP +.B ethtool \-b|\-\-get\-save\-rxerr +.I ethX +.HP +.B ethtool\ \-B|\-\-set\-save\-rxerr +.I ethX +.BI \ N +.HP .B ethtool \-f|\-\-flash .I ethX .RI FILE
@@ -648,6 +655,18 @@ Configures the receive frame checksum flag. Frame Checksum will be appended to the end of the packet. This can be useful when sniffing packets. .TP +.B \-b \-\-show\-save\-rxerr +Retrieves the receive save errored frames flag. +.TP +.B \-B \-\-set\-save\-rxerr +Configures the receive save errored frames flag. +.TP +.B N +1 means enable, 0 means disable. When enabled, the NIC should +receive all possible frames and pass them up the stack, including +frames with bad Ethernet checksums, bad length, etc. +This can be useful when sniffing packets. +.TP .B \-f \-\-flash \ FILE Flash firmware image from the specified file to a region on the adapter. By default this will flash all the regions on the adapter.
ethtool.c +54 -1
103 lines not on this page · raw message
Signature · 1 line
1.7.3.4