|
@@ -356,13 +356,37 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
|
|
|
|
|
|
/* Transmit Descriptor Formats
|
|
|
*
|
|
|
- * Advanced Transmit Descriptor
|
|
|
+ * 82598 Advanced Transmit Descriptor
|
|
|
* +--------------------------------------------------------------+
|
|
|
* 0 | Buffer Address [63:0] |
|
|
|
* +--------------------------------------------------------------+
|
|
|
- * 8 | PAYLEN | PORTS | IDX | STA | DCMD |DTYP | RSV | DTALEN |
|
|
|
+ * 8 | PAYLEN | POPTS | IDX | STA | DCMD |DTYP | RSV | DTALEN |
|
|
|
* +--------------------------------------------------------------+
|
|
|
* 63 46 45 40 39 36 35 32 31 24 23 20 19 0
|
|
|
+ *
|
|
|
+ * 82598 Advanced Transmit Descriptor (Write-Back Format)
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 0 | RSV [63:0] |
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 8 | RSV | STA | NXTSEQ |
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 63 36 35 32 31 0
|
|
|
+ *
|
|
|
+ * 82599+ Advanced Transmit Descriptor
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 0 | Buffer Address [63:0] |
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 8 |PAYLEN |POPTS|CC|IDX |STA |DCMD |DTYP |MAC |RSV |DTALEN |
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 63 46 45 40 39 38 36 35 32 31 24 23 20 19 18 17 16 15 0
|
|
|
+ *
|
|
|
+ * 82599+ Advanced Transmit Descriptor (Write-Back Format)
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 0 | RSV [63:0] |
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 8 | RSV | STA | RSV |
|
|
|
+ * +--------------------------------------------------------------+
|
|
|
+ * 63 36 35 32 31 0
|
|
|
*/
|
|
|
|
|
|
for (n = 0; n < adapter->num_tx_queues; n++) {
|
|
@@ -423,7 +447,9 @@ rx_ring_summary:
|
|
|
|
|
|
dev_info(&adapter->pdev->dev, "RX Rings Dump\n");
|
|
|
|
|
|
- /* Advanced Receive Descriptor (Read) Format
|
|
|
+ /* Receive Descriptor Formats
|
|
|
+ *
|
|
|
+ * 82598 Advanced Receive Descriptor (Read) Format
|
|
|
* 63 1 0
|
|
|
* +-----------------------------------------------------+
|
|
|
* 0 | Packet Buffer Address [63:1] |A0/NSE|
|
|
@@ -432,17 +458,40 @@ rx_ring_summary:
|
|
|
* +-----------------------------------------------------+
|
|
|
*
|
|
|
*
|
|
|
- * Advanced Receive Descriptor (Write-Back) Format
|
|
|
+ * 82598 Advanced Receive Descriptor (Write-Back) Format
|
|
|
*
|
|
|
* 63 48 47 32 31 30 21 20 16 15 4 3 0
|
|
|
* +------------------------------------------------------+
|
|
|
- * 0 | Packet IP |SPH| HDR_LEN | RSV|Packet| RSS |
|
|
|
- * | Checksum Ident | | | | Type | Type |
|
|
|
+ * 0 | RSS Hash / |SPH| HDR_LEN | RSV |Packet| RSS |
|
|
|
+ * | Packet | IP | | | | Type | Type |
|
|
|
+ * | Checksum | Ident | | | | | |
|
|
|
* +------------------------------------------------------+
|
|
|
* 8 | VLAN Tag | Length | Extended Error | Extended Status |
|
|
|
* +------------------------------------------------------+
|
|
|
* 63 48 47 32 31 20 19 0
|
|
|
+ *
|
|
|
+ * 82599+ Advanced Receive Descriptor (Read) Format
|
|
|
+ * 63 1 0
|
|
|
+ * +-----------------------------------------------------+
|
|
|
+ * 0 | Packet Buffer Address [63:1] |A0/NSE|
|
|
|
+ * +----------------------------------------------+------+
|
|
|
+ * 8 | Header Buffer Address [63:1] | DD |
|
|
|
+ * +-----------------------------------------------------+
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * 82599+ Advanced Receive Descriptor (Write-Back) Format
|
|
|
+ *
|
|
|
+ * 63 48 47 32 31 30 21 20 17 16 4 3 0
|
|
|
+ * +------------------------------------------------------+
|
|
|
+ * 0 |RSS / Frag Checksum|SPH| HDR_LEN |RSC- |Packet| RSS |
|
|
|
+ * |/ RTT / PCoE_PARAM | | | CNT | Type | Type |
|
|
|
+ * |/ Flow Dir Flt ID | | | | | |
|
|
|
+ * +------------------------------------------------------+
|
|
|
+ * 8 | VLAN Tag | Length |Extended Error| Xtnd Status/NEXTP |
|
|
|
+ * +------------------------------------------------------+
|
|
|
+ * 63 48 47 32 31 20 19 0
|
|
|
*/
|
|
|
+
|
|
|
for (n = 0; n < adapter->num_rx_queues; n++) {
|
|
|
rx_ring = adapter->rx_ring[n];
|
|
|
pr_info("------------------------------------\n");
|
|
@@ -1795,7 +1844,7 @@ dma_sync:
|
|
|
**/
|
|
|
static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
|
|
struct ixgbe_ring *rx_ring,
|
|
|
- int budget)
|
|
|
+ const int budget)
|
|
|
{
|
|
|
unsigned int total_rx_bytes = 0, total_rx_packets = 0;
|
|
|
#ifdef IXGBE_FCOE
|
|
@@ -1846,7 +1895,6 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
|
|
|
|
|
/* probably a little skewed due to removing CRC */
|
|
|
total_rx_bytes += skb->len;
|
|
|
- total_rx_packets++;
|
|
|
|
|
|
/* populate checksum, timestamp, VLAN, and protocol */
|
|
|
ixgbe_process_skb_fields(rx_ring, rx_desc, skb);
|
|
@@ -1879,8 +1927,8 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
|
|
ixgbe_rx_skb(q_vector, skb);
|
|
|
|
|
|
/* update budget accounting */
|
|
|
- budget--;
|
|
|
- } while (likely(budget));
|
|
|
+ total_rx_packets++;
|
|
|
+ } while (likely(total_rx_packets < budget));
|
|
|
|
|
|
u64_stats_update_begin(&rx_ring->syncp);
|
|
|
rx_ring->stats.packets += total_rx_packets;
|
|
@@ -1892,7 +1940,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
|
|
if (cleaned_count)
|
|
|
ixgbe_alloc_rx_buffers(rx_ring, cleaned_count);
|
|
|
|
|
|
- return !!budget;
|
|
|
+ return (total_rx_packets < budget);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -4085,11 +4133,8 @@ static void ixgbe_up_complete(struct ixgbe_adapter *adapter)
|
|
|
else
|
|
|
ixgbe_configure_msi_and_legacy(adapter);
|
|
|
|
|
|
- /* enable the optics for both mult-speed fiber and 82599 SFP+ fiber */
|
|
|
- if (hw->mac.ops.enable_tx_laser &&
|
|
|
- ((hw->phy.multispeed_fiber) ||
|
|
|
- ((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
|
|
|
- (hw->mac.type == ixgbe_mac_82599EB))))
|
|
|
+ /* enable the optics for 82599 SFP+ fiber */
|
|
|
+ if (hw->mac.ops.enable_tx_laser)
|
|
|
hw->mac.ops.enable_tx_laser(hw);
|
|
|
|
|
|
clear_bit(__IXGBE_DOWN, &adapter->state);
|
|
@@ -4411,11 +4456,8 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
|
|
|
if (!pci_channel_offline(adapter->pdev))
|
|
|
ixgbe_reset(adapter);
|
|
|
|
|
|
- /* power down the optics for multispeed fiber and 82599 SFP+ fiber */
|
|
|
- if (hw->mac.ops.disable_tx_laser &&
|
|
|
- ((hw->phy.multispeed_fiber) ||
|
|
|
- ((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
|
|
|
- (hw->mac.type == ixgbe_mac_82599EB))))
|
|
|
+ /* power down the optics for 82599 SFP+ fiber */
|
|
|
+ if (hw->mac.ops.disable_tx_laser)
|
|
|
hw->mac.ops.disable_tx_laser(hw);
|
|
|
|
|
|
ixgbe_clean_all_tx_rings(adapter);
|
|
@@ -5048,14 +5090,8 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
|
|
if (wufc) {
|
|
|
ixgbe_set_rx_mode(netdev);
|
|
|
|
|
|
- /*
|
|
|
- * enable the optics for both mult-speed fiber and
|
|
|
- * 82599 SFP+ fiber as we can WoL.
|
|
|
- */
|
|
|
- if (hw->mac.ops.enable_tx_laser &&
|
|
|
- (hw->phy.multispeed_fiber ||
|
|
|
- (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber &&
|
|
|
- hw->mac.type == ixgbe_mac_82599EB)))
|
|
|
+ /* enable the optics for 82599 SFP+ fiber as we can WoL */
|
|
|
+ if (hw->mac.ops.enable_tx_laser)
|
|
|
hw->mac.ops.enable_tx_laser(hw);
|
|
|
|
|
|
/* turn on all-multi mode if wake on multicast is enabled */
|
|
@@ -6965,7 +7001,7 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- if (is_unicast_ether_addr(addr)) {
|
|
|
+ if (is_unicast_ether_addr(addr) || is_link_local(addr)) {
|
|
|
u32 rar_uc_entries = IXGBE_MAX_PF_MACVLANS;
|
|
|
|
|
|
if (netdev_uc_count(dev) < rar_uc_entries)
|
|
@@ -7521,11 +7557,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
|
|
if (err)
|
|
|
goto err_register;
|
|
|
|
|
|
- /* power down the optics for multispeed fiber and 82599 SFP+ fiber */
|
|
|
- if (hw->mac.ops.disable_tx_laser &&
|
|
|
- ((hw->phy.multispeed_fiber) ||
|
|
|
- ((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
|
|
|
- (hw->mac.type == ixgbe_mac_82599EB))))
|
|
|
+ /* power down the optics for 82599 SFP+ fiber */
|
|
|
+ if (hw->mac.ops.disable_tx_laser)
|
|
|
hw->mac.ops.disable_tx_laser(hw);
|
|
|
|
|
|
/* carrier off reporting is important to ethtool even BEFORE open */
|