|
@@ -705,7 +705,6 @@ bool i40evf_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count)
|
|
|
* because each write-back erases this info.
|
|
|
*/
|
|
|
rx_desc->read.pkt_addr = cpu_to_le64(bi->dma + bi->page_offset);
|
|
|
- rx_desc->read.hdr_addr = 0;
|
|
|
|
|
|
rx_desc++;
|
|
|
bi++;
|
|
@@ -1209,7 +1208,6 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
|
|
|
while (likely(total_rx_packets < budget)) {
|
|
|
union i40e_rx_desc *rx_desc;
|
|
|
struct sk_buff *skb;
|
|
|
- u32 rx_status;
|
|
|
u16 vlan_tag;
|
|
|
u8 rx_ptype;
|
|
|
u64 qword;
|
|
@@ -1223,21 +1221,13 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
|
|
|
|
|
|
rx_desc = I40E_RX_DESC(rx_ring, rx_ring->next_to_clean);
|
|
|
|
|
|
- qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
|
|
|
- rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>
|
|
|
- I40E_RXD_QW1_PTYPE_SHIFT;
|
|
|
- rx_status = (qword & I40E_RXD_QW1_STATUS_MASK) >>
|
|
|
- I40E_RXD_QW1_STATUS_SHIFT;
|
|
|
-
|
|
|
- if (!(rx_status & BIT(I40E_RX_DESC_STATUS_DD_SHIFT)))
|
|
|
- break;
|
|
|
-
|
|
|
/* status_error_len will always be zero for unused descriptors
|
|
|
* because it's cleared in cleanup, and overlaps with hdr_addr
|
|
|
* which is always zero because packet split isn't used, if the
|
|
|
* hardware wrote DD then it will be non-zero
|
|
|
*/
|
|
|
- if (!rx_desc->wb.qword1.status_error_len)
|
|
|
+ if (!i40e_test_staterr(rx_desc,
|
|
|
+ BIT(I40E_RX_DESC_STATUS_DD_SHIFT)))
|
|
|
break;
|
|
|
|
|
|
/* This memory barrier is needed to keep us from reading
|
|
@@ -1271,6 +1261,10 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
|
|
|
/* probably a little skewed due to removing CRC */
|
|
|
total_rx_bytes += skb->len;
|
|
|
|
|
|
+ qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
|
|
|
+ rx_ptype = (qword & I40E_RXD_QW1_PTYPE_MASK) >>
|
|
|
+ I40E_RXD_QW1_PTYPE_SHIFT;
|
|
|
+
|
|
|
/* populate checksum, VLAN, and protocol */
|
|
|
i40evf_process_skb_fields(rx_ring, rx_desc, skb, rx_ptype);
|
|
|
|