From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Or Gerlitz <ogerlitz@mellanox.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, roland@kernel.org,
jackm@dev.mellanox.co.il, matanb@mellanox.com,
amirv@mellanox.com, Jack Morgenstein <jackm@mellanox.com>
Subject: Re: [PATCH net 1/4] net/mlx4_core: Adjust port number in qp_attach wrapper when detaching
Date: Thu, 01 May 2014 23:54:42 +0400 [thread overview]
Message-ID: <5362A682.60101@cogentembedded.com> (raw)
In-Reply-To: <1398948716-6765-2-git-send-email-ogerlitz@mellanox.com>
Hello.
On 05/01/2014 04:51 PM, Or Gerlitz wrote:
> From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> When using single ported VFs and the VF is using port 2, we need
> to adjust the port accordingly (change it from 1 to 2).
> Fixes: 449fc48 ('net/mlx4: Adapt code for N-Port VF')
> Signed-off-by: Matan Barak <matanb@mellanox.com>
> Signed-off-by: Jack Morgenstein <jackm@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> ---
> .../net/ethernet/mellanox/mlx4/resource_tracker.c | 23 ++++++++++++++++++++
> 1 files changed, 23 insertions(+), 0 deletions(-)
> diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> index 3b5f53e..3f27cba 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
> @@ -3733,6 +3733,25 @@ static int qp_detach(struct mlx4_dev *dev, struct mlx4_qp *qp,
> }
> }
>
> +static int mlx4_adjust_port(struct mlx4_dev *dev, int slave,
> + u8 *gid, enum mlx4_protocol prot)
> +{
> + int real_port;
> +
> + if (prot != MLX4_PROT_ETH)
> + return 0;
> +
> + if (dev->caps.steering_mode == MLX4_STEERING_MODE_B0 ||
> + (dev->caps.steering_mode == MLX4_STEERING_MODE_DEVICE_MANAGED)) {
It looks a bit strange when you enclose in parens the second == but not
the first. In fact, they're not at all necessary.
WBR, Sergei
next prev parent reply other threads:[~2014-05-01 19:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 12:51 [PATCH net 0/4] Batch of mlx4 fixes for 3.15 Or Gerlitz
2014-05-01 12:51 ` [PATCH net 1/4] net/mlx4_core: Adjust port number in qp_attach wrapper when detaching Or Gerlitz
2014-05-01 19:54 ` Sergei Shtylyov [this message]
2014-05-02 10:43 ` Or Gerlitz
2014-05-01 12:51 ` [PATCH net 2/4] net/mlx4_core: Fix slave id computation for single port VF Or Gerlitz
2014-05-01 12:51 ` [PATCH net 3/4] net/mlx4_core: Load the Eth driver first Or Gerlitz
2014-05-01 12:51 ` [PATCH net 4/4] net/mlx4_core: Don't issue PCIe speed/width checks for VFs Or Gerlitz
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=5362A682.60101@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=jackm@dev.mellanox.co.il \
--cc=jackm@mellanox.com \
--cc=matanb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=roland@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;
as well as URLs for NNTP newsgroup(s).