netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] igb: Support sending custom Ethernet FCS.
@ 2012-03-06  1:30 greearb
  2012-03-06  1:30 ` [PATCH 2/2] igb: Support RX-ALL feature flag greearb
  2012-03-06  1:34 ` [PATCH 1/2] igb: Support sending custom Ethernet FCS Jeff Kirsher
  0 siblings, 2 replies; 3+ messages in thread
From: greearb @ 2012-03-06  1:30 UTC (permalink / raw)
  To: netdev; +Cc: jeffrey.t.kirsher, Ben Greear

From: Ben Greear <greearb@candelatech.com>

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>
---
:100644 100644 fda8247... e4058ac... M	drivers/net/ethernet/intel/igb/igb_main.c
 drivers/net/ethernet/intel/igb/igb_main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index fda8247..e4058ac 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1964,6 +1964,8 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 				 NETIF_F_IPV6_CSUM |
 				 NETIF_F_SG;
 
+	netdev->priv_flags |= IFF_SUPP_NOFCS;
+
 	if (pci_using_dac) {
 		netdev->features |= NETIF_F_HIGHDMA;
 		netdev->vlan_features |= NETIF_F_HIGHDMA;
@@ -4292,6 +4294,8 @@ static void igb_tx_map(struct igb_ring *tx_ring,
 
 	/* write last descriptor with RS and EOP bits */
 	cmd_type |= cpu_to_le32(size) | cpu_to_le32(IGB_TXD_DCMD);
+	if (unlikely(skb->no_fcs))
+		cmd_type &= ~(cpu_to_le32(E1000_ADVTXD_DCMD_IFCS));
 	tx_desc->read.cmd_type_len = cmd_type;
 
 	/* set the timestamp */
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-06  1:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06  1:30 [PATCH 1/2] igb: Support sending custom Ethernet FCS greearb
2012-03-06  1:30 ` [PATCH 2/2] igb: Support RX-ALL feature flag greearb
2012-03-06  1:34 ` [PATCH 1/2] igb: Support sending custom Ethernet FCS Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).