diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 17ad6a3c1be1..18ca3bcadf0c 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -1058,17 +1058,17 @@ static inline void ixgbe_rx_hash(struct ixgbe_ring *ring, | |||
1058 | #ifdef IXGBE_FCOE | 1058 | #ifdef IXGBE_FCOE |
1059 | /** | 1059 | /** |
1060 | * ixgbe_rx_is_fcoe - check the rx desc for incoming pkt type | 1060 | * ixgbe_rx_is_fcoe - check the rx desc for incoming pkt type |
1061 | * @adapter: address of board private structure | 1061 | * @ring: structure containing ring specific data |
1062 | * @rx_desc: advanced rx descriptor | 1062 | * @rx_desc: advanced rx descriptor |
1063 | * | 1063 | * |
1064 | * Returns : true if it is FCoE pkt | 1064 | * Returns : true if it is FCoE pkt |
1065 | */ | 1065 | */ |
1066 | static inline bool ixgbe_rx_is_fcoe(struct ixgbe_adapter *adapter, | 1066 | static inline bool ixgbe_rx_is_fcoe(struct ixgbe_ring *ring, |
1067 | union ixgbe_adv_rx_desc *rx_desc) | 1067 | union ixgbe_adv_rx_desc *rx_desc) |
1068 | { | 1068 | { |
1069 | __le16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info; | 1069 | __le16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info; |
1070 | 1070 | ||
1071 | return (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | 1071 | return test_bit(__IXGBE_RX_FCOE, &ring->state) && |
1072 | ((pkt_info & cpu_to_le16(IXGBE_RXDADV_PKTTYPE_ETQF_MASK)) == | 1072 | ((pkt_info & cpu_to_le16(IXGBE_RXDADV_PKTTYPE_ETQF_MASK)) == |
1073 | (cpu_to_le16(IXGBE_ETQF_FILTER_FCOE << | 1073 | (cpu_to_le16(IXGBE_ETQF_FILTER_FCOE << |
1074 | IXGBE_RXDADV_PKTTYPE_ETQF_SHIFT))); | 1074 | IXGBE_RXDADV_PKTTYPE_ETQF_SHIFT))); |
@@ -1148,7 +1148,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring, | |||
1148 | 1148 | ||
1149 | /* alloc new page for storage */ | 1149 | /* alloc new page for storage */ |
1150 | if (likely(!page)) { | 1150 | if (likely(!page)) { |
1151 | page = alloc_pages(GFP_ATOMIC | __GFP_COLD, | 1151 | page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP, |
1152 | ixgbe_rx_pg_order(rx_ring)); | 1152 | ixgbe_rx_pg_order(rx_ring)); |
1153 | if (unlikely(!page)) { | 1153 | if (unlikely(!page)) { |
1154 | rx_ring->rx_stats.alloc_rx_page_failed++; | 1154 | rx_ring->rx_stats.alloc_rx_page_failed++; |
@@ -1549,6 +1549,12 @@ static bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring, | |||
1549 | skb->truesize -= ixgbe_rx_bufsz(rx_ring); | 1549 | skb->truesize -= ixgbe_rx_bufsz(rx_ring); |
1550 | } | 1550 | } |
1551 | 1551 | ||
1552 | #ifdef IXGBE_FCOE | ||
1553 | /* do not attempt to pad FCoE Frames as this will disrupt DDP */ | ||
1554 | if (ixgbe_rx_is_fcoe(rx_ring, rx_desc)) | ||
1555 | return false; | ||
1556 | |||
1557 | #endif | ||
1552 | /* if skb_pad returns an error the skb was freed */ | 1558 | /* if skb_pad returns an error the skb was freed */ |
1553 | if (unlikely(skb->len < 60)) { | 1559 | if (unlikely(skb->len < 60)) { |
1554 | int pad_len = 60 - skb->len; | 1560 | int pad_len = 60 - skb->len; |
@@ -1775,7 +1781,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
1775 | 1781 | ||
1776 | #ifdef IXGBE_FCOE | 1782 | #ifdef IXGBE_FCOE |
1777 | /* if ddp, not passing to ULD unless for FCP_RSP or error */ | 1783 | /* if ddp, not passing to ULD unless for FCP_RSP or error */ |
1778 | if (ixgbe_rx_is_fcoe(adapter, rx_desc)) { | 1784 | if (ixgbe_rx_is_fcoe(rx_ring, rx_desc)) { |
1779 | ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb); | 1785 | ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb); |
1780 | if (!ddp_bytes) { | 1786 | if (!ddp_bytes) { |
1781 | dev_kfree_skb_any(skb); | 1787 | dev_kfree_skb_any(skb); |