From: David Miller <davem@davemloft.net>
To: haiyangz@microsoft.com, haiyangz@exchange.microsoft.com
Cc: netdev@vger.kernel.org, kys@microsoft.com, olaf@aepfle.de,
vkuznets@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next,1/3] hv_netvsc: Use per socket hash when available
Date: Tue, 11 Apr 2017 22:12:41 -0400 (EDT) [thread overview]
Message-ID: <20170411.221241.2175639910931847215.davem@davemloft.net> (raw)
In-Reply-To: <1491699241-9944-1-git-send-email-haiyangz@exchange.microsoft.com>
From: Haiyang Zhang <haiyangz@exchange.microsoft.com>
Date: Sat, 8 Apr 2017 17:53:59 -0700
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index f24c289..0a129cb 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -211,9 +211,14 @@ static u16 netvsc_select_queue(struct net_device *ndev, struct sk_buff *skb,
> int q_idx = sk_tx_queue_get(sk);
>
> if (q_idx < 0 || skb->ooo_okay || q_idx >= num_tx_queues) {
> - u16 hash = __skb_tx_hash(ndev, skb, VRSS_SEND_TAB_SIZE);
> + u16 hash;
> int new_idx;
>
> + if (sk)
> + skb_set_hash_from_sk(skb, sk);
> +
> + hash = __skb_tx_hash(ndev, skb, VRSS_SEND_TAB_SIZE);
Please do not do this.
TCP performs this operation for you for every pack it emits.
And also every socket family that uses skb_set_owner_w() either
directly or indirectly gets this done as well.
I do not want to see drivers start to get peppered with calls to this
thing.
Explain the case which is missing that matters, and we can address
that instead.
Thanks.
next prev parent reply other threads:[~2017-04-12 2:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-09 0:53 Haiyang Zhang
2017-04-09 0:54 ` [PATCH net-next,2/3] hv_netvsc: Fix the queue index computation in forwarding case Haiyang Zhang
2017-04-09 0:54 ` [PATCH net-next,3/3] hv_netvsc: Exclude non-TCP port numbers from vRSS hashing Haiyang Zhang
2017-04-12 2:12 ` David Miller [this message]
2017-04-12 16:24 ` [PATCH net-next,1/3] hv_netvsc: Use per socket hash when available Haiyang Zhang
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=20170411.221241.2175639910931847215.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=haiyangz@exchange.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=vkuznets@redhat.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
all inboxes | Powered by JetHome®