Commit c6a06063 authored by Yangyang Li's avatar Yangyang Li Committed by shiyongbang
Browse files

RDMA/core: Add support for the new ARPHRD_UB

driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8AL44



--------------------------------------------------------------------------

For RDMA over UB Link mode, UB Link replaces the current Ethernet.
Add a new ARP protocol HW ID 38 and enable CM link building and
netdevice event for this mode.

Signed-off-by: default avatarYangyang Li <liyangyang20@huawei.com>
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
Signed-off-by: default avatarHaoyue Xu <xuhaoyue1@hisilicon.com>
parent 7dfcf66a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -582,7 +582,8 @@ cma_validate_port(struct ib_device *device, u8 port,
	if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port))
		return ERR_PTR(-ENODEV);

	if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) {
	if ((dev_type == ARPHRD_ETHER || dev_type == ARPHRD_UB)
	    && rdma_protocol_roce(device, port)) {
		ndev = dev_get_by_index(dev_addr->net, bound_if_index);
		if (!ndev)
			return ERR_PTR(-ENODEV);
+2 −2
Original line number Diff line number Diff line
@@ -754,7 +754,7 @@ static int netdevice_event(struct notifier_block *this, unsigned long event,
	struct net_device *ndev = netdev_notifier_info_to_dev(ptr);
	struct netdev_event_work_cmd cmds[ROCE_NETDEV_CALLBACK_SZ] = { {NULL} };

	if (ndev->type != ARPHRD_ETHER)
	if (ndev->type != ARPHRD_ETHER && ndev->type != ARPHRD_UB)
		return NOTIFY_DONE;

	switch (event) {
@@ -820,7 +820,7 @@ static int addr_event(struct notifier_block *this, unsigned long event,
	struct update_gid_event_work *work;
	enum gid_op_type gid_op;

	if (ndev->type != ARPHRD_ETHER)
	if (ndev->type != ARPHRD_ETHER && ndev->type != ARPHRD_UB)
		return NOTIFY_DONE;

	switch (event) {