Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328066
b: refs/heads/master
c: 5c60f81
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Sep 24, 2012
1 parent 0f208be commit 82eba14
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac6ed8f00aca7dd1abf0c90bcb3c8e46e7f44243
refs/heads/master: 5c60f81a2553213856b3bb80f18003e56a6a110d
5 changes: 5 additions & 0 deletions trunk/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ enum ixbgevf_state_t {
__IXGBEVF_DOWN
};

struct ixgbevf_cb {
struct sk_buff *prev;
};
#define IXGBE_CB(skb) ((struct ixgbevf_cb *)(skb)->cb)

enum ixgbevf_boards {
board_82599_vf,
board_X540_vf,
Expand Down
14 changes: 12 additions & 2 deletions trunk/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,21 @@ static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,

if (!(staterr & IXGBE_RXD_STAT_EOP)) {
skb->next = next_buffer->skb;
skb->next->prev = skb;
IXGBE_CB(skb->next)->prev = skb;
adapter->non_eop_descs++;
goto next_desc;
}

/* we should not be chaining buffers, if we did drop the skb */
if (IXGBE_CB(skb)->prev) {
do {
struct sk_buff *this = skb;
skb = IXGBE_CB(skb)->prev;
dev_kfree_skb(this);
} while (skb);
goto next_desc;
}

/* ERR_MASK will only have valid bits if EOP set */
if (unlikely(staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK)) {
dev_kfree_skb_irq(skb);
Expand Down Expand Up @@ -1439,7 +1449,7 @@ static void ixgbevf_clean_rx_ring(struct ixgbevf_adapter *adapter,
rx_buffer_info->skb = NULL;
do {
struct sk_buff *this = skb;
skb = skb->prev;
skb = IXGBE_CB(skb)->prev;
dev_kfree_skb(this);
} while (skb);
}
Expand Down

0 comments on commit 82eba14

Please sign in to comment.