* [RFC PATCH net-next] arp: Do not perturb drop profiles with ignored ARP packets
@ 2014-09-25 17:55 Rick Jones
2014-09-28 21:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Rick Jones @ 2014-09-25 17:55 UTC (permalink / raw)
To: netdev; +Cc: davem
From: Rick Jones <rick.jones2@hp.com>
We do not wish to disturb dropwatch or perf drop profiles with an ARP
we will ignore.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
---
Compile tested only after seeing arp_rcv in a perf top -G -e skb:kfree_skb
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 1a9b99e..16acb59 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -953,10 +953,11 @@ static int arp_rcv(struct sk_buff *skb, struct net_device *dev,
{
const struct arphdr *arp;
+ /* do not tweak dropwatch on an ARP we will ignore */
if (dev->flags & IFF_NOARP ||
skb->pkt_type == PACKET_OTHERHOST ||
skb->pkt_type == PACKET_LOOPBACK)
- goto freeskb;
+ goto consumeskb;
skb = skb_share_check(skb, GFP_ATOMIC);
if (!skb)
@@ -974,6 +975,9 @@ static int arp_rcv(struct sk_buff *skb, struct net_device *dev,
return NF_HOOK(NFPROTO_ARP, NF_ARP_IN, skb, dev, NULL, arp_process);
+consumeskb:
+ consume_skb(skb);
+ return 0;
freeskb:
kfree_skb(skb);
out_of_mem:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH net-next] arp: Do not perturb drop profiles with ignored ARP packets
2014-09-25 17:55 [RFC PATCH net-next] arp: Do not perturb drop profiles with ignored ARP packets Rick Jones
@ 2014-09-28 21:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-09-28 21:31 UTC (permalink / raw)
To: raj; +Cc: netdev
From: raj@tardy.usa.hp.com (Rick Jones)
Date: Thu, 25 Sep 2014 10:55:28 -0700 (PDT)
>
> From: Rick Jones <rick.jones2@hp.com>
>
> We do not wish to disturb dropwatch or perf drop profiles with an ARP
> we will ignore.
>
> Signed-off-by: Rick Jones <rick.jones2@hp.com>
This is fine, applied, thanks Rick.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-28 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 17:55 [RFC PATCH net-next] arp: Do not perturb drop profiles with ignored ARP packets Rick Jones
2014-09-28 21:31 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).