Skip to content

Commit 6b8f092

Browse files
greearbJeff Kirsher
authored andcommitted
igb: Support sending custom Ethernet FCS.
Including bad FCS, used generate frames with bad FCS to test other system's handling of RX of bad packets. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 126a3fd commit 6b8f092

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,8 @@ static int __devinit igb_probe(struct pci_dev *pdev,
19641964
NETIF_F_IPV6_CSUM |
19651965
NETIF_F_SG;
19661966

1967+
netdev->priv_flags |= IFF_SUPP_NOFCS;
1968+
19671969
if (pci_using_dac) {
19681970
netdev->features |= NETIF_F_HIGHDMA;
19691971
netdev->vlan_features |= NETIF_F_HIGHDMA;
@@ -4293,6 +4295,8 @@ static void igb_tx_map(struct igb_ring *tx_ring,
42934295

42944296
/* write last descriptor with RS and EOP bits */
42954297
cmd_type |= cpu_to_le32(size) | cpu_to_le32(IGB_TXD_DCMD);
4298+
if (unlikely(skb->no_fcs))
4299+
cmd_type &= ~(cpu_to_le32(E1000_ADVTXD_DCMD_IFCS));
42964300
tx_desc->read.cmd_type_len = cmd_type;
42974301

42984302
/* set the timestamp */

0 commit comments

Comments
 (0)