netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <kernel-team@fb.com>, <rick.jones2@hpe.com>
Subject: [PATCH net-next 1/4] net: Set SW hash in skb_set_hash_from_sk
Date: Wed, 31 Aug 2016 17:10:02 -0700	[thread overview]
Message-ID: <1472688605-2613704-2-git-send-email-tom@herbertland.com> (raw)
In-Reply-To: <1472688605-2613704-1-git-send-email-tom@herbertland.com>

Use the __skb_set_sw_hash to set the hash in an skbuff from the socket
txhash.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 include/net/sock.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index c797c57..12e585c 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1910,10 +1910,8 @@ static inline void sock_poll_wait(struct file *filp,
 
 static inline void skb_set_hash_from_sk(struct sk_buff *skb, struct sock *sk)
 {
-	if (sk->sk_txhash) {
-		skb->l4_hash = 1;
-		skb->hash = sk->sk_txhash;
-	}
+	if (sk->sk_txhash)
+		__skb_set_sw_hash(skb, sk->sk_txhash, true);
 }
 
 void skb_set_owner_w(struct sk_buff *skb, struct sock *sk);
-- 
2.8.0.rc2

  reply	other threads:[~2016-09-01  0:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01  0:10 [PATCH net-next 0/4] xps_flows: XPS flow steering when there is no socket Tom Herbert
2016-09-01  0:10 ` Tom Herbert [this message]
2016-09-01  0:10 ` [PATCH net-next 2/4] dql: Add counters for number of queuing and completion operations Tom Herbert
2016-09-01  0:10 ` [PATCH net-next 3/4] net: Add xps_dev_flow_table_cnt Tom Herbert
2016-09-01  0:10 ` [PATCH net-next 4/4] xps_flows: XPS for packets that don't have a socket Tom Herbert
2016-09-01 15:36   ` Alexander Duyck
2016-09-01 15:56     ` Tom Herbert
2016-09-01 23:18       ` Alexander Duyck
2016-09-01  0:37 ` [PATCH net-next 0/4] xps_flows: XPS flow steering when there is no socket Eric Dumazet
2016-09-01 16:14   ` Tom Herbert
2016-09-01 19:25 ` Florian Fainelli
2016-09-01 19:32   ` Tom Herbert
2016-09-01 19:46     ` Florian Fainelli

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=1472688605-2613704-2-git-send-email-tom@herbertland.com \
    --to=tom@herbertland.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hpe.com \
    /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;
as well as URLs for NNTP newsgroup(s).