Skip to contentSkip to conversation

ipv4,ipv6: send arp/ndisc packets with TC_PRIO_CONTROL

PATCH In review Hannes Frederic Sowa 1 participant 2 messages Aug 14, 2013 – Aug 15, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv4,ipv6: send arp/ndisc packets with TC_PRIO_CONTROL

We already did this change for igmp/mld packets in commit 9d4a0314642918cbda9ed4012df51e8df608fce6 ("ipv4, ipv6: send igmpv3/mld packets with TC_PRIO_CONTROL").

arp and ndisc are as important as mld/igmp for a working network, so make the appropriate change here, too.

---
 net/ipv4/arp.c   | 2 ++
 net/ipv6/ndisc.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
net/ipv4/arp.c +2 -0
index 4429b01..4ed18371 100644
@@ -92,6 +92,7 @@
 #include <linux/fddidevice.h>
 #include <linux/if_arp.h>
 #include <linux/skbuff.h>
+#include <linux/pkt_sched.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/stat.h>
@@ -594,6 +595,7 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
 	skb_reset_network_header(skb);
 	arp = (struct arphdr *) skb_put(skb, arp_hdr_len(dev));
 	skb->dev = dev;
+	skb->priority = TC_PRIO_CONTROL;
 	skb->protocol = htons(ETH_P_ARP);
 	if (src_hw == NULL)
 		src_hw = dev->dev_addr;
net/ipv6/ndisc.c +2 -1
index 79aa965..007f868 100644
@@ -50,6 +50,7 @@
 #include <linux/ipv6.h>
 #include <linux/icmpv6.h>
 #include <linux/jhash.h>
+#include <linux/pkt_sched.h>
 
 #include <net/sock.h>
 #include <net/snmp.h>
@@ -382,7 +383,7 @@ static struct sk_buff *ndisc_alloc_skb(struct net_device *dev,
 			  __func__, err);
 		return NULL;
 	}
-
+	skb->priority = TC_PRIO_CONTROL;
 	skb->protocol = htons(ETH_P_IPV6);
 	skb->dev = dev;
 
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 9 lines · Hannes Frederic Sowa

We already did this change for igmp/mld packets in commit 9d4a0314642918cbda9ed4012df51e8df608fce6 ("ipv4, ipv6: send igmpv3/mld packets with TC_PRIO_CONTROL").

arp and ndisc are as important as mld/igmp for a working network, so make the appropriate change here, too.

I would like to downgrade this patch from tag net-next to RFC.

After Dave Taht talked to me, I realized that this change could have drastic impact on how packets could starve in various qdiscs if a router is last hop for a ping scan.

Please postpone this patch until I did more research. Comments are welcome, too.

Thanks,

Hannes