Re: 【Ask for help】A question for connection management with vlan device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2018/4/16 22:03, Parav Pandit 写道:
> Hi,
> 
>> -----Original Message-----
>> From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma-
>> owner@xxxxxxxxxxxxxxx] On Behalf Of oulijun
>> Sent: Monday, April 16, 2018 2:19 AM
>> To: linux-rdma <linux-rdma@xxxxxxxxxxxxxxx>
>> Cc: Linuxarm <linuxarm@xxxxxxxxxx>
>> Subject: 【Ask for help】A question for connection management with vlan
>> device
>>
>> Hi,All
>>    I am developing the cm for vlan device. I have a question need to help from
>> you.
> Cm for vlan device is support for IPv4 addresses.
> Did it fail for you? If so, which client-server test commands did you try?
> 
Yes, The test flow as follows:
1. I configure the vlan device ip;
   ifconfig eth0 192.168.1.100;
   vconfig add eth0 100;
   ifconfig eth0.100 192.168.1.1

root@(none)# ifconfig
eth0      Link encap:Ethernet  HWaddr A2:AF:57:53:A5:39
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a0af:57ff:fe53:a539/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1732 (1.6 KiB)

eth0.100  Link encap:Ethernet  HWaddr A2:AF:57:53:A5:39
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a0af:57ff:fe53:a539/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:866 (866.0 B)

2. I use perftest tool, the cmd as follows:
   server: ./ib_send_bw -n 5 -x 4 -R
   client: ./ib_send_bw -n 5 -x 4 -R 192.168.1.1

   I also check the gid_attr, the info as follows:
   root@(none)# cat /sys/class/infiniband/hns_0/ports/1/gid_attrs/types/4
IB/RoCE v1

root@(none)# cat /sys/class/infiniband/hns_0/ports/1/gid_attrs/ndevs/4
eth0.100

thanks
Lijun Ou
> Cm for vlan device for non-link local IPv6 is also supported.
> 
>>    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.
> GID value will be same, but GID attribute will be different once ib_cache_gid_add() will be fixed to remove the default GID check for IPv6.
> Till that time, please use non-link local IPv6 address.
> 
>>    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
> 
> 


--
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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux