Re: [Patch net] smc: disallow TCP_ULP in smc_setsockopt()

2021-04-13 Thread Karsten Graul
ockopt(). I do not think it makes sense to setup kTLS on > top of SMC, so we can just disallow this. > > Reported-and-tested-by: syzbot+b54a1ce86ba4a623b...@syzkaller.appspotmail.com > Cc: John Fastabend > Cc: Karsten Graul > Signed-off-by: Cong Wang > --- Signed-off-by: Karsten Graul

Re: [Patch net] smc: disallow TCP_ULP in smc_setsockopt()

2021-04-11 Thread Karsten Graul
ockopt(). I do not think it makes sense to setup kTLS on > top of SMC, so we can just disallow this. > > Reported-and-tested-by: syzbot+b54a1ce86ba4a623b...@syzkaller.appspotmail.com > Cc: John Fastabend > Cc: Karsten Graul > Signed-off-by: Cong Wang > --- > net/

Re: [PATCH] net: smc: Remove repeated struct declaration

2021-04-01 Thread Karsten Graul
On 01/04/2021 10:40, Wan Jiabing wrote: > struct smc_clc_msg_local is declared twice. One is declared at > 301st line. The blew one is not needed. Remove the duplicate. > > Signed-off-by: Wan Jiabing > --- > net/smc/smc_core.h | 1 - > 1 file changed, 1 deletion(-) > Acked-by: Karsten Graul

Re: [PATCH] net/smc: Simplify the return expression

2021-03-23 Thread Karsten Graul
On 23/03/2021 03:05, zuoqil...@163.com wrote: > From: zuoqilin > > Simplify the return expression of smc_ism_signal_shutdown(). > > Signed-off-by: zuoqilin > --- > net/smc/smc_ism.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism

Re: [PATCH] net: smc: fix error return code of smc_diag_dump_proto()

2021-03-05 Thread Karsten Graul
On 05/03/2021 11:13, Jia-Ju Bai wrote: > When the list of head is empty, no error return code of > smc_diag_dump_proto() is assigned. > To fix this bug, rc is assigned with -ENOENT as error return code. Your change would break smc_diag_dump(). When there are no IPv4 sockets (SMCPROTO_SMC) in the l

[PATCH net 0/2] net/smc: fix out of bound access in netlink interface

2021-01-12 Thread Karsten Graul
Please apply the following patch for smc to netdev's net tree. Both patches fix possible out-of-bounds reads. The original code expected that snprintf() reads len-1 bytes from source and appends the terminating null, but actually snprintf() first copies len bytes and finally overwrites the last by

[PATCH net 1/2] smc: fix out of bound access in smc_nl_get_sys_info()

2021-01-12 Thread Karsten Graul
-by: Jakub Kicinski Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 59342b519e34..8d866b4ed8f6 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -246,7 +24

[PATCH net 2/2] net/smc: use memcpy instead of snprintf to avoid out of bounds read

2021-01-12 Thread Karsten Graul
SMCR device list") Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 17 +++-- net/smc/smc_ib.c | 6 +++--- net/smc/smc_ism.c | 3 ++- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/net/smc/smc_core.c b/net/smc/smc_co

Re: [PATCH net] smc: fix out of bound access in smc_nl_get_sys_info()

2021-01-04 Thread Karsten Graul
Thank you Jakub, this patch solves the out of bounds access due to snprintf() copying size bytes first and overwriting the last byte with null afterwards. We will include your patch in our next series for the net tree soon. Reviewed-by: Karsten Graul On 30/12/2020 01:48, Jakub Kicinski wrote

[PATCH net-next 0/1] net/smc: fix access to parent of an ib device

2020-12-15 Thread Karsten Graul
Please apply the following patch for smc to netdev's net-next tree. The patch fixes an access to the parent of an ib device which might be NULL. I am sending this fix to net-next because the fixed code is still in this tree only. Karsten Graul (1): net/smc: fix access to parent of

[PATCH net-next 1/1] net/smc: fix access to parent of an ib device

2020-12-15 Thread Karsten Graul
the pci device specific processing in a new function. Fixes: a3db10efcc4c ("net/smc: Add support for obtaining SMCR device list") Reported-by: syzbot+600fef7c414ee7e2d...@syzkaller.appspotmail.com Signed-off-by: Karsten Graul --- net/smc/smc_ib.c | 36 +++---

[PATCH net-next v7 14/14] net/smc: Add support for obtaining SMCR device list

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 13 +++- net/smc/smc_core.c | 2 +- net/smc/smc_ib.c | 156

[PATCH net-next v7 09/14] net/smc: Add support for obtaining system information

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 18 net/smc/smc_clc.c| 5 net/smc/smc_clc.h| 1 + net/smc/smc_core.c

[PATCH net-next v7 07/14] net/smc: Refactor smc ism v2 capability handling

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Encapsulate the smc ism v2 capability boolean value in a function for better information hiding. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 12 ++-- net/smc/smc_ism.c | 8 +++- net/smc/smc_ism.h | 5 ++--- 3 files changed

[PATCH net-next v7 01/14] net/smc: use helper smc_conn_abort() in listen processing

2020-12-01 Thread Karsten Graul
The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 17 + 1 file changed, 5 insertions(+), 12

[PATCH net-next v7 03/14] net/smc: Add connection counters for links

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Add connection counters to the structure of the link. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 16 ++-- net/smc/smc_core.h | 1 + 2 files changed

[PATCH net-next v7 04/14] net/smc: Add link counters for IB device ports

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 13 + net/smc/smc_ib.h

[PATCH net-next v7 02/14] net/smc: Use active link of the connection

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH net-next v7 12/14] net/smc: Add SMC-D Linkgroup diagnostic support

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 27 net/smc/smc_core.c | 130 +++ net/smc/smc_core.h

[PATCH net-next v7 10/14] net/smc: Introduce SMCR get linkgroup command

2020-12-01 Thread Karsten Graul
: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 15 +++ net/smc/smc_core.c | 85 net/smc/smc_core.h | 1 + net/smc/smc_netlink.c| 5 +++ 4 files changed, 106 insertions(+) diff --git a/include/uapi/linux/smc.h b

[PATCH net-next v7 06/14] net/smc: Add diagnostic information to link structure

2020-12-01 Thread Karsten Graul
the linkgroup list, without this diagnostic information in link structure, another device list mutex holding would be necessary to dereference the device pointer in the link structure which would be impossible when holding a spinlock already. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul

[PATCH net-next v7 08/14] net/smc: Introduce generic netlink interface for diagnostic purposes

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Introduce generic netlink interface infrastructure to expose the diagnostic information regarding smc linkgroups, links and devices. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 11 + net/smc/Makefile | 2 +- net

[PATCH net-next v7 11/14] net/smc: Introduce SMCR get link command

2020-12-01 Thread Karsten Graul
. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 18 net/smc/smc_core.c | 91 ++-- net/smc/smc_core.h | 14 +++ net/smc/smc_diag.c | 13 -- net/smc/smc_netlink.c| 5 +++ 5 files changed

[PATCH net-next v7 13/14] net/smc: Add support for obtaining SMCD device list

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 28 + net/smc/smc_core.h | 28 + net/smc/smc_ism.c| 91

[PATCH net-next v7 05/14] net/smc: Add diagnostic information to smc ib-device

2020-12-01 Thread Karsten Graul
From: Guvenc Gulce During smc ib-device creation, add network device ifindex to smc ib-device structure. Register for netdevice changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_ib.c

[PATCH net-next v7 00/14] net/smc: Add support for generic netlink API

2020-12-01 Thread Karsten Graul
support for obtaining SMCR device list Karsten Graul (1): net/smc: use helper smc_conn_abort() in listen processing include/uapi/linux/smc.h | 126 + net/smc/Makefile | 2 +- net/smc/af_smc.c | 39 ++-- net/smc/smc_clc.c| 5 + net/smc/smc_clc.h| 1

[PATCH net-next v6 07/14] net/smc: Refactor smc ism v2 capability handling

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Encapsulate the smc ism v2 capability boolean value in a function for better information hiding. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 12 ++-- net/smc/smc_ism.c | 8 +++- net/smc/smc_ism.h | 5 ++--- 3 files changed

[PATCH net-next v6 04/14] net/smc: Add link counters for IB device ports

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 13 + net/smc/smc_ib.h

[PATCH net-next v6 02/14] net/smc: Use active link of the connection

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH net-next v6 14/14] net/smc: Add support for obtaining SMCR device list

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 13 +++- net/smc/smc_core.c | 2 +- net/smc/smc_ib.c | 156

[PATCH net-next v6 13/14] net/smc: Add support for obtaining SMCD device list

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 28 + net/smc/smc_core.h | 28 + net/smc/smc_ism.c| 91

[PATCH net-next v6 12/14] net/smc: Add SMC-D Linkgroup diagnostic support

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 27 net/smc/smc_core.c | 130 +++ net/smc/smc_core.h

[PATCH net-next v6 08/14] net/smc: Introduce generic netlink interface for diagnostic purposes

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Introduce generic netlink interface infrastructure to expose the diagnostic information regarding smc linkgroups, links and devices. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 11 ++ net/smc/Makefile | 2 +- net

[PATCH net-next v6 05/14] net/smc: Add diagnostic information to smc ib-device

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce During smc ib-device creation, add network device ifindex to smc ib-device structure. Register for netdevice changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_ib.c

[PATCH net-next v6 03/14] net/smc: Add connection counters for links

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Add connection counters to the structure of the link. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 16 ++-- net/smc/smc_core.h | 1 + 2 files changed

[PATCH net-next v6 11/14] net/smc: Introduce SMCR get link command

2020-11-26 Thread Karsten Graul
. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 18 net/smc/smc_core.c | 91 ++-- net/smc/smc_core.h | 14 +++ net/smc/smc_diag.c | 13 -- net/smc/smc_netlink.c| 5 +++ 5 files changed

[PATCH net-next v6 10/14] net/smc: Introduce SMCR get linkgroup command

2020-11-26 Thread Karsten Graul
: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 15 +++ net/smc/smc_core.c | 85 net/smc/smc_core.h | 1 + net/smc/smc_netlink.c| 5 +++ 4 files changed, 106 insertions(+) diff --git a/include/uapi/linux/smc.h b

[PATCH net-next v6 06/14] net/smc: Add diagnostic information to link structure

2020-11-26 Thread Karsten Graul
the linkgroup list, without this diagnostic information in link structure, another device list mutex holding would be necessary to dereference the device pointer in the link structure which would be impossible when holding a spinlock already. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul

[PATCH net-next v6 09/14] net/smc: Add support for obtaining system information

2020-11-26 Thread Karsten Graul
From: Guvenc Gulce Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 18 net/smc/smc_clc.c| 5 net/smc/smc_clc.h| 1 + net/smc/smc_core.c

[PATCH net-next v6 01/14] net/smc: use helper smc_conn_abort() in listen processing

2020-11-26 Thread Karsten Graul
The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 17 + 1 file changed, 5 insertions(+), 12

[PATCH net-next v6 00/14] net/smc: Add support for generic netlink API

2020-11-26 Thread Karsten Graul
mmand net/smc: Add SMC-D Linkgroup diagnostic support net/smc: Add support for obtaining SMCD device list net/smc: Add support for obtaining SMCR device list Karsten Graul (1): net/smc: use helper smc_conn_abort() in listen processing include/uapi/linux/smc.h | 126 + ne

[PATCH net-next v5 01/14] net/smc: use helper smc_conn_abort() in listen processing

2020-11-24 Thread Karsten Graul
The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 17 + 1 file changed, 5 insertions(+), 12

[PATCH net-next v5 07/14] net/smc: Refactor smc ism v2 capability handling

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Encapsulate the smc ism v2 capability boolean value in a function for better information hiding. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 12 ++-- net/smc/smc_ism.c | 8 +++- net/smc/smc_ism.h | 5 ++--- 3 files changed

[PATCH net-next v5 04/14] net/smc: Add link counters for IB device ports

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 13 + net/smc/smc_ib.h

[PATCH net-next v5 10/14] net/smc: Introduce SMCR get linkgroup command

2020-11-24 Thread Karsten Graul
: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 15 +++ net/smc/smc_core.c | 87 net/smc/smc_core.h | 1 + net/smc/smc_netlink.c| 7 4 files changed, 110 insertions(+) diff --git a/include/uapi/linux/smc.h

[PATCH net-next v5 03/14] net/smc: Add connection counters for links

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Add connection counters to the structure of the link. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 16 ++-- net/smc/smc_core.h | 1 + 2 files changed

[PATCH net-next v5 05/14] net/smc: Add diagnostic information to smc ib-device

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce During smc ib-device creation, add network device ifindex to smc ib-device structure. Register for netdevice changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_ib.c

[PATCH net-next v5 09/14] net/smc: Add support for obtaining system information

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 18 +++ net/smc/smc_clc.c| 5 net/smc/smc_clc.h| 1 + net/smc/smc_core.c

[PATCH net-next v5 11/14] net/smc: Introduce SMCR get link command

2020-11-24 Thread Karsten Graul
. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 18 net/smc/smc_core.c | 92 +--- net/smc/smc_core.h | 14 ++ net/smc/smc_diag.c | 13 -- net/smc/smc_netlink.c| 7 +++ 5 files changed

[PATCH net-next v5 06/14] net/smc: Add diagnostic information to link structure

2020-11-24 Thread Karsten Graul
the linkgroup list, without this diagnostic information in link structure, another device list mutex holding would be necessary to dereference the device pointer in the link structure which would be impossible when holding a spinlock already. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul

[PATCH net-next v5 14/14] net/smc: Add support for obtaining SMCR device list

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 13 +++- net/smc/smc_core.c | 2 +- net/smc/smc_ib.c | 160

[PATCH net-next v5 13/14] net/smc: Add support for obtaining SMCD device list

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 28 net/smc/smc_core.h | 28 net/smc/smc_ism.c| 95

[PATCH net-next v5 12/14] net/smc: Add SMC-D Linkgroup diagnostic support

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 27 net/smc/smc_core.c | 133 +++ net/smc/smc_core.h

[PATCH net-next v5 02/14] net/smc: Use active link of the connection

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH net-next v5 08/14] net/smc: Introduce generic netlink interface for diagnostic purposes

2020-11-24 Thread Karsten Graul
From: Guvenc Gulce Introduce generic netlink interface infrastructure to expose the diagnostic information regarding smc linkgroups, links and devices. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 11 + net/smc/Makefile | 2 +- net

[PATCH net-next v5 00/14] net/smc: Add support for generic netlink API

2020-11-24 Thread Karsten Graul
ostic support net/smc: Add support for obtaining SMCD device list net/smc: Add support for obtaining SMCR device list Karsten Graul (1): net/smc: use helper smc_conn_abort() in listen processing include/uapi/linux/smc.h | 126 net/smc/Makefile | 2 +- net/smc/af_

[PATCH net 0/2] net/smc: fixes 2020-11-18

2020-11-18 Thread Karsten Graul
Please apply the following patch series for smc to netdev's net tree. Patch 1 fixes the matching of link groups because with SMC-Dv2 the vlanid should no longer be part of this matching. Patch 2 removes a sparse message. Karsten Graul (2): net/smc: fix matching of existing link groups

[PATCH net 1/2] net/smc: fix matching of existing link groups

2020-11-18 Thread Karsten Graul
;net/smc: determine accepted ISM devices") Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 3 ++- net/smc/smc_core.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index e9f487c8c6d5..5dd4faaf7d6e 100644 --- a/net/smc/af_smc.c

[PATCH net 2/2] net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid()

2020-11-18 Thread Karsten Graul
existing and validated ndev variable instead of accessing attr->ndev directly. Fixes: 5102eca9039b ("net/smc: Use rdma_read_gid_l2_fields to L2 fields") Signed-off-by: Karsten Graul --- net/smc/smc_ib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/smc/smc_i

Re: [PATCH net-next v4 09/15] net/smc: Introduce SMCR get linkgroup command

2020-11-13 Thread Karsten Graul
On 11/11/2020 23:34, Jakub Kicinski wrote: > On Mon, 9 Nov 2020 16:18:08 +0100 Karsten Graul wrote: >> @@ -295,6 +377,14 @@ static int smc_diag_dump(struct sk_buff *skb, struct >> netlink_callback *cb) >> >> static int smc_diag_dump_ext(struct sk_buff *skb, stru

[PATCH net-next v4 03/15] net/smc: Add connection counters for links

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Add connection counters to the structure of the link. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 16 ++-- net/smc/smc_core.h | 1 + 2 files changed

[PATCH net-next v4 12/15] net/smc: Add support for obtaining SMCD device list

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 2 + include/uapi/linux/smc_diag.h | 20 net/smc/smc_core.h| 8 +++ net/smc

[PATCH net-next v4 10/15] net/smc: Introduce SMCR get link command

2020-11-09 Thread Karsten Graul
. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 8 + net/smc/smc_diag.c| 62 ++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h

[PATCH net-next v4 11/15] net/smc: Add SMC-D Linkgroup diagnostic support

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 7 +++ net/smc/smc_core.c| 7 +++ net/smc/smc_core.h| 2 + net/smc

[PATCH net-next v4 09/15] net/smc: Introduce SMCR get linkgroup command

2020-11-09 Thread Karsten Graul
: Guvenc Gulce Signed-off-by: Karsten Graul --- include/net/smc.h | 2 +- include/uapi/linux/smc.h | 5 ++ include/uapi/linux/smc_diag.h | 43 + net/smc/smc.h | 4 +- net/smc/smc_core.c| 15 ++ net/smc/smc_core.h| 7

[PATCH net-next v4 00/15] net/smc: extend diagnostic netlink interface

2020-11-09 Thread Karsten Graul
: Add support for obtaining SMCD device list net/smc: Add support for obtaining SMCR device list net/smc: Refactor smc ism v2 capability handling net/smc: Add support for obtaining system information Karsten Graul (1): net/smc: use helper smc_conn_abort() in listen processing include/net/

[PATCH net-next v4 14/15] net/smc: Refactor smc ism v2 capability handling

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Encapsulate the smc ism v2 capability boolean value in a function for better information hiding. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 12 ++-- net/smc/smc_ism.c | 8 +++- net/smc/smc_ism.h | 5 ++--- 3 files changed

[PATCH net-next v4 15/15] net/smc: Add support for obtaining system information

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 1 + include/uapi/linux/smc_diag.h | 17 ++ net/smc/smc_clc.c | 5 +++ net/smc

[PATCH net-next v4 06/15] net/smc: Add diagnostic information to link structure

2020-11-09 Thread Karsten Graul
linkgroup list, without this diagnostic information in link structure, another device list mutex holding would be necessary to dereference the device pointer in the link structure which would be impossible when holding a spinlock already. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net

[PATCH net-next v4 05/15] net/smc: Add diagnostic information to smc ib-device

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce During smc ib-device creation, add network device name to smc ib-device structure. Register for netdevice name changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_ib.c

[PATCH net-next v4 07/15] net/smc: Refactor the netlink reply processing routine

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Refactor the netlink reply processing routine so that it provides sub functions for specific parts of the processing. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 218 +++-- 1 file changed, 133

[PATCH net-next v4 01/15] net/smc: use helper smc_conn_abort() in listen processing

2020-11-09 Thread Karsten Graul
The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 17 + 1 file changed, 5 insertions(+), 12

[PATCH net-next v4 13/15] net/smc: Add support for obtaining SMCR device list

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 6 ++ net/smc/smc_core.c| 7 ++ net/smc/smc_core.h| 2 + net/smc/smc_diag.c

[PATCH net-next v4 08/15] net/smc: Add ability to work with extended SMC netlink API

2020-11-09 Thread Karsten Graul
MAGIC_SEQ_V2 and MAGIC_SEQ_V2_ACK are used to signal the usage of the new Netlink API between userspace and kernel. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 7 +++ net/smc/smc_diag.c| 21 + 2 files changed, 20

[PATCH net-next v4 04/15] net/smc: Add link counters for IB device ports

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 13 + net/smc/smc_ib.h

[PATCH net-next v4 02/15] net/smc: Use active link of the connection

2020-11-09 Thread Karsten Graul
From: Guvenc Gulce Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

Re: [PATCH net-next v3 15/15] net/smc: Add support for obtaining system information

2020-11-09 Thread Karsten Graul
On 07/11/2020 18:55, Jakub Kicinski wrote: > On Sat, 7 Nov 2020 13:59:58 +0100 Karsten Graul wrote: >> From: Guvenc Gulce >> >> Add new netlink command to obtain system information >> of the smc module. >> >> Signed-off-by: Guvenc Gulce >> Signe

[PATCH net-next v3 11/15] net/smc: Add SMC-D Linkgroup diagnostic support

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 7 +++ net/smc/smc_core.c| 7 +++ net/smc/smc_core.h| 2 + net/smc

[PATCH net-next v3 05/15] net/smc: Add diagnostic information to smc ib-device

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce During smc ib-device creation, add network device name to smc ib-device structure. Register for netdevice name changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_ib.c

[PATCH net-next v3 12/15] net/smc: Add support for obtaining SMCD device list

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 2 + include/uapi/linux/smc_diag.h | 20 + net/smc/smc_core.h| 27 + net

[PATCH net-next v3 08/15] net/smc: Add ability to work with extended SMC netlink API

2020-11-07 Thread Karsten Graul
MAGIC_SEQ_V2 and MAGIC_SEQ_V2_ACK are used to signal the usage of the new Netlink API between userspace and kernel. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 7 +++ net/smc/smc_diag.c| 21 + 2 files changed, 20

[PATCH net-next v3 03/15] net/smc: Add connection counters for links

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Add connection counters to the structure of the link. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 16 ++-- net/smc/smc_core.h | 1 + 2 files changed

[PATCH net-next v3 14/15] net/smc: Refactor smc ism v2 capability handling

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Encapsulate the smc ism v2 capability boolean value in a function for better information hiding. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 12 ++-- net/smc/smc_ism.c | 8 +++- net/smc/smc_ism.h | 5 ++--- 3 files changed

[PATCH net-next v3 02/15] net/smc: Use active link of the connection

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH net-next v3 10/15] net/smc: Introduce SMCR get link command

2020-11-07 Thread Karsten Graul
. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 8 + net/smc/smc_diag.c| 62 ++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h

[PATCH net-next v3 07/15] net/smc: Refactor the netlink reply processing routine

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Refactor the netlink reply processing routine so that it provides sub functions for specific parts of the processing. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 218 +++-- 1 file changed, 133

[PATCH net-next v3 06/15] net/smc: Add diagnostic information to link structure

2020-11-07 Thread Karsten Graul
linkgroup list, without this diagnostic information in link structure, another device list mutex holding would be necessary to dereference the device pointer in the link structure which would be impossible when holding a spinlock already. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net

[PATCH net-next v3 15/15] net/smc: Add support for obtaining system information

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc.h | 1 + include/uapi/linux/smc_diag.h | 18 +++ net/smc/smc_clc.c | 5 +++ net/smc

[PATCH net-next v3 01/15] net/smc: use helper smc_conn_abort() in listen processing

2020-11-07 Thread Karsten Graul
The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 17 + 1 file changed, 5 insertions(+), 12

[PATCH net-next v3 13/15] net/smc: Add support for obtaining SMCR device list

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 6 ++ net/smc/smc_core.c| 7 ++ net/smc/smc_core.h| 2 + net/smc/smc_diag.c

[PATCH net-next v3 09/15] net/smc: Introduce SMCR get linkgroup command

2020-11-07 Thread Karsten Graul
: Guvenc Gulce Signed-off-by: Karsten Graul --- include/net/smc.h | 2 +- include/uapi/linux/smc.h | 5 ++ include/uapi/linux/smc_diag.h | 43 + net/smc/smc.h | 4 +- net/smc/smc_core.c| 15 ++ net/smc/smc_core.h| 7

[PATCH net-next v3 00/15] net/smc: extend diagnostic netlink interface

2020-11-07 Thread Karsten Graul
SMCR device list net/smc: Refactor smc ism v2 capability handling net/smc: Add support for obtaining system information Karsten Graul (1): net/smc: use helper smc_conn_abort() in listen processing include/net/smc.h | 2 +- include/uapi/linux/smc.h | 8 + include/uapi/

[PATCH net-next v3 04/15] net/smc: Add link counters for IB device ports

2020-11-07 Thread Karsten Graul
From: Guvenc Gulce Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_core.c | 3 +++ net/smc/smc_core.h | 10

Re: [PATCH net-next v2 12/15] net/smc: Add support for obtaining SMCD device list

2020-11-05 Thread Karsten Graul
On 04/11/2020 02:31, Saeed Mahameed wrote: > On Tue, 2020-11-03 at 11:25 +0100, Karsten Graul wrote: >> From: Guvenc Gulce >> >> Deliver SMCD device information via netlink based >> diagnostic interface. >> >> Signed-off-by: Guvenc Gulce >> Signed-o

Re: [net-next v4 7/8] net: smc: convert tasklets to use new tasklet_setup() API

2020-11-05 Thread Karsten Graul
t; Signed-off-by: Romain Perier > Signed-off-by: Allen Pais > --- Acked-by: Karsten Graul

[PATCH net-next v2 07/15] net/smc: Refactor the netlink reply processing routine

2020-11-03 Thread Karsten Graul
From: Guvenc Gulce Refactor the netlink reply processing routine so that it provides sub functions for specific parts of the processing. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 218 +++-- 1 file changed, 133

[PATCH net-next v2 02/15] net/smc: Use active link of the connection

2020-11-03 Thread Karsten Graul
From: Guvenc Gulce Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- net/smc/smc_diag.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH net-next v2 13/15] net/smc: Add support for obtaining SMCR device list

2020-11-03 Thread Karsten Graul
From: Guvenc Gulce Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 6 ++ net/smc/smc_diag.c| 133 ++ net/smc/smc_ib.c

[PATCH net-next v2 01/15] net/smc: use helper smc_conn_abort() in listen processing

2020-11-03 Thread Karsten Graul
The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 17 + 1 file changed, 5 insertions(+), 12

[PATCH net-next v2 08/15] net/smc: Add ability to work with extended SMC netlink API

2020-11-03 Thread Karsten Graul
MAGIC_SEQ_V2 and MAGIC_SEQ_V2_ACK are used to signal the usage of the new Netlink API between userspace and kernel. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul --- include/uapi/linux/smc_diag.h | 7 +++ net/smc/smc_diag.c| 21 + 2 files changed, 20

  1   2   3   4   >