Set DROP_EN on each RX queue if transmit flow-control is disabled.
This allows the NIC to drop frames on the receive queue and not cause the MAC to block on receiving to _any_ queue. Tested: igb0@pci0:5:0:0: class=0x020000 card=0x152115d9 chip=0x15218086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = 'I350 Gigabit Network Connection' class = network subclass = ethernet Discussed with: Eric Joyner <eric.joyner@intel.com> MFC after: 1 week Sponsored by: Norse Corp, Inc.
This commit is contained in:
parent
cc47e5ee4f
commit
1c2427605c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271645
@ -4712,6 +4712,18 @@ igb_initialize_receive_units(struct adapter *adapter)
|
||||
rctl |= E1000_RCTL_SZ_2048;
|
||||
}
|
||||
|
||||
/*
|
||||
* If TX flow control is disabled and there's >1 queue defined,
|
||||
* enable DROP.
|
||||
*
|
||||
* This drops frames rather than hanging the RX MAC for all queues.
|
||||
*/
|
||||
if ((adapter->num_queues > 1) &&
|
||||
(adapter->fc == e1000_fc_none ||
|
||||
adapter->fc == e1000_fc_rx_pause)) {
|
||||
srrctl |= E1000_SRRCTL_DROP_EN;
|
||||
}
|
||||
|
||||
/* Setup the Base and Length of the Rx Descriptor Rings */
|
||||
for (int i = 0; i < adapter->num_queues; i++, rxr++) {
|
||||
u64 bus_addr = rxr->rxdma.dma_paddr;
|
||||
@ -6255,6 +6267,7 @@ igb_set_flowcntl(SYSCTL_HANDLER_ARGS)
|
||||
|
||||
adapter->hw.fc.current_mode = adapter->hw.fc.requested_mode;
|
||||
e1000_force_mac_fc(&adapter->hw);
|
||||
/* XXX TODO: update DROP_EN on each RX queue if appropriate */
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user