* [PATCH net-next 0/2] net/smc: updates 2021-06-02
@ 2021-06-02 8:56 Karsten Graul
2021-06-02 8:56 ` [PATCH net-next 1/2] net/smc: avoid possible duplicate dmb unregistration Karsten Graul
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Karsten Graul @ 2021-06-02 8:56 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: Heiko Carstens, Stefan Raspl, netdev, linux-s390
Please apply the following patch series for smc to netdev's net-next tree.
Both patches are cleanups and remove unnecessary code.
Julian Wiedmann (1):
net/smc: no need to flush smcd_dev's event_wq before destroying it
Karsten Graul (1):
net/smc: avoid possible duplicate dmb unregistration
net/smc/smc_core.c | 15 ---------------
net/smc/smc_ism.c | 1 -
2 files changed, 16 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] net/smc: avoid possible duplicate dmb unregistration
2021-06-02 8:56 [PATCH net-next 0/2] net/smc: updates 2021-06-02 Karsten Graul
@ 2021-06-02 8:56 ` Karsten Graul
2021-06-02 8:56 ` [PATCH net-next 2/2] net/smc: no need to flush smcd_dev's event_wq before destroying it Karsten Graul
2021-06-03 21:00 ` [PATCH net-next 0/2] net/smc: updates 2021-06-02 patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Karsten Graul @ 2021-06-02 8:56 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: Heiko Carstens, Stefan Raspl, netdev, linux-s390
smc_lgr_cleanup() calls smcd_unregister_all_dmbs() as part of the link
group termination process. This is a leftover from the times when
smc_lgr_cleanup() scheduled a worker to actually free the link group.
Nowadays smc_lgr_cleanup() directly calls smc_lgr_free() without any
delay so an earlier dmb unregistration is no longer needed.
So remove smcd_unregister_all_dmbs() and the call to it.
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
---
net/smc/smc_core.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index 0df85a12651e..317bc2c90fab 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -1235,20 +1235,6 @@ static void smc_lgr_free(struct smc_link_group *lgr)
kfree(lgr);
}
-static void smcd_unregister_all_dmbs(struct smc_link_group *lgr)
-{
- int i;
-
- for (i = 0; i < SMC_RMBE_SIZES; i++) {
- struct smc_buf_desc *buf_desc;
-
- list_for_each_entry(buf_desc, &lgr->rmbs[i], list) {
- buf_desc->len += sizeof(struct smcd_cdc_msg);
- smc_ism_unregister_dmb(lgr->smcd, buf_desc);
- }
- }
-}
-
static void smc_sk_wake_ups(struct smc_sock *smc)
{
smc->sk.sk_write_space(&smc->sk);
@@ -1285,7 +1271,6 @@ static void smc_lgr_cleanup(struct smc_link_group *lgr)
{
if (lgr->is_smcd) {
smc_ism_signal_shutdown(lgr);
- smcd_unregister_all_dmbs(lgr);
} else {
u32 rsn = lgr->llc_termination_rsn;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] net/smc: no need to flush smcd_dev's event_wq before destroying it
2021-06-02 8:56 [PATCH net-next 0/2] net/smc: updates 2021-06-02 Karsten Graul
2021-06-02 8:56 ` [PATCH net-next 1/2] net/smc: avoid possible duplicate dmb unregistration Karsten Graul
@ 2021-06-02 8:56 ` Karsten Graul
2021-06-03 21:00 ` [PATCH net-next 0/2] net/smc: updates 2021-06-02 patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Karsten Graul @ 2021-06-02 8:56 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: Heiko Carstens, Stefan Raspl, netdev, linux-s390
From: Julian Wiedmann <jwi@linux.ibm.com>
destroy_workqueue() already calls drain_workqueue(), which is a stronger
variant of flush_workqueue().
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
---
net/smc/smc_ism.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c
index 9c6e95882553..4dcc236d562e 100644
--- a/net/smc/smc_ism.c
+++ b/net/smc/smc_ism.c
@@ -460,7 +460,6 @@ void smcd_unregister_dev(struct smcd_dev *smcd)
mutex_unlock(&smcd_dev_list.mutex);
smcd->going_away = 1;
smc_smcd_terminate_all(smcd);
- flush_workqueue(smcd->event_wq);
destroy_workqueue(smcd->event_wq);
device_del(&smcd->dev);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] net/smc: updates 2021-06-02
2021-06-02 8:56 [PATCH net-next 0/2] net/smc: updates 2021-06-02 Karsten Graul
2021-06-02 8:56 ` [PATCH net-next 1/2] net/smc: avoid possible duplicate dmb unregistration Karsten Graul
2021-06-02 8:56 ` [PATCH net-next 2/2] net/smc: no need to flush smcd_dev's event_wq before destroying it Karsten Graul
@ 2021-06-03 21:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-03 21:00 UTC (permalink / raw)
To: Karsten Graul; +Cc: davem, kuba, hca, raspl, netdev, linux-s390
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Wed, 2 Jun 2021 10:56:24 +0200 you wrote:
> Please apply the following patch series for smc to netdev's net-next tree.
>
> Both patches are cleanups and remove unnecessary code.
>
> Julian Wiedmann (1):
> net/smc: no need to flush smcd_dev's event_wq before destroying it
>
> [...]
Here is the summary with links:
- [net-next,1/2] net/smc: avoid possible duplicate dmb unregistration
https://git.kernel.org/netdev/net-next/c/f8e0a68babae
- [net-next,2/2] net/smc: no need to flush smcd_dev's event_wq before destroying it
https://git.kernel.org/netdev/net-next/c/5e4a43ceb22a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-03 21:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 8:56 [PATCH net-next 0/2] net/smc: updates 2021-06-02 Karsten Graul
2021-06-02 8:56 ` [PATCH net-next 1/2] net/smc: avoid possible duplicate dmb unregistration Karsten Graul
2021-06-02 8:56 ` [PATCH net-next 2/2] net/smc: no need to flush smcd_dev's event_wq before destroying it Karsten Graul
2021-06-03 21:00 ` [PATCH net-next 0/2] net/smc: updates 2021-06-02 patchwork-bot+netdevbpf
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.