Message ID | 20100614203520.23a02c25@realm |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Sergey Matyukevich <geomatsi@gmail.com> Date: Mon, 14 Jun 2010 20:35:20 +0400 > This patch implements a proper modification of RX skb buffers before > recycling. Adjusting only skb->data is not enough because after that > skb->tail and skb->len become incorrect. > > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 4a34833..807470e 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -3215,6 +3215,8 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit __func__, __LINE__, (u32) skb); if (skb) { skb->data = skb->head + NET_SKB_PAD; + skb->len = 0; + skb_reset_tail_pointer(skb); __skb_queue_head(&ugeth->rx_recycle, skb); }
Hello David, Could you please consider the second, simplified, version of the patch for ucc_geth driver regarding proper RX error skb buffer recycling. This patch implements a proper modification of RX skb buffers before recycling. Adjusting only skb->data is not enough because after that skb->tail and skb->len become incorrect. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> --- drivers/net/ucc_geth.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)