* [PATCH rdma-next V1 00/10] IB SR-IOV support
@ 2016-03-07 21:08 Eli Cohen
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Hi Doug, Dave
The following series adds support for managing SRIOV IB VFs in a standard
way (rtnetlink, iproute2) through IPoIB ndo entries which translate to
corresponding verbs calls.
In IB networks, 64 bit GUIDs are used as the primary means of identification.
To support that for VFs, we added a set_vf_guid ndo which is used to program
the VF node and port GUID from the PF.
Those verbs are implemented by the mlx5 driver along with some more changes
needed in the driver, IPoIB and the IB core to support IB virtualization.
We've copied netdev only on the 1st patch of the series, as the rest of it just
uses the patch along with the existing ndos in IPoIB plus add things which
are internal to the IB stack.
The series is rebased against Doug's mlx5 branch and Leon's patch that extends
the kernel ib device attr caps field to u64:
https://patchwork.kernel.org/patch/8388931/
Eli
Changes from V0:
1. Remove the option to configure GUIDs through setting VF MAC.
2. Added a subnet_prefix field to struct ib_port_attr and implement for all
hardware drivers.
3. Fixed SA AH creation to use queried subnet prefix
4. Modified conditional on interface_id from memcpy to plain comparison.
5. Removed "IB/core: Use GRH when the path hop-limit > 0" from the series as it
was already accepted.
6. Rebased the series on Doug's mlx5 branch on top of 318d311e8f01 "(origin/mlx5)
iser: Accept arbitrary sg lists mapping if the device supports it"
Eli Cohen (10):
net/core: Add support for configuring VF GUIDs
IB/mlx5: Fix decision on using MAD_IFC
IB/core: Add subnet prefix to port info
IB/core: Support accessing SA in virtualized environment
IB/core: Add interfaces to control VF attributes
IB/ipoib: Add ndo operations for configuring VFs
net/mlx5_core: Add VF param when querying vport counter
net/mlx5_core: Implement modify HCA vport command
IB/mlx5: Implement callbacks for manipulating VFs
IB/ipoib: Allow mcast packets from other VFs
drivers/infiniband/core/device.c | 1 +
drivers/infiniband/core/sa_query.c | 5 +
drivers/infiniband/core/verbs.c | 40 +++++
drivers/infiniband/hw/cxgb3/iwch_provider.c | 7 +
drivers/infiniband/hw/cxgb4/provider.c | 7 +
drivers/infiniband/hw/mlx4/main.c | 1 +
drivers/infiniband/hw/mlx5/Makefile | 2 +-
drivers/infiniband/hw/mlx5/ib_virt.c | 194 ++++++++++++++++++++++++
drivers/infiniband/hw/mlx5/mad.c | 3 +-
drivers/infiniband/hw/mlx5/main.c | 21 ++-
drivers/infiniband/hw/mlx5/mlx5_ib.h | 8 +
drivers/infiniband/hw/mthca/mthca_provider.c | 1 +
drivers/infiniband/hw/nes/nes_verbs.c | 7 +
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 7 +
drivers/infiniband/hw/qib/qib_verbs.c | 7 +
drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 7 +
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 27 +++-
drivers/infiniband/ulp/ipoib/ipoib_main.c | 65 +++++++-
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 6 +
drivers/net/ethernet/mellanox/mlx5/core/vport.c | 72 ++++++++-
include/linux/mlx5/driver.h | 5 +-
include/linux/mlx5/mlx5_ifc.h | 6 +
include/linux/mlx5/vport.h | 7 +-
include/linux/netdevice.h | 3 +
include/rdma/ib_verbs.h | 25 +++
include/uapi/linux/if_link.h | 7 +
net/core/rtnetlink.c | 36 +++++
27 files changed, 561 insertions(+), 16 deletions(-)
create mode 100644 drivers/infiniband/hw/mlx5/ib_virt.c
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 01/10] net/core: Add support for configuring VF GUIDs
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2016-03-07 21:08 ` Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 02/10] IB/mlx5: Fix decision on using MAD_IFC Eli Cohen
` (8 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen, netdev-u79uwXL29TY76Z2rM5mHXA
Add two new NLAs to support configuration of Infiniband node or port
GUIDs. New applications can choose to use this interface to configure
GUIDs with iproute2 with commands such as:
ip link set dev ib0 vf 0 node_guid 00:02:c9:03:00:21:6e:70
ip link set dev ib0 vf 0 port_guid 00:02:c9:03:00:21:6e:78
A new ndo, ndo_sef_vf_guid is introduced to notify the net device of the
request to change the GUID.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes from V0:
Removed the option to configure GUIDs through MAC configuration
include/linux/netdevice.h | 3 +++
include/uapi/linux/if_link.h | 7 +++++++
net/core/rtnetlink.c | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5440b7b705eb..7b4ae218b90b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1147,6 +1147,9 @@ struct net_device_ops {
struct nlattr *port[]);
int (*ndo_get_vf_port)(struct net_device *dev,
int vf, struct sk_buff *skb);
+ int (*ndo_set_vf_guid)(struct net_device *dev,
+ int vf, u64 guid,
+ int guid_type);
int (*ndo_set_vf_rss_query_en)(
struct net_device *dev,
int vf, bool setting);
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index a30b78090594..1d01e8a4e5dd 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -556,6 +556,8 @@ enum {
*/
IFLA_VF_STATS, /* network device statistics */
IFLA_VF_TRUST, /* Trust VF */
+ IFLA_VF_IB_NODE_GUID, /* VF Infiniband node GUID */
+ IFLA_VF_IB_PORT_GUID, /* VF Infiniband port GUID */
__IFLA_VF_MAX,
};
@@ -588,6 +590,11 @@ struct ifla_vf_spoofchk {
__u32 setting;
};
+struct ifla_vf_guid {
+ __u32 vf;
+ __u64 guid;
+};
+
enum {
IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */
IFLA_VF_LINK_STATE_ENABLE, /* link always up */
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index d735e854f916..4b6f3db9f8af 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1387,6 +1387,8 @@ static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
[IFLA_VF_RSS_QUERY_EN] = { .len = sizeof(struct ifla_vf_rss_query_en) },
[IFLA_VF_STATS] = { .type = NLA_NESTED },
[IFLA_VF_TRUST] = { .len = sizeof(struct ifla_vf_trust) },
+ [IFLA_VF_IB_NODE_GUID] = { .len = sizeof(struct ifla_vf_guid) },
+ [IFLA_VF_IB_PORT_GUID] = { .len = sizeof(struct ifla_vf_guid) },
};
static const struct nla_policy ifla_vf_stats_policy[IFLA_VF_STATS_MAX + 1] = {
@@ -1534,6 +1536,22 @@ static int validate_linkmsg(struct net_device *dev, struct nlattr *tb[])
return 0;
}
+static int handle_infiniband_guid(struct net_device *dev, struct ifla_vf_guid *ivt,
+ int guid_type)
+{
+ const struct net_device_ops *ops = dev->netdev_ops;
+
+ return ops->ndo_set_vf_guid(dev, ivt->vf, ivt->guid, guid_type);
+}
+
+static int handle_vf_guid(struct net_device *dev, struct ifla_vf_guid *ivt, int guid_type)
+{
+ if (dev->type != ARPHRD_INFINIBAND)
+ return -EOPNOTSUPP;
+
+ return handle_infiniband_guid(dev, ivt, guid_type);
+}
+
static int do_setvfinfo(struct net_device *dev, struct nlattr **tb)
{
const struct net_device_ops *ops = dev->netdev_ops;
@@ -1636,6 +1654,24 @@ static int do_setvfinfo(struct net_device *dev, struct nlattr **tb)
return err;
}
+ if (tb[IFLA_VF_IB_NODE_GUID]) {
+ struct ifla_vf_guid *ivt = nla_data(tb[IFLA_VF_IB_NODE_GUID]);
+
+ if (!ops->ndo_set_vf_guid)
+ return -EOPNOTSUPP;
+
+ return handle_vf_guid(dev, ivt, IFLA_VF_IB_NODE_GUID);
+ }
+
+ if (tb[IFLA_VF_IB_PORT_GUID]) {
+ struct ifla_vf_guid *ivt = nla_data(tb[IFLA_VF_IB_PORT_GUID]);
+
+ if (!ops->ndo_set_vf_guid)
+ return -EOPNOTSUPP;
+
+ return handle_vf_guid(dev, ivt, IFLA_VF_IB_PORT_GUID);
+ }
+
return err;
}
--
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 02/10] IB/mlx5: Fix decision on using MAD_IFC
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-07 21:08 ` [PATCH rdma-next V1 01/10] net/core: Add support for configuring VF GUIDs Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info Eli Cohen
` (7 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Fix the condition that dictates when MAD_IFC should be used. According
to firmware specifications, MAD_IFC commands must be used only if the
ib_virt capability is off.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/mlx5/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 7e89a547bf34..79ee6997daa2 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -283,7 +283,7 @@ __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num,
static int mlx5_use_mad_ifc(struct mlx5_ib_dev *dev)
{
- return !dev->mdev->issi;
+ return !MLX5_CAP_GEN(dev->mdev, ib_virt);
}
enum {
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-07 21:08 ` [PATCH rdma-next V1 01/10] net/core: Add support for configuring VF GUIDs Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 02/10] IB/mlx5: Fix decision on using MAD_IFC Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
[not found] ` <1457384940-11951-4-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-07 21:08 ` [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment Eli Cohen
` (6 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
The subnet prefix is a part of the port_info MAD returned and should be
available at the ib_port_attr struct. We define it here and implement
for all the hardware drivers. The subnet prefix is required when
creating the address vector to access the SA in networks where GRH must
be used.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/cxgb3/iwch_provider.c | 7 +++++++
drivers/infiniband/hw/cxgb4/provider.c | 7 +++++++
drivers/infiniband/hw/mlx4/main.c | 1 +
drivers/infiniband/hw/mlx5/mad.c | 1 +
drivers/infiniband/hw/mlx5/main.c | 9 +++++++++
drivers/infiniband/hw/mthca/mthca_provider.c | 1 +
drivers/infiniband/hw/nes/nes_verbs.c | 7 +++++++
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 7 +++++++
drivers/infiniband/hw/qib/qib_verbs.c | 7 +++++++
drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 7 +++++++
include/rdma/ib_verbs.h | 1 +
11 files changed, 55 insertions(+)
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index 42a7b8952d13..e801112db599 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -1127,6 +1127,8 @@ static int iwch_query_port(struct ib_device *ibdev,
struct iwch_dev *dev;
struct net_device *netdev;
struct in_device *inetdev;
+ union ib_gid gid;
+ int err;
PDBG("%s ibdev %p\n", __func__, ibdev);
@@ -1171,6 +1173,11 @@ static int iwch_query_port(struct ib_device *ibdev,
props->active_width = 2;
props->active_speed = IB_SPEED_DDR;
props->max_msg_sz = -1;
+ err = ib_query_gid(ibdev, port, 0, &gid, NULL);
+ if (err)
+ return err;
+
+ props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
return 0;
}
diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
index ec04272fbdc2..fc98a4a77db7 100644
--- a/drivers/infiniband/hw/cxgb4/provider.c
+++ b/drivers/infiniband/hw/cxgb4/provider.c
@@ -350,6 +350,8 @@ static int c4iw_query_port(struct ib_device *ibdev, u8 port,
struct c4iw_dev *dev;
struct net_device *netdev;
struct in_device *inetdev;
+ union ib_gid gid;
+ int err;
PDBG("%s ibdev %p\n", __func__, ibdev);
@@ -394,6 +396,11 @@ static int c4iw_query_port(struct ib_device *ibdev, u8 port,
props->active_width = 2;
props->active_speed = IB_SPEED_DDR;
props->max_msg_sz = -1;
+ err = ib_query_gid(ibdev, port, 0, &gid, NULL);
+ if (err)
+ return err;
+
+ props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
return 0;
}
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 1c7ab6cabbb8..e50d13ee3717 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -606,6 +606,7 @@ static int ib_link_query_port(struct ib_device *ibdev, u8 port,
goto out;
+ props->subnet_prefix = be64_to_cpup((__be64 *)(out_mad->data + 8));
props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16));
props->lmc = out_mad->data[34] & 0x7;
props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18));
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c
index 41d8a0036465..2ba01740b3d8 100644
--- a/drivers/infiniband/hw/mlx5/mad.c
+++ b/drivers/infiniband/hw/mlx5/mad.c
@@ -527,6 +527,7 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port,
goto out;
}
+ props->subnet_prefix = be64_to_cpup((__be64 *)(out_mad->data + 8));
props->lid = be16_to_cpup((__be16 *)(out_mad->data + 16));
props->lmc = out_mad->data[34] & 0x7;
props->sm_lid = be16_to_cpup((__be16 *)(out_mad->data + 18));
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 79ee6997daa2..4d0cbea6cbd1 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -672,6 +672,7 @@ static int mlx5_query_hca_port(struct ib_device *ibdev, u8 port,
int err;
u8 ib_link_width_oper;
u8 vl_hw_cap;
+ union ib_gid gid;
rep = kzalloc(sizeof(*rep), GFP_KERNEL);
if (!rep) {
@@ -727,6 +728,14 @@ static int mlx5_query_hca_port(struct ib_device *ibdev, u8 port,
err = translate_max_vl_num(ibdev, vl_hw_cap,
&props->max_vl_num);
+ if (err)
+ goto out;
+
+ err = mlx5_query_hca_vport_gid(mdev, 0, port, 0, 0, &gid);
+ if (err)
+ goto out;
+
+ props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
out:
kfree(rep);
return err;
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 9866c35cc977..699b2a0795ea 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -157,6 +157,7 @@ static int mthca_query_port(struct ib_device *ibdev,
if (err)
goto out;
+ props->subnet_prefix = be64_to_cpup((__be64 *)(out_mad->data + 8));
props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16));
props->lmc = out_mad->data[34] & 0x7;
props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18));
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 5af19b4cde51..af977113b96c 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -475,6 +475,8 @@ static int nes_query_port(struct ib_device *ibdev, u8 port, struct ib_port_attr
{
struct nes_vnic *nesvnic = to_nesvnic(ibdev);
struct net_device *netdev = nesvnic->netdev;
+ union ib_gid gid;
+ int err;
memset(props, 0, sizeof(*props));
@@ -510,6 +512,11 @@ static int nes_query_port(struct ib_device *ibdev, u8 port, struct ib_port_attr
props->active_width = IB_WIDTH_4X;
props->active_speed = IB_SPEED_SDR;
props->max_msg_sz = 0x80000000;
+ err = ib_query_gid(ibdev, port, 0, &gid, NULL);
+ if (err)
+ return err;
+
+ props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
return 0;
}
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 12420e4ecf3d..38a73371f43e 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -209,6 +209,8 @@ int ocrdma_query_port(struct ib_device *ibdev,
enum ib_port_state port_state;
struct ocrdma_dev *dev;
struct net_device *netdev;
+ union ib_gid gid;
+ int err;
dev = get_ocrdma_dev(ibdev);
if (port > 1) {
@@ -244,6 +246,11 @@ int ocrdma_query_port(struct ib_device *ibdev,
&props->active_width);
props->max_msg_sz = 0x80000000;
props->max_vl_num = 4;
+ err = ib_query_gid(ibdev, port, 0, &gid, NULL);
+ if (err)
+ return err;
+
+ props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
return 0;
}
diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c
index baf1e42b6896..4ab7d6617467 100644
--- a/drivers/infiniband/hw/qib/qib_verbs.c
+++ b/drivers/infiniband/hw/qib/qib_verbs.c
@@ -1629,6 +1629,8 @@ static int qib_query_port(struct ib_device *ibdev, u8 port,
struct qib_pportdata *ppd = ppd_from_ibp(ibp);
enum ib_mtu mtu;
u16 lid = ppd->lid;
+ union ib_gid gid;
+ int err;
memset(props, 0, sizeof(*props));
props->lid = lid ? lid : be16_to_cpu(IB_LID_PERMISSIVE);
@@ -1671,6 +1673,11 @@ static int qib_query_port(struct ib_device *ibdev, u8 port,
}
props->active_mtu = mtu;
props->subnet_timeout = ibp->subnet_timeout;
+ err = ib_query_gid(ibdev, port, 0, &gid, NULL);
+ if (err)
+ return err;
+
+ props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
return 0;
}
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index 6cdb4d23f78f..68d36ab1e33b 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -327,6 +327,8 @@ int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
{
struct usnic_ib_dev *us_ibdev = to_usdev(ibdev);
struct ethtool_cmd cmd;
+ union ib_gid gid;
+ int err;
usnic_dbg("\n");
@@ -363,6 +365,11 @@ int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
props->max_msg_sz = us_ibdev->ufdev->mtu;
props->max_vl_num = 1;
mutex_unlock(&us_ibdev->usdev_lock);
+ err = ib_query_gid(ibdev, port, 0, &gid, NULL);
+ if (err)
+ return err;
+
+ props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
return 0;
}
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index d83bc300c2b3..b3646e30e25d 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -509,6 +509,7 @@ struct ib_port_attr {
u8 active_width;
u8 active_speed;
u8 phys_state;
+ u64 subnet_prefix;
};
enum ib_device_modify_flags {
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (2 preceding siblings ...)
2016-03-07 21:08 ` [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
[not found] ` <1457384940-11951-5-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-07 21:08 ` [PATCH rdma-next V1 05/10] IB/core: Add interfaces to control VF attributes Eli Cohen
` (5 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Per the ongoing standardisation process, when virtual HCAs are present
in a network, traffic is routed based on a destination GID. In order to
access the SA we use the well known SA GID.
We also add a GRH required boolean field to the port attributes which is
used to report to the verbs consumer whether this port is connected to a
virtual network. We use this field to realize whether we need to create
an address vector with GRH to access the subnet administrator. We clear
the port attributes struct before calling the hardware driver to make
sure the default remains that GRH is not required.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes from V0:
Use queried subnet prefix when creating AH to access the SM
drivers/infiniband/core/device.c | 1 +
drivers/infiniband/core/sa_query.c | 5 +++++
include/rdma/ib_verbs.h | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 00da80e02154..24926acd4bcd 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -652,6 +652,7 @@ int ib_query_port(struct ib_device *device,
if (port_num < rdma_start_port(device) || port_num > rdma_end_port(device))
return -EINVAL;
+ memset(port_attr, 0, sizeof(*port_attr));
return device->query_port(device, port_num, port_attr);
}
EXPORT_SYMBOL(ib_query_port);
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index f334090bb612..4fb97df2caa5 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -886,6 +886,11 @@ static void update_sm_ah(struct work_struct *work)
ah_attr.dlid = port_attr.sm_lid;
ah_attr.sl = port_attr.sm_sl;
ah_attr.port_num = port->port_num;
+ if (port_attr.grh_required) {
+ ah_attr.ah_flags = IB_AH_GRH;
+ ah_attr.grh.dgid.global.subnet_prefix = cpu_to_be64(port_attr.subnet_prefix);
+ ah_attr.grh.dgid.global.interface_id = cpu_to_be64(IB_SA_WELL_KNOWN_GUID);
+ }
new_ah->ah = ib_create_ah(port->agent->qp->pd, &ah_attr);
if (IS_ERR(new_ah->ah)) {
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index b3646e30e25d..8add3db9a244 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -97,6 +97,10 @@ enum rdma_node_type {
RDMA_NODE_USNIC_UDP,
};
+enum {
+ IB_SA_WELL_KNOWN_GUID = 2,
+};
+
enum rdma_transport_type {
RDMA_TRANSPORT_IB,
RDMA_TRANSPORT_IWARP,
@@ -510,6 +514,7 @@ struct ib_port_attr {
u8 active_speed;
u8 phys_state;
u64 subnet_prefix;
+ bool grh_required;
};
enum ib_device_modify_flags {
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 05/10] IB/core: Add interfaces to control VF attributes
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (3 preceding siblings ...)
2016-03-07 21:08 ` [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 06/10] IB/ipoib: Add ndo operations for configuring VFs Eli Cohen
` (4 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Following the practice exercised for network devices which allow the PF
net device to configure attributes of its virtual functions, we
introduce the following functions to be used by IPoIB which is the
network driver implementation for IB devices.
ib_set_vf_link_state - set the policy for a VF link. More below.
ib_get_vf_config - read configuration information of a VF
ib_get_vf_stats - read VF statistics
ib_set_vf_guid - set the node or port GUID of a VF
Also add an indication in the device cap flags that indicates that this
IB devices is based on a virtual function.
A VF shares the physical port with the PF and other VFs. When setting
the link state we have three options:
1. Auto - in this mode, the virtual port follows the state of the
physical port and becomes active only if the physical port's state is
active. In all other cases it remains in a Down state.
2. Down - sets the state of the virtual port to Down
3. Up - causes the virtual port to transition into Initialize state if
it was not already in this state. A virtualization aware subnet manager
can then bring the state of the port into the Active state.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/core/verbs.c | 40 ++++++++++++++++++++++++++++++++++++++++
include/rdma/ib_verbs.h | 19 +++++++++++++++++++
2 files changed, 59 insertions(+)
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 16f3fb1b9d75..b928c71cda87 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1551,6 +1551,46 @@ int ib_check_mr_status(struct ib_mr *mr, u32 check_mask,
}
EXPORT_SYMBOL(ib_check_mr_status);
+int ib_set_vf_link_state(struct ib_device *device, int vf, u8 port,
+ int state)
+{
+ if (!device->set_vf_link_state)
+ return -ENOSYS;
+
+ return device->set_vf_link_state(device, vf, port, state);
+}
+EXPORT_SYMBOL(ib_set_vf_link_state);
+
+int ib_get_vf_config(struct ib_device *device, int vf, u8 port,
+ struct ifla_vf_info *info)
+{
+ if (!device->get_vf_config)
+ return -ENOSYS;
+
+ return device->get_vf_config(device, vf, port, info);
+}
+EXPORT_SYMBOL(ib_get_vf_config);
+
+int ib_get_vf_stats(struct ib_device *device, int vf, u8 port,
+ struct ifla_vf_stats *stats)
+{
+ if (!device->get_vf_stats)
+ return -ENOSYS;
+
+ return device->get_vf_stats(device, vf, port, stats);
+}
+EXPORT_SYMBOL(ib_get_vf_stats);
+
+int ib_set_vf_guid(struct ib_device *device, int vf, u8 port, u64 guid,
+ int type)
+{
+ if (!device->set_vf_guid)
+ return -ENOSYS;
+
+ return device->set_vf_guid(device, vf, port, guid, type);
+}
+EXPORT_SYMBOL(ib_set_vf_guid);
+
/**
* ib_map_mr_sg() - Map the largest prefix of a dma mapped SG list
* and set it the memory region.
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 8add3db9a244..694d6d4e0dce 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -56,6 +56,7 @@
#include <linux/string.h>
#include <linux/slab.h>
+#include <linux/if_link.h>
#include <linux/atomic.h>
#include <linux/mmu_notifier.h>
#include <asm/uaccess.h>
@@ -217,6 +218,7 @@ enum ib_device_cap_flags {
IB_DEVICE_SIGNATURE_HANDOVER = (1 << 30),
IB_DEVICE_ON_DEMAND_PAGING = (1 << 31),
IB_DEVICE_SG_GAPS_REG = (1ULL << 32),
+ IB_DEVICE_VIRTUAL_FUNCTION = ((u64)1 << 33),
};
enum ib_signature_prot_cap {
@@ -1859,6 +1861,14 @@ struct ib_device {
int (*check_mr_status)(struct ib_mr *mr, u32 check_mask,
struct ib_mr_status *mr_status);
void (*disassociate_ucontext)(struct ib_ucontext *ibcontext);
+ int (*set_vf_link_state)(struct ib_device *device, int vf, u8 port,
+ int state);
+ int (*get_vf_config)(struct ib_device *device, int vf, u8 port,
+ struct ifla_vf_info *ivf);
+ int (*get_vf_stats)(struct ib_device *device, int vf, u8 port,
+ struct ifla_vf_stats *stats);
+ int (*set_vf_guid)(struct ib_device *device, int vf, u8 port, u64 guid,
+ int type);
struct ib_dma_mapping_ops *dma_ops;
@@ -2302,6 +2312,15 @@ int ib_query_gid(struct ib_device *device,
u8 port_num, int index, union ib_gid *gid,
struct ib_gid_attr *attr);
+int ib_set_vf_link_state(struct ib_device *device, int vf, u8 port,
+ int state);
+int ib_get_vf_config(struct ib_device *device, int vf, u8 port,
+ struct ifla_vf_info *info);
+int ib_get_vf_stats(struct ib_device *device, int vf, u8 port,
+ struct ifla_vf_stats *stats);
+int ib_set_vf_guid(struct ib_device *device, int vf, u8 port, u64 guid,
+ int type);
+
int ib_query_pkey(struct ib_device *device,
u8 port_num, u16 index, u16 *pkey);
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 06/10] IB/ipoib: Add ndo operations for configuring VFs
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (4 preceding siblings ...)
2016-03-07 21:08 ` [PATCH rdma-next V1 05/10] IB/core: Add interfaces to control VF attributes Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 07/10] net/mlx5_core: Add VF param when querying vport counter Eli Cohen
` (3 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Add ndo operations to the network driver that enables configuring the
following operations:
ipoib_set_vf_link_state - configure the VF link policy
ipoib_get_vf_config - get link state configuration
ipoib_set_vf_guid - set a VF port or node GUID
ipoib_get_vf_stats - get statistics of a VF
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 65 ++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 25509bbd4a05..80807d6e5c4c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -51,6 +51,7 @@
#include <net/addrconf.h>
#include <linux/inetdevice.h>
#include <rdma/ib_cache.h>
+#include <linux/pci.h>
#define DRV_VERSION "1.0.0"
@@ -1590,11 +1591,67 @@ void ipoib_dev_cleanup(struct net_device *dev)
priv->tx_ring = NULL;
}
+static int ipoib_set_vf_link_state(struct net_device *dev, int vf, int link_state)
+{
+ struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+ return ib_set_vf_link_state(priv->ca, vf, priv->port, link_state);
+}
+
+static int ipoib_get_vf_config(struct net_device *dev, int vf,
+ struct ifla_vf_info *ivf)
+{
+ struct ipoib_dev_priv *priv = netdev_priv(dev);
+ int err;
+
+ err = ib_get_vf_config(priv->ca, vf, priv->port, ivf);
+ if (err)
+ return err;
+
+ ivf->vf = vf;
+
+ return 0;
+}
+
+static int ipoib_set_vf_guid(struct net_device *dev, int vf, u64 guid, int type)
+{
+ struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+ if (type != IFLA_VF_IB_NODE_GUID && type != IFLA_VF_IB_PORT_GUID)
+ return -EINVAL;
+
+ return ib_set_vf_guid(priv->ca, vf, priv->port, guid, type);
+}
+
+static int ipoib_get_vf_stats(struct net_device *dev, int vf,
+ struct ifla_vf_stats *vf_stats)
+{
+ struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+ return ib_get_vf_stats(priv->ca, vf, priv->port, vf_stats);
+}
+
static const struct header_ops ipoib_header_ops = {
.create = ipoib_hard_header,
};
-static const struct net_device_ops ipoib_netdev_ops = {
+static const struct net_device_ops ipoib_netdev_ops_pf = {
+ .ndo_uninit = ipoib_uninit,
+ .ndo_open = ipoib_open,
+ .ndo_stop = ipoib_stop,
+ .ndo_change_mtu = ipoib_change_mtu,
+ .ndo_fix_features = ipoib_fix_features,
+ .ndo_start_xmit = ipoib_start_xmit,
+ .ndo_tx_timeout = ipoib_timeout,
+ .ndo_set_rx_mode = ipoib_set_mcast_list,
+ .ndo_get_iflink = ipoib_get_iflink,
+ .ndo_set_vf_link_state = ipoib_set_vf_link_state,
+ .ndo_get_vf_config = ipoib_get_vf_config,
+ .ndo_get_vf_stats = ipoib_get_vf_stats,
+ .ndo_set_vf_guid = ipoib_set_vf_guid,
+};
+
+static const struct net_device_ops ipoib_netdev_ops_vf = {
.ndo_uninit = ipoib_uninit,
.ndo_open = ipoib_open,
.ndo_stop = ipoib_stop,
@@ -1610,7 +1667,11 @@ void ipoib_setup(struct net_device *dev)
{
struct ipoib_dev_priv *priv = netdev_priv(dev);
- dev->netdev_ops = &ipoib_netdev_ops;
+ if (priv->hca_caps & IB_DEVICE_VIRTUAL_FUNCTION)
+ dev->netdev_ops = &ipoib_netdev_ops_vf;
+ else
+ dev->netdev_ops = &ipoib_netdev_ops_pf;
+
dev->header_ops = &ipoib_header_ops;
ipoib_set_ethtool_ops(dev);
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 07/10] net/mlx5_core: Add VF param when querying vport counter
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (5 preceding siblings ...)
2016-03-07 21:08 ` [PATCH rdma-next V1 06/10] IB/ipoib: Add ndo operations for configuring VFs Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 08/10] net/mlx5_core: Implement modify HCA vport command Eli Cohen
` (2 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Add a vf parameter to mlx5_core_query_vport_counter so we can call it to
query counters of virtual functions. Also update current users of the
API.
PFs may call mlx5_core_query_vport_counter with other_vport set to
indicate that they are querying a virtual function. The virtual
function to be queried is given by the vf parameter. Virtual function
numbering is zero based so the first VF is 0 and so on. When a PF
queries its own function, the other_vport parameter is cleared.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/mlx5/mad.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/vport.c | 5 +++--
include/linux/mlx5/vport.h | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c
index 2ba01740b3d8..a39461977195 100644
--- a/drivers/infiniband/hw/mlx5/mad.c
+++ b/drivers/infiniband/hw/mlx5/mad.c
@@ -208,7 +208,7 @@ static int process_pma_cmd(struct ib_device *ibdev, u8 port_num,
if (!out_cnt)
return IB_MAD_RESULT_FAILURE;
- err = mlx5_core_query_vport_counter(dev->mdev, 0,
+ err = mlx5_core_query_vport_counter(dev->mdev, 0, 0,
port_num, out_cnt, sz);
if (!err)
pma_cnt_ext_assign(pma_cnt_ext, out_cnt);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
index 90ab09e375b8..2b836d0b4738 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
@@ -852,7 +852,8 @@ int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *mdev)
EXPORT_SYMBOL_GPL(mlx5_nic_vport_disable_roce);
int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
- u8 port_num, void *out, size_t out_sz)
+ int vf, u8 port_num, void *out,
+ size_t out_sz)
{
int in_sz = MLX5_ST_SZ_BYTES(query_vport_counter_in);
int is_group_manager;
@@ -871,7 +872,7 @@ int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
if (other_vport) {
if (is_group_manager) {
MLX5_SET(query_vport_counter_in, in, other_vport, 1);
- MLX5_SET(query_vport_counter_in, in, vport_number, 0);
+ MLX5_SET(query_vport_counter_in, in, vport_number, vf + 1);
} else {
err = -EPERM;
goto free;
diff --git a/include/linux/mlx5/vport.h b/include/linux/mlx5/vport.h
index a9f2bcc98cab..aafb3e48b5f8 100644
--- a/include/linux/mlx5/vport.h
+++ b/include/linux/mlx5/vport.h
@@ -93,6 +93,7 @@ int mlx5_modify_nic_vport_vlans(struct mlx5_core_dev *dev,
int mlx5_nic_vport_enable_roce(struct mlx5_core_dev *mdev);
int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *mdev);
int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
- u8 port_num, void *out, size_t out_sz);
+ int vf, u8 port_num, void *out,
+ size_t out_sz);
#endif /* __MLX5_VPORT_H__ */
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 08/10] net/mlx5_core: Implement modify HCA vport command
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (6 preceding siblings ...)
2016-03-07 21:08 ` [PATCH rdma-next V1 07/10] net/mlx5_core: Add VF param when querying vport counter Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 09/10] IB/mlx5: Implement callbacks for manipulating VFs Eli Cohen
2016-03-07 21:09 ` [PATCH rdma-next V1 10/10] IB/ipoib: Allow mcast packets from other VFs Eli Cohen
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Implement the modify HCA vport commands used to modify the parameters of
virtual HCA's ports.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 6 +++
drivers/net/ethernet/mellanox/mlx5/core/vport.c | 67 +++++++++++++++++++++++++
include/linux/mlx5/vport.h | 4 ++
3 files changed, 77 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index 037fc4cdf5af..ebb4036b98e5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -407,6 +407,12 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
const char *mlx5_command_str(int command)
{
switch (command) {
+ case MLX5_CMD_OP_QUERY_HCA_VPORT_CONTEXT:
+ return "QUERY_HCA_VPORT_CONTEXT";
+
+ case MLX5_CMD_OP_MODIFY_HCA_VPORT_CONTEXT:
+ return "MODIFY_HCA_VPORT_CONTEXT";
+
case MLX5_CMD_OP_QUERY_HCA_CAP:
return "QUERY_HCA_CAP";
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
index 2b836d0b4738..bd518405859e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
@@ -891,3 +891,70 @@ free:
return err;
}
EXPORT_SYMBOL_GPL(mlx5_core_query_vport_counter);
+
+int mlx5_core_modify_hca_vport_context(struct mlx5_core_dev *dev,
+ u8 other_vport, u8 port_num,
+ int vf,
+ struct mlx5_hca_vport_context *req)
+{
+ int in_sz = MLX5_ST_SZ_BYTES(modify_hca_vport_context_in);
+ u8 out[MLX5_ST_SZ_BYTES(modify_hca_vport_context_out)];
+ int is_group_manager;
+ void *in;
+ int err;
+ void *ctx;
+
+ mlx5_core_dbg(dev, "vf %d\n", vf);
+ is_group_manager = MLX5_CAP_GEN(dev, vport_group_manager);
+ in = kzalloc(in_sz, GFP_KERNEL);
+ if (!in)
+ return -ENOMEM;
+
+ memset(out, 0, sizeof(out));
+ MLX5_SET(modify_hca_vport_context_in, in, opcode, MLX5_CMD_OP_MODIFY_HCA_VPORT_CONTEXT);
+ if (other_vport) {
+ if (is_group_manager) {
+ MLX5_SET(modify_hca_vport_context_in, in, other_vport, 1);
+ MLX5_SET(modify_hca_vport_context_in, in, vport_number, vf);
+ } else {
+ err = -EPERM;
+ goto ex;
+ }
+ }
+
+ if (MLX5_CAP_GEN(dev, num_ports) > 1)
+ MLX5_SET(modify_hca_vport_context_in, in, port_num, port_num);
+
+ ctx = MLX5_ADDR_OF(modify_hca_vport_context_in, in, hca_vport_context);
+ MLX5_SET(hca_vport_context, ctx, field_select, req->field_select);
+ MLX5_SET(hca_vport_context, ctx, sm_virt_aware, req->sm_virt_aware);
+ MLX5_SET(hca_vport_context, ctx, has_smi, req->has_smi);
+ MLX5_SET(hca_vport_context, ctx, has_raw, req->has_raw);
+ MLX5_SET(hca_vport_context, ctx, vport_state_policy, req->policy);
+ MLX5_SET(hca_vport_context, ctx, port_physical_state, req->phys_state);
+ MLX5_SET(hca_vport_context, ctx, vport_state, req->vport_state);
+ MLX5_SET64(hca_vport_context, ctx, port_guid, req->port_guid);
+ MLX5_SET64(hca_vport_context, ctx, node_guid, req->node_guid);
+ MLX5_SET(hca_vport_context, ctx, cap_mask1, req->cap_mask1);
+ MLX5_SET(hca_vport_context, ctx, cap_mask1_field_select, req->cap_mask1_perm);
+ MLX5_SET(hca_vport_context, ctx, cap_mask2, req->cap_mask2);
+ MLX5_SET(hca_vport_context, ctx, cap_mask2_field_select, req->cap_mask2_perm);
+ MLX5_SET(hca_vport_context, ctx, lid, req->lid);
+ MLX5_SET(hca_vport_context, ctx, init_type_reply, req->init_type_reply);
+ MLX5_SET(hca_vport_context, ctx, lmc, req->lmc);
+ MLX5_SET(hca_vport_context, ctx, subnet_timeout, req->subnet_timeout);
+ MLX5_SET(hca_vport_context, ctx, sm_lid, req->sm_lid);
+ MLX5_SET(hca_vport_context, ctx, sm_sl, req->sm_sl);
+ MLX5_SET(hca_vport_context, ctx, qkey_violation_counter, req->qkey_violation_counter);
+ MLX5_SET(hca_vport_context, ctx, pkey_violation_counter, req->pkey_violation_counter);
+ err = mlx5_cmd_exec(dev, in, in_sz, out, sizeof(out));
+ if (err)
+ goto ex;
+
+ err = mlx5_cmd_status_to_err_v2(out);
+
+ex:
+ kfree(in);
+ return err;
+}
+EXPORT_SYMBOL_GPL(mlx5_core_modify_hca_vport_context);
diff --git a/include/linux/mlx5/vport.h b/include/linux/mlx5/vport.h
index aafb3e48b5f8..bd93e6323603 100644
--- a/include/linux/mlx5/vport.h
+++ b/include/linux/mlx5/vport.h
@@ -95,5 +95,9 @@ int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *mdev);
int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
int vf, u8 port_num, void *out,
size_t out_sz);
+int mlx5_core_modify_hca_vport_context(struct mlx5_core_dev *dev,
+ u8 other_vport, u8 port_num,
+ int vf,
+ struct mlx5_hca_vport_context *req);
#endif /* __MLX5_VPORT_H__ */
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 09/10] IB/mlx5: Implement callbacks for manipulating VFs
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (7 preceding siblings ...)
2016-03-07 21:08 ` [PATCH rdma-next V1 08/10] net/mlx5_core: Implement modify HCA vport command Eli Cohen
@ 2016-03-07 21:08 ` Eli Cohen
2016-03-07 21:09 ` [PATCH rdma-next V1 10/10] IB/ipoib: Allow mcast packets from other VFs Eli Cohen
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:08 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
Implement the IB defined callbacks used to manipulate the policy for the
link state, set GUIDs or get statistics information. This functionality
is added into a new file that will be used to add any SRIOV related
functionality to the mlx5 IB layer.
The following callbacks have been added:
mlx5_ib_get_vf_config
mlx5_ib_set_vf_link_state
mlx5_ib_get_vf_stats
mlx5_ib_set_vf_guid
In addition, publish whether this device is based on a virtual function.
In mlx5 supported devices, virtual functions are implemented as vHCAs.
vHCAs have their own QP number space so it is possible that two vHCAs
will use a QP with the same number at the same time.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/mlx5/Makefile | 2 +-
drivers/infiniband/hw/mlx5/ib_virt.c | 194 +++++++++++++++++++++++++++++++++++
drivers/infiniband/hw/mlx5/main.c | 10 ++
drivers/infiniband/hw/mlx5/mlx5_ib.h | 8 ++
include/linux/mlx5/driver.h | 5 +-
include/linux/mlx5/mlx5_ifc.h | 6 ++
6 files changed, 223 insertions(+), 2 deletions(-)
create mode 100644 drivers/infiniband/hw/mlx5/ib_virt.c
diff --git a/drivers/infiniband/hw/mlx5/Makefile b/drivers/infiniband/hw/mlx5/Makefile
index 4e851889355a..7493a83acd28 100644
--- a/drivers/infiniband/hw/mlx5/Makefile
+++ b/drivers/infiniband/hw/mlx5/Makefile
@@ -1,4 +1,4 @@
obj-$(CONFIG_MLX5_INFINIBAND) += mlx5_ib.o
-mlx5_ib-y := main.o cq.o doorbell.o qp.o mem.o srq.o mr.o ah.o mad.o gsi.o
+mlx5_ib-y := main.o cq.o doorbell.o qp.o mem.o srq.o mr.o ah.o mad.o gsi.o ib_virt.o
mlx5_ib-$(CONFIG_INFINIBAND_ON_DEMAND_PAGING) += odp.o
diff --git a/drivers/infiniband/hw/mlx5/ib_virt.c b/drivers/infiniband/hw/mlx5/ib_virt.c
new file mode 100644
index 000000000000..c1b9de800fe5
--- /dev/null
+++ b/drivers/infiniband/hw/mlx5/ib_virt.c
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2016, Mellanox Technologies. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <linux/module.h>
+#include <linux/mlx5/vport.h>
+#include "mlx5_ib.h"
+
+static inline u32 mlx_to_net_policy(enum port_state_policy mlx_policy)
+{
+ switch (mlx_policy) {
+ case MLX5_POLICY_DOWN:
+ return IFLA_VF_LINK_STATE_DISABLE;
+ case MLX5_POLICY_UP:
+ return IFLA_VF_LINK_STATE_ENABLE;
+ case MLX5_POLICY_FOLLOW:
+ return IFLA_VF_LINK_STATE_AUTO;
+ default:
+ return __IFLA_VF_LINK_STATE_MAX;
+ }
+}
+
+int mlx5_ib_get_vf_config(struct ib_device *device, int vf, u8 port,
+ struct ifla_vf_info *info)
+{
+ struct mlx5_ib_dev *dev = to_mdev(device);
+ struct mlx5_core_dev *mdev = dev->mdev;
+ struct mlx5_hca_vport_context *rep;
+ int err;
+
+ rep = kzalloc(sizeof(*rep), GFP_KERNEL);
+ if (!rep)
+ return -ENOMEM;
+
+ err = mlx5_query_hca_vport_context(mdev, 1, 1, vf + 1, rep);
+ if (err) {
+ mlx5_ib_warn(dev, "failed to query port policy for vf %d (%d)\n",
+ vf, err);
+ goto free;
+ }
+ memset(info, 0, sizeof(*info));
+ info->linkstate = mlx_to_net_policy(rep->policy);
+ if (info->linkstate == __IFLA_VF_LINK_STATE_MAX)
+ err = -EINVAL;
+
+free:
+ kfree(rep);
+ return err;
+}
+
+static inline enum port_state_policy net_to_mlx_policy(int policy)
+{
+ switch (policy) {
+ case IFLA_VF_LINK_STATE_DISABLE:
+ return MLX5_POLICY_DOWN;
+ case IFLA_VF_LINK_STATE_ENABLE:
+ return MLX5_POLICY_UP;
+ case IFLA_VF_LINK_STATE_AUTO:
+ return MLX5_POLICY_FOLLOW;
+ default:
+ return MLX5_POLICY_INVALID;
+ }
+}
+
+int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
+ u8 port, int state)
+{
+ struct mlx5_ib_dev *dev = to_mdev(device);
+ struct mlx5_core_dev *mdev = dev->mdev;
+ struct mlx5_hca_vport_context *in;
+ int err;
+
+ in = kzalloc(sizeof(*in), GFP_KERNEL);
+ if (!in)
+ return -ENOMEM;
+
+ in->policy = net_to_mlx_policy(state);
+ if (in->policy == MLX5_POLICY_INVALID) {
+ err = -EINVAL;
+ goto out;
+ }
+ in->field_select = MLX5_HCA_VPORT_SEL_STATE_POLICY;
+ err = mlx5_core_modify_hca_vport_context(mdev, 1, 1, vf + 1, in);
+
+out:
+ kfree(in);
+ return err;
+}
+
+int mlx5_ib_get_vf_stats(struct ib_device *device, int vf,
+ u8 port, struct ifla_vf_stats *stats)
+{
+ int out_sz = MLX5_ST_SZ_BYTES(query_vport_counter_out);
+ struct mlx5_core_dev *mdev;
+ struct mlx5_ib_dev *dev;
+ void *out;
+ int err;
+
+ dev = to_mdev(device);
+ mdev = dev->mdev;
+
+ out = kzalloc(out_sz, GFP_KERNEL);
+ if (!out)
+ return -ENOMEM;
+
+ err = mlx5_core_query_vport_counter(mdev, true, vf, port, out, out_sz);
+ if (err)
+ goto ex;
+
+ stats->rx_packets = MLX5_GET64_PR(query_vport_counter_out, out, received_ib_unicast.packets);
+ stats->tx_packets = MLX5_GET64_PR(query_vport_counter_out, out, transmitted_ib_unicast.packets);
+ stats->rx_bytes = MLX5_GET64_PR(query_vport_counter_out, out, received_ib_unicast.octets);
+ stats->tx_bytes = MLX5_GET64_PR(query_vport_counter_out, out, transmitted_ib_unicast.octets);
+ stats->multicast = MLX5_GET64_PR(query_vport_counter_out, out, received_ib_multicast.packets);
+
+ex:
+ kfree(out);
+ return err;
+}
+
+static int set_vf_node_guid(struct ib_device *device, int vf, u8 port, u64 guid)
+{
+ struct mlx5_ib_dev *dev = to_mdev(device);
+ struct mlx5_core_dev *mdev = dev->mdev;
+ struct mlx5_hca_vport_context *in;
+ int err;
+
+ in = kzalloc(sizeof(*in), GFP_KERNEL);
+ if (!in)
+ return -ENOMEM;
+
+ in->field_select = MLX5_HCA_VPORT_SEL_NODE_GUID;
+ in->node_guid = guid;
+ err = mlx5_core_modify_hca_vport_context(mdev, 1, 1, vf + 1, in);
+ kfree(in);
+ return err;
+}
+
+static int set_vf_port_guid(struct ib_device *device, int vf, u8 port, u64 guid)
+{
+ struct mlx5_ib_dev *dev = to_mdev(device);
+ struct mlx5_core_dev *mdev = dev->mdev;
+ struct mlx5_hca_vport_context *in;
+ int err;
+
+ in = kzalloc(sizeof(*in), GFP_KERNEL);
+ if (!in)
+ return -ENOMEM;
+
+ in->field_select = MLX5_HCA_VPORT_SEL_PORT_GUID;
+ in->port_guid = guid;
+ err = mlx5_core_modify_hca_vport_context(mdev, 1, 1, vf + 1, in);
+ kfree(in);
+ return err;
+}
+
+int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port,
+ u64 guid, int type)
+{
+ if (type == IFLA_VF_IB_NODE_GUID)
+ return set_vf_node_guid(device, vf, port, guid);
+ else if (type == IFLA_VF_IB_PORT_GUID)
+ return set_vf_port_guid(device, vf, port, guid);
+
+ return -EINVAL;
+}
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 4d0cbea6cbd1..bc4bc1340871 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -562,6 +562,9 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
if (MLX5_CAP_GEN(mdev, cd))
props->device_cap_flags |= IB_DEVICE_CROSS_CHANNEL;
+ if (!mlx5_core_is_pf(mdev))
+ props->device_cap_flags |= IB_DEVICE_VIRTUAL_FUNCTION;
+
return 0;
}
@@ -700,6 +703,7 @@ static int mlx5_query_hca_port(struct ib_device *ibdev, u8 port,
props->qkey_viol_cntr = rep->qkey_violation_counter;
props->subnet_timeout = rep->subnet_timeout;
props->init_type_reply = rep->init_type_reply;
+ props->grh_required = rep->grh_required;
err = mlx5_query_port_link_width_oper(mdev, &ib_link_width_oper, port);
if (err)
@@ -2316,6 +2320,12 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
dev->ib_dev.map_mr_sg = mlx5_ib_map_mr_sg;
dev->ib_dev.check_mr_status = mlx5_ib_check_mr_status;
dev->ib_dev.get_port_immutable = mlx5_port_immutable;
+ if (mlx5_core_is_pf(mdev)) {
+ dev->ib_dev.get_vf_config = mlx5_ib_get_vf_config;
+ dev->ib_dev.set_vf_link_state = mlx5_ib_set_vf_link_state;
+ dev->ib_dev.get_vf_stats = mlx5_ib_get_vf_stats;
+ dev->ib_dev.set_vf_guid = mlx5_ib_set_vf_guid;
+ }
mlx5_ib_internal_fill_odp_caps(dev);
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index 60b89629f091..bbd88dfe8229 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -776,6 +776,14 @@ void mlx5_ib_qp_disable_pagefaults(struct mlx5_ib_qp *qp);
void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp);
void mlx5_ib_invalidate_range(struct ib_umem *umem, unsigned long start,
unsigned long end);
+int mlx5_ib_get_vf_config(struct ib_device *device, int vf,
+ u8 port, struct ifla_vf_info *info);
+int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
+ u8 port, int state);
+int mlx5_ib_get_vf_stats(struct ib_device *device, int vf,
+ u8 port, struct ifla_vf_stats *stats);
+int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port,
+ u64 guid, int type);
#else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
static inline void mlx5_ib_internal_fill_odp_caps(struct mlx5_ib_dev *dev)
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 9108904a6a56..c69e6b21723e 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -613,7 +613,10 @@ struct mlx5_pas {
};
enum port_state_policy {
- MLX5_AAA_000
+ MLX5_POLICY_DOWN = 0,
+ MLX5_POLICY_UP = 1,
+ MLX5_POLICY_FOLLOW = 2,
+ MLX5_POLICY_INVALID = 0xffffffff
};
enum phy_port_state {
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 3044cfa683f1..f0a393dccea9 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -3666,6 +3666,12 @@ struct mlx5_ifc_query_hca_vport_pkey_in_bits {
u8 pkey_index[0x10];
};
+enum {
+ MLX5_HCA_VPORT_SEL_PORT_GUID = 1 << 0,
+ MLX5_HCA_VPORT_SEL_NODE_GUID = 1 << 1,
+ MLX5_HCA_VPORT_SEL_STATE_POLICY = 1 << 2,
+};
+
struct mlx5_ifc_query_hca_vport_gid_out_bits {
u8 status[0x8];
u8 reserved_at_8[0x18];
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH rdma-next V1 10/10] IB/ipoib: Allow mcast packets from other VFs
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (8 preceding siblings ...)
2016-03-07 21:08 ` [PATCH rdma-next V1 09/10] IB/mlx5: Implement callbacks for manipulating VFs Eli Cohen
@ 2016-03-07 21:09 ` Eli Cohen
9 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:09 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w,
Eli Cohen
With SRIOV enabled, two VFs on the same HCA which have the same port LID
and may have the same QP number. To enable receiving multicasts from
such VFs, further qualify the check: ignore the receive only if, in
addition, the packet source gid equals the receiving VF's source gid.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes from V0:
Modify conditional on interface_id to be more effective
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index fa9c42ff1fb0..e205265bb2a4 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -180,6 +180,7 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
struct sk_buff *skb;
u64 mapping[IPOIB_UD_RX_SG];
union ib_gid *dgid;
+ union ib_gid *sgid;
ipoib_dbg_data(priv, "recv completion: id %d, status: %d\n",
wr_id, wc->status);
@@ -203,13 +204,6 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
return;
}
- /*
- * Drop packets that this interface sent, ie multicast packets
- * that the HCA has replicated.
- */
- if (wc->slid == priv->local_lid && wc->src_qp == priv->qp->qp_num)
- goto repost;
-
memcpy(mapping, priv->rx_ring[wr_id].mapping,
IPOIB_UD_RX_SG * sizeof *mapping);
@@ -239,6 +233,25 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
else
skb->pkt_type = PACKET_MULTICAST;
+ sgid = &((struct ib_grh *)skb->data)->sgid;
+
+ /*
+ * Drop packets that this interface sent, ie multicast packets
+ * that the HCA has replicated.
+ */
+ if (wc->slid == priv->local_lid && wc->src_qp == priv->qp->qp_num) {
+ int need_repost = 1;
+
+ if ((wc->wc_flags & IB_WC_GRH) &&
+ sgid->global.interface_id != priv->local_gid.global.interface_id)
+ need_repost = 0;
+
+ if (need_repost) {
+ dev_kfree_skb_any(skb);
+ goto repost;
+ }
+ }
+
skb_pull(skb, IB_GRH_BYTES);
skb->protocol = ((struct ipoib_header *) skb->data)->proto;
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info
[not found] ` <1457384940-11951-4-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2016-03-07 21:43 ` Jason Gunthorpe
[not found] ` <20160307214313.GA6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Jason Gunthorpe @ 2016-03-07 21:43 UTC (permalink / raw)
To: Eli Cohen
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w
On Mon, Mar 07, 2016 at 11:08:53PM +0200, Eli Cohen wrote:
> + err = ib_query_gid(ibdev, port, 0, &gid, NULL);
> + if (err)
> + return err;
> +
> + props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
Why not put this common pattern in ibv_query_port?
device->query_port(ibdev, port, ..);
if (props->subnet_prefix == 0) {
err = ib_query_gid(ibdev, port, 0, &gid, NULL);
if (err)
return err;
props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
}
> +++ b/include/rdma/ib_verbs.h
> @@ -509,6 +509,7 @@ struct ib_port_attr {
> u8 active_width;
> u8 active_speed;
> u8 phys_state;
> + u64 subnet_prefix;
> };
Can we put that at the start for better alignment?
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info
[not found] ` <20160307214313.GA6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-03-07 21:56 ` Eli Cohen
[not found] ` <20160307215608.GA33629-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 21:56 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w
On Mon, Mar 07, 2016 at 02:43:13PM -0700, Jason Gunthorpe wrote:
> On Mon, Mar 07, 2016 at 11:08:53PM +0200, Eli Cohen wrote:
> > + err = ib_query_gid(ibdev, port, 0, &gid, NULL);
> > + if (err)
> > + return err;
> > +
> > + props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
>
> Why not put this common pattern in ibv_query_port?
>
> device->query_port(ibdev, port, ..);
> if (props->subnet_prefix == 0) {
Why do you need this conditional?
> err = ib_query_gid(ibdev, port, 0, &gid, NULL);
> if (err)
> return err;
>
> props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
> }
>
> > +++ b/include/rdma/ib_verbs.h
> > @@ -509,6 +509,7 @@ struct ib_port_attr {
> > u8 active_width;
> > u8 active_speed;
> > u8 phys_state;
> > + u64 subnet_prefix;
> > };
>
> Can we put that at the start for better alignment?
>
Sure, makes sense.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <1457384940-11951-5-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2016-03-07 22:04 ` Jason Gunthorpe
[not found] ` <20160307220434.GB6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Jason Gunthorpe @ 2016-03-07 22:04 UTC (permalink / raw)
To: Eli Cohen
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w
On Mon, Mar 07, 2016 at 11:08:54PM +0200, Eli Cohen wrote:
> +enum {
> + IB_SA_WELL_KNOWN_GUID = 2,
> +};
Where did this come from?
It is wrong to have a EUI-64 like this that has a 0 OUI.
It is wrong to have a 'well known GUID' that is by definition not
universal without setting the local bit (IBA spec even says this)
The well known guid should still conform to IEEE rules for creating
EUI-64s.
Note, that the IBA is a little confused because it tries to follow
IPv6 rules in some places not realizing that IPv6 uses an EUI-64 with
the U/L bit inverted.
IMHO, new constants should strictly follow the IEEE EUI-64 rules and
not try and confuse matters futher. The unused, incorrect, IBA
definition of ::1 should be ignored.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info
[not found] ` <20160307215608.GA33629-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
@ 2016-03-07 22:05 ` Jason Gunthorpe
[not found] ` <20160307220558.GC6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Jason Gunthorpe @ 2016-03-07 22:05 UTC (permalink / raw)
To: Eli Cohen
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w
On Mon, Mar 07, 2016 at 11:56:08PM +0200, Eli Cohen wrote:
> On Mon, Mar 07, 2016 at 02:43:13PM -0700, Jason Gunthorpe wrote:
> > On Mon, Mar 07, 2016 at 11:08:53PM +0200, Eli Cohen wrote:
> > > + err = ib_query_gid(ibdev, port, 0, &gid, NULL);
> > > + if (err)
> > > + return err;
> > > +
> > > + props->subnet_prefix = be64_to_cpu(gid.global.subnet_prefix);
> >
> > Why not put this common pattern in ibv_query_port?
> >
> > device->query_port(ibdev, port, ..);
> > if (props->subnet_prefix == 0) {
>
> Why do you need this conditional?
If the driver fills it in (like mlx seems to be able to do cheaply) we
don't need the over head of calling another callback?
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info
[not found] ` <20160307220558.GC6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-03-07 22:10 ` Eli Cohen
0 siblings, 0 replies; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 22:10 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w
On Mon, Mar 07, 2016 at 03:05:58PM -0700, Jason Gunthorpe wrote:
> > >
> > > device->query_port(ibdev, port, ..);
> > > if (props->subnet_prefix == 0) {
> >
> > Why do you need this conditional?
>
> If the driver fills it in (like mlx seems to be able to do cheaply) we
> don't need the over head of calling another callback?
>
OK, will modify accrodingly.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <20160307220434.GB6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-03-07 22:29 ` Eli Cohen
[not found] ` <20160307222908.GC33629-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Eli Cohen @ 2016-03-07 22:29 UTC (permalink / raw)
To: Jason Gunthorpe, eitan-VPRAkNaXOzVWk0Htik3J/w
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, liranl-VPRAkNaXOzVWk0Htik3J/w
On Mon, Mar 07, 2016 at 03:04:34PM -0700, Jason Gunthorpe wrote:
> On Mon, Mar 07, 2016 at 11:08:54PM +0200, Eli Cohen wrote:
>
> > +enum {
> > + IB_SA_WELL_KNOWN_GUID = 2,
> > +};
>
> Where did this come from?
It comes from the virtualization annex which can be found in the ibta
web site:
SM GID - A well-known GID that is associated with the SM, comprising
the concatenation of the Subnet prefix and the GUID 0x2. The SM GID is
never present in any GID Table. If SubnetPrefix is modified by the SM
the SM GID is updated implicitly.
>
> It is wrong to have a EUI-64 like this that has a 0 OUI.
>
> It is wrong to have a 'well known GUID' that is by definition not
> universal without setting the local bit (IBA spec even says this)
>
> The well known guid should still conform to IEEE rules for creating
> EUI-64s.
>
> Note, that the IBA is a little confused because it tries to follow
> IPv6 rules in some places not realizing that IPv6 uses an EUI-64 with
> the U/L bit inverted.
>
> IMHO, new constants should strictly follow the IEEE EUI-64 rules and
> not try and confuse matters futher. The unused, incorrect, IBA
> definition of ::1 should be ignored.
>
I will let Eitan and Liran comment on this.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <20160307222908.GC33629-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
@ 2016-03-08 17:54 ` Jason Gunthorpe
[not found] ` <20160308175411.GC10805-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Jason Gunthorpe @ 2016-03-08 17:54 UTC (permalink / raw)
To: Eli Cohen
Cc: liranl-VPRAkNaXOzVWk0Htik3J/w, eitan-VPRAkNaXOzVWk0Htik3J/w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Tue, Mar 08, 2016 at 12:29:08AM +0200, Eli Cohen wrote:
> On Mon, Mar 07, 2016 at 03:04:34PM -0700, Jason Gunthorpe wrote:
> > On Mon, Mar 07, 2016 at 11:08:54PM +0200, Eli Cohen wrote:
> >
> > > +enum {
> > > + IB_SA_WELL_KNOWN_GUID = 2,
> > > +};
> >
> > Where did this come from?
> It comes from the virtualization annex which can be found in the ibta
> web site:
> SM GID - A well-known GID that is associated with the SM, comprising
> the concatenation of the Subnet prefix and the GUID 0x2. The SM GID is
> never present in any GID Table. If SubnetPrefix is modified by the SM
> the SM GID is updated implicitly.
IBTA should fix this before it gets too far.
> >
> > It is wrong to have a EUI-64 like this that has a 0 OUI.
> >
> > It is wrong to have a 'well known GUID' that is by definition not
> > universal without setting the local bit (IBA spec even says this)
> >
> > The well known guid should still conform to IEEE rules for creating
> > EUI-64s.
> >
> > Note, that the IBA is a little confused because it tries to follow
> > IPv6 rules in some places not realizing that IPv6 uses an EUI-64 with
> > the U/L bit inverted.
> >
> > IMHO, new constants should strictly follow the IEEE EUI-64 rules and
> > not try and confuse matters futher. The unused, incorrect, IBA
> > definition of ::1 should be ignored.
> >
>
> I will let Eitan and Liran comment on this.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <20160308175411.GC10805-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-03-10 21:48 ` Eli Cohen
[not found] ` <20160310214807.GA39681-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Eli Cohen @ 2016-03-10 21:48 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: liranl-VPRAkNaXOzVWk0Htik3J/w, eitan-VPRAkNaXOzVWk0Htik3J/w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Tue, Mar 08, 2016 at 10:54:11AM -0700, Jason Gunthorpe wrote:
> > >
> > > Where did this come from?
> > It comes from the virtualization annex which can be found in the ibta
> > web site:
> > SM GID - A well-known GID that is associated with the SM, comprising
> > the concatenation of the Subnet prefix and the GUID 0x2. The SM GID is
> > never present in any GID Table. If SubnetPrefix is modified by the SM
> > the SM GID is updated implicitly.
>
> IBTA should fix this before it gets too far.
>
> > >
> > > It is wrong to have a EUI-64 like this that has a 0 OUI.
> > >
> > > It is wrong to have a 'well known GUID' that is by definition not
> > > universal without setting the local bit (IBA spec even says this)
> > >
> > > The well known guid should still conform to IEEE rules for creating
> > > EUI-64s.
> > >
> > > Note, that the IBA is a little confused because it tries to follow
> > > IPv6 rules in some places not realizing that IPv6 uses an EUI-64 with
> > > the U/L bit inverted.
> > >
> > > IMHO, new constants should strictly follow the IEEE EUI-64 rules and
> > > not try and confuse matters futher. The unused, incorrect, IBA
> > > definition of ::1 should be ignored.
> > >
> >
Hi Jason/Doug
we took into consideration your comments and we are acting to purchase
OUI which we will contribute to the IBTA. For now we can use the well
known GUID as it appears in the virtualizaion annex and in a couple of
weeks, once we have the new OUI, I will send another patch to fix
that.
Based on that I think we can go ahead and apply the series.
Regarding your alignment comment, I can send an incremental patch to
fix that.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <20160310214807.GA39681-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
@ 2016-03-10 23:26 ` Jason Gunthorpe
[not found] ` <20160310232620.GA18092-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Jason Gunthorpe @ 2016-03-10 23:26 UTC (permalink / raw)
To: Eli Cohen
Cc: liranl-VPRAkNaXOzVWk0Htik3J/w, eitan-VPRAkNaXOzVWk0Htik3J/w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Thu, Mar 10, 2016 at 11:48:07PM +0200, Eli Cohen wrote:
> we took into consideration your comments and we are acting to purchase
> OUI which we will contribute to the IBTA. For now we can use the well
> known GUID as it appears in the virtualizaion annex and in a couple of
> weeks, once we have the new OUI, I will send another patch to fix
> that.
Please have more respect for the UAPI, we can't merge a patch and then
cavalierly make a major change down the road like altering the well
know SA GUID.
I don't know that another OUI is necessary, setting the local bit is
probably OK, that is what IPv6 has done.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <20160310232620.GA18092-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-03-10 23:45 ` Eli Cohen
[not found] ` <20160310234542.GB39681-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
0 siblings, 1 reply; 22+ messages in thread
From: Eli Cohen @ 2016-03-10 23:45 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: liranl-VPRAkNaXOzVWk0Htik3J/w, eitan-VPRAkNaXOzVWk0Htik3J/w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Thu, Mar 10, 2016 at 04:26:20PM -0700, Jason Gunthorpe wrote:
>
> I don't know that another OUI is necessary, setting the local bit is
> probably OK, that is what IPv6 has done.
>
So defining the well known SA GUID to be 0x200000000000002 makes the
address locally administered in which case we don't need to provide a
valid OUI.
I can roll another set with that and the alignment fix.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment
[not found] ` <20160310234542.GB39681-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
@ 2016-03-10 23:52 ` Jason Gunthorpe
0 siblings, 0 replies; 22+ messages in thread
From: Jason Gunthorpe @ 2016-03-10 23:52 UTC (permalink / raw)
To: Eli Cohen
Cc: liranl-VPRAkNaXOzVWk0Htik3J/w, eitan-VPRAkNaXOzVWk0Htik3J/w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Fri, Mar 11, 2016 at 01:45:42AM +0200, Eli Cohen wrote:
> On Thu, Mar 10, 2016 at 04:26:20PM -0700, Jason Gunthorpe wrote:
> >
> > I don't know that another OUI is necessary, setting the local bit is
> > probably OK, that is what IPv6 has done.
> >
>
> So defining the well known SA GUID to be 0x200000000000002 makes the
> address locally administered in which case we don't need to provide a
> valid OUI.
> I can roll another set with that and the alignment fix.
It is in line with IPv6 (eg IPv6 defines would use ::1, but the local
bit is inverted, unlike IB).
Of course, IBTA should sign off on this plan.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2016-03-10 23:52 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 21:08 [PATCH rdma-next V1 00/10] IB SR-IOV support Eli Cohen
[not found] ` <1457384940-11951-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-07 21:08 ` [PATCH rdma-next V1 01/10] net/core: Add support for configuring VF GUIDs Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 02/10] IB/mlx5: Fix decision on using MAD_IFC Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 03/10] IB/core: Add subnet prefix to port info Eli Cohen
[not found] ` <1457384940-11951-4-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-07 21:43 ` Jason Gunthorpe
[not found] ` <20160307214313.GA6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-03-07 21:56 ` Eli Cohen
[not found] ` <20160307215608.GA33629-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
2016-03-07 22:05 ` Jason Gunthorpe
[not found] ` <20160307220558.GC6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-03-07 22:10 ` Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 04/10] IB/core: Support accessing SA in virtualized environment Eli Cohen
[not found] ` <1457384940-11951-5-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-07 22:04 ` Jason Gunthorpe
[not found] ` <20160307220434.GB6706-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-03-07 22:29 ` Eli Cohen
[not found] ` <20160307222908.GC33629-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
2016-03-08 17:54 ` Jason Gunthorpe
[not found] ` <20160308175411.GC10805-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-03-10 21:48 ` Eli Cohen
[not found] ` <20160310214807.GA39681-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
2016-03-10 23:26 ` Jason Gunthorpe
[not found] ` <20160310232620.GA18092-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-03-10 23:45 ` Eli Cohen
[not found] ` <20160310234542.GB39681-lgQlq6cFzJSjLWYaRI30zHI+JuX82XLG@public.gmane.org>
2016-03-10 23:52 ` Jason Gunthorpe
2016-03-07 21:08 ` [PATCH rdma-next V1 05/10] IB/core: Add interfaces to control VF attributes Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 06/10] IB/ipoib: Add ndo operations for configuring VFs Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 07/10] net/mlx5_core: Add VF param when querying vport counter Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 08/10] net/mlx5_core: Implement modify HCA vport command Eli Cohen
2016-03-07 21:08 ` [PATCH rdma-next V1 09/10] IB/mlx5: Implement callbacks for manipulating VFs Eli Cohen
2016-03-07 21:09 ` [PATCH rdma-next V1 10/10] IB/ipoib: Allow mcast packets from other VFs Eli Cohen
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).