Hi,All I am developing the cm for vlan device. I have a question need to help from you. I grap the packet content for REQ packet. the value of primary local port GID field is the same when use vlan device with non-vlan device. I think that it is incorrect. I have a question after analysised the flow of cm. why the rec->sgid is fixed and the value is translated by the non-vlan device when use vlan device. The interface and code as follows: int ib_init_ah_attr_from_path(struct ib_device *device, u8 port_num, struct sa_path_rec *rec, struct rdma_ah_attr *ah_attr) { int ret; u16 gid_index; int use_roce; struct net_device *ndev = NULL; memset(ah_attr, 0, sizeof *ah_attr); ah_attr->type = rdma_ah_find_type(device, port_num); rdma_ah_set_dlid(ah_attr, be32_to_cpu(sa_path_get_dlid(rec))); if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) && (rdma_ah_get_dlid(ah_attr) == be16_to_cpu(IB_LID_PERMISSIVE))) rdma_ah_set_make_grd(ah_attr, true); rdma_ah_set_sl(ah_attr, rec->sl); rdma_ah_set_path_bits(ah_attr, be32_to_cpu(sa_path_get_slid(rec)) & get_src_path_mask(device, port_num)); rdma_ah_set_port_num(ah_attr, port_num); rdma_ah_set_static_rate(ah_attr, rec->rate); use_roce = rdma_cap_eth_ah(device, port_num); if (use_roce) { struct net_device *idev; struct net_device *resolved_dev; struct rdma_dev_addr dev_addr = { .bound_dev_if = ((sa_path_get_ifindex(rec) >= 0) ? sa_path_get_ifindex(rec) : 0), .net = sa_path_get_ndev(rec) ? sa_path_get_ndev(rec) : &init_net }; union { struct sockaddr _sockaddr; struct sockaddr_in _sockaddr_in; struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr; if (!device->get_netdev) return -EOPNOTSUPP; rdma_gid2ip(&sgid_addr._sockaddr, &rec->sgid); rdma_gid2ip(&dgid_addr._sockaddr, &rec->dgid); ... ... ... } >From my point, I think that it is different with vlan device and non vlan device. Thanks Lijun Ou -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html