All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] ixgbevf: Set rx hash type for ingress packets
Date: Wed, 15 Apr 2015 08:20:09 -0700	[thread overview]
Message-ID: <552E81A9.6010506@redhat.com> (raw)
In-Reply-To: <87618083B2453E4A8714035B62D6799250295D66@FMSMSX105.amr.corp.intel.com>



On 04/14/2015 08:42 PM, Tantilov, Emil S wrote:
>> -----Original Message-----
>> From: Du, Fan
>> Sent: Tuesday, April 14, 2015 8:12 PM
>> To: Kirsher, Jeffrey T
>> Subject: [PATCH] ixgbevf: Set rx hash type for ingress packets
>>
>> Set hash type for ingress packets according to NIC
>> advanced receive descriptors RSS type part.
>>
>> also use le16_to_cpu forcing type conversion to slient
>> endian check warnings.
>>
>> Signed-off-by: Fan Du <fan.du@intel.com>
>> ---
>> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c     |    2 +-
>> drivers/net/ethernet/intel/ixgbevf/defines.h      |   12 ++++++++
>> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   30 +++++++++++++++++++++
>> 3 files changed, 43 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> index 8915992..1b3b5fb 100644
>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> @@ -1359,7 +1359,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
>> #endif /* CONFIG_IXGBE_DCA */
>> static inline enum pkt_hash_types ixgbe_get_hash_type(__le16 pkt_info)
>> {
>> -	switch (pkt_info & cpu_to_le16(IXGBE_RXDADV_RSSTYPE_MASK)) {
>> +	switch (le16_to_cpu(pkt_info) & IXGBE_RXDADV_RSSTYPE_MASK) {
> This appears to be a fix for your ixgbe patch and does not belong here. The proper way to handle it is to submit
> version 2. Also checkout my reply to your ixgbe patch - it has the logic we use in ixgbe and there are some differences
> that we need to address before we can accept this. Like the IPV4/6 extensions defines are not included and in the case of rss_type being 0 RSS is nor performed and so we probably should not call set_skb_hash() in that situation.
>
> Thanks,
> Emil
>

Also instead of byte swapping the value, why not byte swap the cases in 
the switch statement?  Then the byte swapping can all be done at compile 
time instead of having to do it at run-time on big endian systems.

- Alex

      parent reply	other threads:[~2015-04-15 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14  6:56 [Intel-wired-lan] [PATCH] ixgbe: Specify rx hash type wrt rx desc RSS type Fan Du
2015-04-14 12:58 ` Jeff Kirsher
2015-04-15  0:29 ` Tantilov, Emil S
2015-04-15  3:12   ` [Intel-wired-lan] [PATCH] ixgbevf: Set rx hash type for ingress packets Fan Du
2015-04-15  3:42     ` Tantilov, Emil S
2015-04-15  7:27       ` Du, Fan
2015-04-15  7:47         ` Jeff Kirsher
2015-04-15  8:07         ` Tantilov, Emil S
2015-04-15 15:20       ` Alexander Duyck [this message]

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=552E81A9.6010506@redhat.com \
    --to=alexander.h.duyck@redhat.com \
    --cc=intel-wired-lan@osuosl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.