* [patch net 0/3] mlxsw: Couple of fixes
@ 2016-05-06 9:17 Jiri Pirko
2016-05-06 20:00 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Pirko @ 2016-05-06 9:17 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz
From: Jiri Pirko <jiri@mellanox.com>
Ido Schimmel (2):
mlxsw: spectrum: Fix rollback order in LAG join failure
mlxsw: spectrum: Add missing rollback in flood configuration
Jiri Pirko (1):
mlxsw: spectrum: Fix ordering in mlxsw_sp_fini
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 +++--
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 8 ++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
--
2.5.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net 0/3] mlxsw: Couple of fixes
2016-05-06 9:17 Jiri Pirko
@ 2016-05-06 20:00 ` David Miller
2016-05-06 20:13 ` Jiri Pirko
0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2016-05-06 20:00 UTC (permalink / raw)
To: jiri; +Cc: netdev, idosch, eladr, yotamg, ogerlitz
From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 6 May 2016 11:17:21 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> Ido Schimmel (2):
> mlxsw: spectrum: Fix rollback order in LAG join failure
> mlxsw: spectrum: Add missing rollback in flood configuration
>
> Jiri Pirko (1):
> mlxsw: spectrum: Fix ordering in mlxsw_sp_fini
What tree is this for? Because on 'net' this makes the build fail.
drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function ‘mlxsw_sp_fini’:
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:2162:2: error: implicit declaration of function ‘mlxsw_sp_buffers_fini’ [-Werror=implicit-function-declaration]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net 0/3] mlxsw: Couple of fixes
2016-05-06 20:00 ` David Miller
@ 2016-05-06 20:13 ` Jiri Pirko
2016-05-06 20:15 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Pirko @ 2016-05-06 20:13 UTC (permalink / raw)
To: David Miller; +Cc: netdev, idosch, eladr, yotamg, ogerlitz
Fri, May 06, 2016 at 10:00:32PM CEST, davem@davemloft.net wrote:
>From: Jiri Pirko <jiri@resnulli.us>
>Date: Fri, 6 May 2016 11:17:21 +0200
>
>> From: Jiri Pirko <jiri@mellanox.com>
>>
>> Ido Schimmel (2):
>> mlxsw: spectrum: Fix rollback order in LAG join failure
>> mlxsw: spectrum: Add missing rollback in flood configuration
>>
>> Jiri Pirko (1):
>> mlxsw: spectrum: Fix ordering in mlxsw_sp_fini
>
>What tree is this for? Because on 'net' this makes the build fail.
>
>drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function ‘mlxsw_sp_fini’:
>drivers/net/ethernet/mellanox/mlxsw/spectrum.c:2162:2: error: implicit declaration of function ‘mlxsw_sp_buffers_fini’ [-Werror=implicit-function-declaration]
>
Oh. Ido's patches are for -net, mine if for -net-next. I did't realize,
sorry. Do you want me to repost?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net 0/3] mlxsw: Couple of fixes
2016-05-06 20:13 ` Jiri Pirko
@ 2016-05-06 20:15 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2016-05-06 20:15 UTC (permalink / raw)
To: jiri; +Cc: netdev, idosch, eladr, yotamg, ogerlitz
From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 6 May 2016 22:13:49 +0200
> Fri, May 06, 2016 at 10:00:32PM CEST, davem@davemloft.net wrote:
>>From: Jiri Pirko <jiri@resnulli.us>
>>Date: Fri, 6 May 2016 11:17:21 +0200
>>
>>> From: Jiri Pirko <jiri@mellanox.com>
>>>
>>> Ido Schimmel (2):
>>> mlxsw: spectrum: Fix rollback order in LAG join failure
>>> mlxsw: spectrum: Add missing rollback in flood configuration
>>>
>>> Jiri Pirko (1):
>>> mlxsw: spectrum: Fix ordering in mlxsw_sp_fini
>>
>>What tree is this for? Because on 'net' this makes the build fail.
>>
>>drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function ‘mlxsw_sp_fini’:
>>drivers/net/ethernet/mellanox/mlxsw/spectrum.c:2162:2: error: implicit declaration of function ‘mlxsw_sp_buffers_fini’ [-Werror=implicit-function-declaration]
>>
>
> Oh. Ido's patches are for -net, mine if for -net-next. I did't realize,
> sorry. Do you want me to repost?
Yes, please post them properly.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch net 0/3] mlxsw: Couple of fixes
@ 2017-01-12 8:10 Jiri Pirko
2017-01-12 8:10 ` [patch net 1/3] mlxsw: spectrum: Fix memory leak at skb reallocation Jiri Pirko
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Jiri Pirko @ 2017-01-12 8:10 UTC (permalink / raw)
To: netdev; +Cc: davem, arkadis, eladr, yotamg, nogahf, idosch
From: Jiri Pirko <jiri@mellanox.com>
Couple of simple fixes from Arkadi and Elad.
Please queue these up for stable. Thanks.
Arkadi Sharshevsky (2):
mlxsw: spectrum: Fix memory leak at skb reallocation
mlxsw: switchx2: Fix memory leak at skb reallocation
Elad Raz (1):
mlxsw: pci: Fix EQE structure definition
drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 8 ++++----
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 +
3 files changed, 6 insertions(+), 4 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch net 1/3] mlxsw: spectrum: Fix memory leak at skb reallocation
2017-01-12 8:10 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
@ 2017-01-12 8:10 ` Jiri Pirko
2017-01-12 8:10 ` [patch net 2/3] mlxsw: switchx2: " Jiri Pirko
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Jiri Pirko @ 2017-01-12 8:10 UTC (permalink / raw)
To: netdev; +Cc: davem, arkadis, eladr, yotamg, nogahf, idosch
From: Arkadi Sharshevsky <arkadis@mellanox.com>
During transmission the skb is checked for headroom in order to
add vendor specific header. In case the skb needs to be re-allocated,
skb_realloc_headroom() is called to make a private copy of the original,
but doesn't release it. Current code assumes that the original skb is
released during reallocation and only releases it at the error path
which causes a memory leak.
Fix this by adding the original skb release to the main path.
Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index d768c7b..003093a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -684,6 +684,7 @@ static netdev_tx_t mlxsw_sp_port_xmit(struct sk_buff *skb,
dev_kfree_skb_any(skb_orig);
return NETDEV_TX_OK;
}
+ dev_consume_skb_any(skb_orig);
}
if (eth_skb_pad(skb)) {
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch net 2/3] mlxsw: switchx2: Fix memory leak at skb reallocation
2017-01-12 8:10 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
2017-01-12 8:10 ` [patch net 1/3] mlxsw: spectrum: Fix memory leak at skb reallocation Jiri Pirko
@ 2017-01-12 8:10 ` Jiri Pirko
2017-01-12 8:10 ` [patch net 3/3] mlxsw: pci: Fix EQE structure definition Jiri Pirko
2017-01-12 14:26 ` [patch net 0/3] mlxsw: Couple of fixes David Miller
3 siblings, 0 replies; 9+ messages in thread
From: Jiri Pirko @ 2017-01-12 8:10 UTC (permalink / raw)
To: netdev; +Cc: davem, arkadis, eladr, yotamg, nogahf, idosch
From: Arkadi Sharshevsky <arkadis@mellanox.com>
During transmission the skb is checked for headroom in order to
add vendor specific header. In case the skb needs to be re-allocated,
skb_realloc_headroom() is called to make a private copy of the original,
but doesn't release it. Current code assumes that the original skb is
released during reallocation and only releases it at the error path
which causes a memory leak.
Fix this by adding the original skb release to the main path.
Fixes: d003462a50de ("mlxsw: Simplify mlxsw_sx_port_xmit function")
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
index 150ccf5..2e88115e 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c
@@ -345,6 +345,7 @@ static netdev_tx_t mlxsw_sx_port_xmit(struct sk_buff *skb,
dev_kfree_skb_any(skb_orig);
return NETDEV_TX_OK;
}
+ dev_consume_skb_any(skb_orig);
}
mlxsw_sx_txhdr_construct(skb, &tx_info);
/* TX header is consumed by HW on the way so we shouldn't count its
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch net 3/3] mlxsw: pci: Fix EQE structure definition
2017-01-12 8:10 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
2017-01-12 8:10 ` [patch net 1/3] mlxsw: spectrum: Fix memory leak at skb reallocation Jiri Pirko
2017-01-12 8:10 ` [patch net 2/3] mlxsw: switchx2: " Jiri Pirko
@ 2017-01-12 8:10 ` Jiri Pirko
2017-01-12 14:26 ` [patch net 0/3] mlxsw: Couple of fixes David Miller
3 siblings, 0 replies; 9+ messages in thread
From: Jiri Pirko @ 2017-01-12 8:10 UTC (permalink / raw)
To: netdev; +Cc: davem, arkadis, eladr, yotamg, nogahf, idosch
From: Elad Raz <eladr@mellanox.com>
The event_data starts from address 0x00-0x0C and not from 0x08-0x014. This
leads to duplication with other fields in the Event Queue Element such as
sub-type, cqn and owner.
Fixes: eda6500a987a0 ("mlxsw: Add PCI bus implementation")
Signed-off-by: Elad Raz <eladr@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
index d147ddd..0af3338 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
@@ -209,21 +209,21 @@ MLXSW_ITEM32(pci, eqe, owner, 0x0C, 0, 1);
/* pci_eqe_cmd_token
* Command completion event - token
*/
-MLXSW_ITEM32(pci, eqe, cmd_token, 0x08, 16, 16);
+MLXSW_ITEM32(pci, eqe, cmd_token, 0x00, 16, 16);
/* pci_eqe_cmd_status
* Command completion event - status
*/
-MLXSW_ITEM32(pci, eqe, cmd_status, 0x08, 0, 8);
+MLXSW_ITEM32(pci, eqe, cmd_status, 0x00, 0, 8);
/* pci_eqe_cmd_out_param_h
* Command completion event - output parameter - higher part
*/
-MLXSW_ITEM32(pci, eqe, cmd_out_param_h, 0x0C, 0, 32);
+MLXSW_ITEM32(pci, eqe, cmd_out_param_h, 0x04, 0, 32);
/* pci_eqe_cmd_out_param_l
* Command completion event - output parameter - lower part
*/
-MLXSW_ITEM32(pci, eqe, cmd_out_param_l, 0x10, 0, 32);
+MLXSW_ITEM32(pci, eqe, cmd_out_param_l, 0x08, 0, 32);
#endif
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch net 0/3] mlxsw: Couple of fixes
2017-01-12 8:10 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
` (2 preceding siblings ...)
2017-01-12 8:10 ` [patch net 3/3] mlxsw: pci: Fix EQE structure definition Jiri Pirko
@ 2017-01-12 14:26 ` David Miller
3 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2017-01-12 14:26 UTC (permalink / raw)
To: jiri; +Cc: netdev, arkadis, eladr, yotamg, nogahf, idosch
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 12 Jan 2017 09:10:36 +0100
> Couple of simple fixes from Arkadi and Elad.
>
> Please queue these up for stable. Thanks.
Series applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-01-12 14:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-12 8:10 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
2017-01-12 8:10 ` [patch net 1/3] mlxsw: spectrum: Fix memory leak at skb reallocation Jiri Pirko
2017-01-12 8:10 ` [patch net 2/3] mlxsw: switchx2: " Jiri Pirko
2017-01-12 8:10 ` [patch net 3/3] mlxsw: pci: Fix EQE structure definition Jiri Pirko
2017-01-12 14:26 ` [patch net 0/3] mlxsw: Couple of fixes David Miller
-- strict thread matches above, loose matches on Subject: below --
2016-05-06 9:17 Jiri Pirko
2016-05-06 20:00 ` David Miller
2016-05-06 20:13 ` Jiri Pirko
2016-05-06 20:15 ` David Miller
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).