Netdev List
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: netdev@vger.kernel.org
Cc: bcrl@kvack.org
Subject: [PATCH net-next] ipv4,ipv6: send arp/ndisc packets with TC_PRIO_CONTROL
Date: Thu, 15 Aug 2013 01:34:12 +0200	[thread overview]
Message-ID: <20130814233412.GC13066@order.stressinduktion.org> (raw)

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.

Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 net/ipv4/arp.c   | 2 ++
 net/ipv6/ndisc.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 4429b01..4ed18371 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -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;
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 79aa965..007f868 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -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;
 
-- 
1.8.3.1

             reply	other threads:[~2013-08-14 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 23:34 Hannes Frederic Sowa [this message]
2013-08-15  3:56 ` [PATCH net-next] ipv4,ipv6: send arp/ndisc packets with TC_PRIO_CONTROL Hannes Frederic Sowa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130814233412.GC13066@order.stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=bcrl@kvack.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox