public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@mellanox•com>
To: Eyal Perry <eyalpe@mellanox•com>
Cc: Amir Vadai <amirv@mellanox•com>,
	"David S. Miller" <davem@davemloft•net>,
	Ben Hutchings <ben@decadent•org.uk>, <netdev@vger•kernel.org>,
	"Yevgeny Petrilin" <yevgenyp@mellanox•com>
Subject: Re: [PATCH net-next 2/2] net/mlx4_en: Support for configurable RSS hash function
Date: Wed, 5 Nov 2014 15:53:12 +0200	[thread overview]
Message-ID: <545A2BC8.4030304@mellanox.com> (raw)
In-Reply-To: <1415188769-19593-3-git-send-email-amirv@mellanox.com>


On 11/5/2014 1:59 PM, Amir Vadai wrote:
> --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> @@ -2585,6 +2585,15 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
>   		dev->features    |= NETIF_F_GSO_UDP_TUNNEL;
>   	}
>   
> +	if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RSS_XOR) {
> +		priv->rss_hash_fn_caps |= RSS_HASH_XOR;
> +		priv->rss_hash_fn = RSS_HASH_XOR;
> +	}
> +	if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RSS_TOP) {
> +		priv->rss_hash_fn_caps |= RSS_HASH_TOP;
> +		priv->rss_hash_fn = RSS_HASH_TOP;
> +	}
> +

can we somehow change this code to be more clear and assign 
priv->rss_hash_fn once?

>   	mdev->pndev[port] = dev;
>   
>   	netif_carrier_off(dev);

      parent reply	other threads:[~2014-11-05 13:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 11:59 [PATCH net-next 0/2] ethtool, net/mlx4_en: RSS hash function selection Amir Vadai
2014-11-05 11:59 ` [PATCH net-next 1/2] ethtool: Support for configurable RSS hash function Amir Vadai
2014-11-05 21:51   ` Ben Hutchings
2014-11-06  9:41     ` Eyal perry
2014-11-05 11:59 ` [PATCH net-next 2/2] net/mlx4_en: " Amir Vadai
2014-11-05 12:27   ` Or Gerlitz
2014-11-05 13:05     ` Eyal perry
2014-11-05 13:30       ` Or Gerlitz
2014-11-05 13:48         ` Eyal perry
2014-11-05 13:53   ` Or Gerlitz [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=545A2BC8.4030304@mellanox.com \
    --to=ogerlitz@mellanox$(echo .)com \
    --cc=amirv@mellanox$(echo .)com \
    --cc=ben@decadent$(echo .)org.uk \
    --cc=davem@davemloft$(echo .)net \
    --cc=eyalpe@mellanox$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=yevgenyp@mellanox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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