[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcc5Pje2c-bEgm+VCXCf6aXp7yV94UKUOw1e0HNO1WTUx0=dw@mail.gmail.com>
Date: Tue, 12 May 2015 11:19:46 +0300
From: Amir Vadai <amirv@...lanox.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: Amir Vadai <amirv@...lanox.com>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Or Gerlitz <ogerlitz@...lanox.com>,
Tal Alon <talal@...lanox.com>,
Achiad Shochat <achiad@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [PATCH net-next V3 08/11] net/mlx5_core: Set/Query port MTU commands
On Sun, May 10, 2015 at 7:32 PM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> wrote:
> Hello.
>
> On 5/10/2015 12:39 PM, Amir Vadai wrote:
>
>> From: Saeed Mahameed <saeedm@...lanox.com>
>
>
>> Introduce set/Query low level functions to access MTU in hardware. To be
>> used by the netdev.
>
>
>> Signed-off-by: Saeed Mahameed <saeedm@...lanox.com>
>> Signed-off-by: Amir Vadai <amirv@...lanox.com>
>> ---
>> drivers/net/ethernet/mellanox/mlx5/core/port.c | 56
>> ++++++++++++++++++++++++++
>> include/linux/mlx5/driver.h | 4 ++
>> 2 files changed, 60 insertions(+)
>
>
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> b/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> index 742a6fb..e56a0b6 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
>> @@ -211,3 +211,59 @@ int mlx5_query_port_status(struct mlx5_core_dev *dev,
>> u8 *status)
>
> [...]
>>
>> +int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu)
>> +{
>> + u32 in[MLX5_ST_SZ_DW(pmtu_reg)];
>> + u32 out[MLX5_ST_SZ_DW(pmtu_reg)];
>> + int err;
>> +
>> + memset(in, 0, sizeof(in));
>> +
>> + MLX5_SET(pmtu_reg, in, admin_mtu, mtu);
>> + MLX5_SET(pmtu_reg, in, local_port, 1);
>> +
>> + err = mlx5_core_access_reg(dev, in, sizeof(in), out,
>> + sizeof(out), MLX5_REG_PMTU, 0, 1);
>> +
>> + return err;
>
>
> Why not just return directly?
Will be fixed in V4
Thanks,
Amir
>
> [...]
>
> WBR, Sergei
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists