diff options
author | Hans Wippel <hwippel@linux.ibm.com> | 2019-02-21 13:01:00 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-21 10:34:37 -0800 |
commit | 890a2cb4a966a097961fad0747d4f63e09b79da7 (patch) | |
tree | 96c30f50837a16f2e7deb21d2fd48eb9caf35eb8 /net/smc/smc_ib.h | |
parent | 390dde08446ececfaafe63d0db14ceff15f03886 (diff) |
net/smc: rework pnet table
If a device does not have a pnetid, users can set a temporary pnetid for
said device in the pnet table. This patch reworks the pnet table to make
it more flexible. Multiple entries with the same pnetid but differing
devices are now allowed. Additionally, the netlink interface now sends
each mapping from pnetid to device separately to the user while
maintaining the message format existing applications might expect. Also,
the SMC data structure for ib devices already has a pnetid attribute.
So, it is used to store the user defined pnetids. As a result, the pnet
table entries are only used for netdevs.
Signed-off-by: Hans Wippel <hwippel@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_ib.h')
-rw-r--r-- | net/smc/smc_ib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/smc_ib.h b/net/smc/smc_ib.h index bac7fd65a4c0..da60ab9e8d70 100644 --- a/net/smc/smc_ib.h +++ b/net/smc/smc_ib.h @@ -42,6 +42,8 @@ struct smc_ib_device { /* ib-device infos for smc */ /* mac address per port*/ u8 pnetid[SMC_MAX_PORTS][SMC_MAX_PNETID_LEN]; /* pnetid per port */ + bool pnetid_by_user[SMC_MAX_PORTS]; + /* pnetid defined by user? */ u8 initialized : 1; /* ib dev CQ, evthdl done */ struct work_struct port_event_work; unsigned long port_event_mask; |