Xilinx / open-nic-driver

AMD OpenNIC driver includes the Linux kernel driver
GNU General Public License v2.0
58 stars 40 forks source link

[Bug report] OpenNIC not receiving in the first time insmod #19

Open laochonlam opened 2 years ago

laochonlam commented 2 years ago

Hi,

I interconnected U250's two 100G ports and tried to test them by ping from one to another. However, the receiver cannot detect the sender's ARP request packet after the driver is installed "the first time". The packet can be seen in tcpdump -i enp94s0f0 but not tcpdump -i enp94s0f1.

This is what I did

$ sudo insmod onic.ko
$ ping 1.1.1.1 -I enp94s0f0

My Solution

When I remove the module and install it again, that works. (tcpdump can capture the packet on both sides)

$ sudo rmmod onic.ko
$ sudo insmod onic.ko

My two machines with two different U250s encounter the same situation. Although it works after the second time insmod, I still want to report it and see if this is a bug or not.

Thanks, ChonLam

cneely-amd commented 2 years ago

Hi @laochonlam,

I've usually tested the two ports on the U250 across different machines.

I know that one possible way to test between two interfaces in the same machine is with using a namespace method. I'm pasting an example that someone else had provided to me earlier.

`eth0=enp10s0f0 eth1=enp10s0f1

ip netns add foobar ip link set dev $eth0 down ip link set dev $eth1 down ip link set dev $eth1 netns foobar

ip address add 192.168.20.2/24 dev $eth0 ip netns exec foobar ip address add 192.168.20.3/24 dev $eth1

info

ip address show ip netns exec foobar ip address show

ip link set dev $eth0 up ip netns exec foobar ip link set dev $eth1 up ip netns exec foobar ip link set dev lo up

info

ip route show ip netns exec foobar ip route show`

"then any command from the namespace must be preceded by ip netns exec foobar in this case. For example, ip netns exec foobar ping 192.168.20.2 or ip netns exec foobar nc ..."

I tried something similar to the above example and I was able to ping across the ports on the same U250, using the "ip netns exec foobar" preceding my commands and verifying the RX and TX packet counts using ifconfig (and also ifconfig with the prefix command).

It sounds like, however, you have found a method that is working for you that might be easier.

Best regards, --Chris

laochonlam commented 2 years ago

Thanks for your reply @cneely-xlnx. I'll try your solution the next time.

But I think I also did a two-machine experiment before with the other end-point is a normal NIC. This situation remains after each reboot.

Thanks, ChonLam