All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.
@ 2015-11-17 12:49 martinbj2008
  2015-11-17 13:07 ` Eric Dumazet
  2015-11-17 20:26 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: martinbj2008 @ 2015-11-17 12:49 UTC (permalink / raw)
  To: davem; +Cc: netdev, Martin Zhang, Junwei Zhang

From: Martin Zhang <martinbj2008@gmail.com>

1. new skb only need dst and ip address(v4 or v6).
2. skb_copy may need high order pages, which is very rare on long running server.

Signed-off-by: Junwei Zhang <linggao.zjw@alibaba-inc.com>
Signed-off-by: Martin Zhang <martinbj2008@gmail.com>
---

 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 1aa8437..e6af42d 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -857,7 +857,7 @@ static void neigh_probe(struct neighbour *neigh)
 	struct sk_buff *skb = skb_peek_tail(&neigh->arp_queue);
 	/* keep skb alive even if arp_queue overflows */
 	if (skb)
-		skb = skb_copy(skb, GFP_ATOMIC);
+		skb = skb_clone(skb, GFP_ATOMIC);
 	write_unlock(&neigh->lock);
 	neigh->ops->solicit(neigh, skb);
 	atomic_inc(&neigh->probes);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.
  2015-11-17 12:49 [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure martinbj2008
@ 2015-11-17 13:07 ` Eric Dumazet
  2015-11-17 13:49   ` Eric Dumazet
  2015-11-17 20:26 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2015-11-17 13:07 UTC (permalink / raw)
  To: martinbj2008; +Cc: davem, netdev, Junwei Zhang

On Tue, 2015-11-17 at 20:49 +0800, martinbj2008@gmail.com wrote:
> From: Martin Zhang <martinbj2008@gmail.com>
> 
> 1. new skb only need dst and ip address(v4 or v6).
> 2. skb_copy may need high order pages, which is very rare on long running server.
> 
> Signed-off-by: Junwei Zhang <linggao.zjw@alibaba-inc.com>
> Signed-off-by: Martin Zhang <martinbj2008@gmail.com>
> ---

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.
  2015-11-17 13:07 ` Eric Dumazet
@ 2015-11-17 13:49   ` Eric Dumazet
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2015-11-17 13:49 UTC (permalink / raw)
  To: martinbj2008; +Cc: davem, netdev, Junwei Zhang

On Tue, 2015-11-17 at 05:07 -0800, Eric Dumazet wrote:
> On Tue, 2015-11-17 at 20:49 +0800, martinbj2008@gmail.com wrote:
> > From: Martin Zhang <martinbj2008@gmail.com>
> > 
> > 1. new skb only need dst and ip address(v4 or v6).
> > 2. skb_copy may need high order pages, which is very rare on long running server.
> > 
> > Signed-off-by: Junwei Zhang <linggao.zjw@alibaba-inc.com>
> > Signed-off-by: Martin Zhang <martinbj2008@gmail.com>
> > ---
> 
> Acked-by: Eric Dumazet <edumazet@google.com>
> 

BTW, very nice catch, thanks guys !

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.
  2015-11-17 12:49 [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure martinbj2008
  2015-11-17 13:07 ` Eric Dumazet
@ 2015-11-17 20:26 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2015-11-17 20:26 UTC (permalink / raw)
  To: martinbj2008; +Cc: netdev, linggao.zjw

From: martinbj2008@gmail.com
Date: Tue, 17 Nov 2015 20:49:30 +0800

> From: Martin Zhang <martinbj2008@gmail.com>
> 
> 1. new skb only need dst and ip address(v4 or v6).
> 2. skb_copy may need high order pages, which is very rare on long running server.
> 
> Signed-off-by: Junwei Zhang <linggao.zjw@alibaba-inc.com>
> Signed-off-by: Martin Zhang <martinbj2008@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-17 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-17 12:49 [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure martinbj2008
2015-11-17 13:07 ` Eric Dumazet
2015-11-17 13:49   ` Eric Dumazet
2015-11-17 20:26 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.