igc: Clean RX descriptor error flags
i225 advanced receive descriptor doesn't have the following extend error bits: CE, SE, SEQ, CXE. In addition to that, the bit TCPE is called L4E in the datasheet. Clean up the code accordingly, and get rid of the macro IGC_RXDEXT_ERR_FRAME_ERR_MASK since it doesn't make much sense anymore. Signed-off-by: Andre Guedes <andre.guedes@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
09cb2a3404
commit
ef8a17a2a4
|
@ -324,22 +324,10 @@
|
|||
/* Advanced Receive Descriptor bit definitions */
|
||||
#define IGC_RXDADV_STAT_TSIP 0x08000 /* timestamp in packet */
|
||||
|
||||
#define IGC_RXDEXT_STATERR_CE 0x01000000
|
||||
#define IGC_RXDEXT_STATERR_SE 0x02000000
|
||||
#define IGC_RXDEXT_STATERR_SEQ 0x04000000
|
||||
#define IGC_RXDEXT_STATERR_CXE 0x10000000
|
||||
#define IGC_RXDEXT_STATERR_TCPE 0x20000000
|
||||
#define IGC_RXDEXT_STATERR_L4E 0x20000000
|
||||
#define IGC_RXDEXT_STATERR_IPE 0x40000000
|
||||
#define IGC_RXDEXT_STATERR_RXE 0x80000000
|
||||
|
||||
/* Same mask, but for extended and packet split descriptors */
|
||||
#define IGC_RXDEXT_ERR_FRAME_ERR_MASK ( \
|
||||
IGC_RXDEXT_STATERR_CE | \
|
||||
IGC_RXDEXT_STATERR_SE | \
|
||||
IGC_RXDEXT_STATERR_SEQ | \
|
||||
IGC_RXDEXT_STATERR_CXE | \
|
||||
IGC_RXDEXT_STATERR_RXE)
|
||||
|
||||
#define IGC_MRQC_RSS_FIELD_IPV4_TCP 0x00010000
|
||||
#define IGC_MRQC_RSS_FIELD_IPV4 0x00020000
|
||||
#define IGC_MRQC_RSS_FIELD_IPV6_TCP_EX 0x00040000
|
||||
|
|
|
@ -1433,7 +1433,7 @@ static void igc_rx_checksum(struct igc_ring *ring,
|
|||
|
||||
/* TCP/UDP checksum error bit is set */
|
||||
if (igc_test_staterr(rx_desc,
|
||||
IGC_RXDEXT_STATERR_TCPE |
|
||||
IGC_RXDEXT_STATERR_L4E |
|
||||
IGC_RXDEXT_STATERR_IPE)) {
|
||||
/* work around errata with sctp packets where the TCPE aka
|
||||
* L4E bit is set incorrectly on 64 byte (60 byte w/o crc)
|
||||
|
@ -1742,8 +1742,7 @@ static bool igc_cleanup_headers(struct igc_ring *rx_ring,
|
|||
union igc_adv_rx_desc *rx_desc,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
if (unlikely((igc_test_staterr(rx_desc,
|
||||
IGC_RXDEXT_ERR_FRAME_ERR_MASK)))) {
|
||||
if (unlikely(igc_test_staterr(rx_desc, IGC_RXDEXT_STATERR_RXE))) {
|
||||
struct net_device *netdev = rx_ring->netdev;
|
||||
|
||||
if (!(netdev->features & NETIF_F_RXALL)) {
|
||||
|
|
Loading…
Reference in New Issue