net/smc: Add global configure for handshake limitation by netlink
Although we can control SMC handshake limitation through socket options, which means that applications who need it must modify their code. It's quite troublesome for many existing applications. This patch modifies the global default value of SMC handshake limitation through netlink, providing a way to put constraint on handshake without modifies any code for applications. Suggested-by: Tony Lu <tonylu@linux.alibaba.com> Signed-off-by: D. Wythe <alibuda@linux.alibaba.com> Reviewed-by: Tony Lu <tonylu@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a6a6fe27ba
commit
f9496b7c1b
6 changed files with 79 additions and 0 deletions
|
|
@ -59,6 +59,9 @@ enum {
|
|||
SMC_NETLINK_DUMP_SEID,
|
||||
SMC_NETLINK_ENABLE_SEID,
|
||||
SMC_NETLINK_DISABLE_SEID,
|
||||
SMC_NETLINK_DUMP_HS_LIMITATION,
|
||||
SMC_NETLINK_ENABLE_HS_LIMITATION,
|
||||
SMC_NETLINK_DISABLE_HS_LIMITATION,
|
||||
};
|
||||
|
||||
/* SMC_GENL_FAMILY top level attributes */
|
||||
|
|
@ -285,6 +288,14 @@ enum {
|
|||
SMC_NLA_SEID_TABLE_MAX = __SMC_NLA_SEID_TABLE_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_NETLINK_HS_LIMITATION attributes */
|
||||
enum {
|
||||
SMC_NLA_HS_LIMITATION_UNSPEC,
|
||||
SMC_NLA_HS_LIMITATION_ENABLED, /* u8 */
|
||||
__SMC_NLA_HS_LIMITATION_MAX,
|
||||
SMC_NLA_HS_LIMITATION_MAX = __SMC_NLA_HS_LIMITATION_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC socket options */
|
||||
#define SMC_LIMIT_HS 1 /* constraint on smc handshake */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue