Skip to content

Commit

Permalink
i40e: Add programming descriptors to cleaned_count
Browse files Browse the repository at this point in the history
This patch updates the i40e driver to include programming descriptors in
the cleaned_count. Without this change it becomes possible for us to leak
memory as we don't trigger a large enough allocation when the time comes to
allocate new buffers and we end up overwriting a number of rx_buffers equal
to the number of programming descriptors we encountered.

Fixes: 0e626ff ("i40e: Fix support for flow director programming status")
Signed-off-by: Alexander Duyck <[email protected]>
Tested-by: Anders K. Pedersen <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Oct 26, 2017
1 parent 1078134 commit 62b4c66
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/i40e/i40e_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)

if (unlikely(i40e_rx_is_programming_status(qword))) {
i40e_clean_programming_status(rx_ring, rx_desc, qword);
cleaned_count++;
continue;
}
size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>
Expand Down

0 comments on commit 62b4c66

Please sign in to comment.