All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset
@ 2016-07-20 21:39 Saeed Mahameed
  2016-07-20 22:30 ` David Miller
  2016-07-21  0:53 ` Alexei Starovoitov
  0 siblings, 2 replies; 5+ messages in thread
From: Saeed Mahameed @ 2016-07-20 21:39 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Matthew Finlay, Saeed Mahameed

memset the command buffers rather than the pointers to them.

Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---

V2:
 - Improved log message.

 drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
index 05de772..e25a73ed 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
@@ -72,8 +72,8 @@ static int mlx5e_vxlan_core_del_port_cmd(struct mlx5_core_dev *mdev, u16 port)
 	u32 in[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_in)];
 	u32 out[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_out)];
 
-	memset(&in, 0, sizeof(in));
-	memset(&out, 0, sizeof(out));
+	memset(in, 0, sizeof(in));
+	memset(out, 0, sizeof(out));
 
 	MLX5_SET(delete_vxlan_udp_dport_in, in, opcode,
 		 MLX5_CMD_OP_DELETE_VXLAN_UDP_DPORT);
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset
  2016-07-20 21:39 [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset Saeed Mahameed
@ 2016-07-20 22:30 ` David Miller
  2016-07-21  0:53 ` Alexei Starovoitov
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2016-07-20 22:30 UTC (permalink / raw)
  To: saeedm; +Cc: netdev, matt

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Thu, 21 Jul 2016 00:39:53 +0300

> memset the command buffers rather than the pointers to them.
> 
> Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling")
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> ---
> 
> V2:
>  - Improved log message.

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset
  2016-07-20 21:39 [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset Saeed Mahameed
  2016-07-20 22:30 ` David Miller
@ 2016-07-21  0:53 ` Alexei Starovoitov
  2016-07-21  8:08   ` Saeed Mahameed
  1 sibling, 1 reply; 5+ messages in thread
From: Alexei Starovoitov @ 2016-07-21  0:53 UTC (permalink / raw)
  To: Saeed Mahameed; +Cc: David S. Miller, netdev, Matthew Finlay

On Thu, Jul 21, 2016 at 12:39:53AM +0300, Saeed Mahameed wrote:
> memset the command buffers rather than the pointers to them.

that is still wrong commit log.
This patch makes zero difference to generated code.
'&in' is the same as 'in'

> Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling")
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> ---
> 
> V2:
>  - Improved log message.
> 
>  drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
> index 05de772..e25a73ed 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
> @@ -72,8 +72,8 @@ static int mlx5e_vxlan_core_del_port_cmd(struct mlx5_core_dev *mdev, u16 port)
>  	u32 in[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_in)];
>  	u32 out[MLX5_ST_SZ_DW(delete_vxlan_udp_dport_out)];
>  
> -	memset(&in, 0, sizeof(in));
> -	memset(&out, 0, sizeof(out));
> +	memset(in, 0, sizeof(in));
> +	memset(out, 0, sizeof(out));
>  
>  	MLX5_SET(delete_vxlan_udp_dport_in, in, opcode,
>  		 MLX5_CMD_OP_DELETE_VXLAN_UDP_DPORT);
> -- 
> 2.8.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset
  2016-07-21  0:53 ` Alexei Starovoitov
@ 2016-07-21  8:08   ` Saeed Mahameed
  2016-07-21 17:48     ` Alexei Starovoitov
  0 siblings, 1 reply; 5+ messages in thread
From: Saeed Mahameed @ 2016-07-21  8:08 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Saeed Mahameed, David S. Miller, Linux Netdev List, Matthew Finlay

On Thu, Jul 21, 2016 at 3:53 AM, Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
> On Thu, Jul 21, 2016 at 12:39:53AM +0300, Saeed Mahameed wrote:
>> memset the command buffers rather than the pointers to them.
>
> that is still wrong commit log.
> This patch makes zero difference to generated code.
> '&in' is the same as 'in'
>

Who said they are not ? There was a mistake in the original log
message and it was fixed here.
The patch was made to make the code consistent with other places in
the code, and i don't see anything wrong with the log message.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset
  2016-07-21  8:08   ` Saeed Mahameed
@ 2016-07-21 17:48     ` Alexei Starovoitov
  0 siblings, 0 replies; 5+ messages in thread
From: Alexei Starovoitov @ 2016-07-21 17:48 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: Saeed Mahameed, David S. Miller, Linux Netdev List, Matthew Finlay

On Thu, Jul 21, 2016 at 11:08:06AM +0300, Saeed Mahameed wrote:
> On Thu, Jul 21, 2016 at 3:53 AM, Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
> > On Thu, Jul 21, 2016 at 12:39:53AM +0300, Saeed Mahameed wrote:
> >> memset the command buffers rather than the pointers to them.
> >
> > that is still wrong commit log.
> > This patch makes zero difference to generated code.
> > '&in' is the same as 'in'
> >
> 
> Who said they are not ? There was a mistake in the original log
> message and it was fixed here.
> The patch was made to make the code consistent with other places in
> the code, and i don't see anything wrong with the log message.

the commit log implies that there is a bug. There is none.
old code does 'memset the command buffers'.
'rather than the pointers' is not correct.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-21 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 21:39 [PATCH net V2] net/mlx5e: Fix del vxlan port command buffer memset Saeed Mahameed
2016-07-20 22:30 ` David Miller
2016-07-21  0:53 ` Alexei Starovoitov
2016-07-21  8:08   ` Saeed Mahameed
2016-07-21 17:48     ` Alexei Starovoitov

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.