DPDK usage discussions
 help / color / mirror / Atom feed
* link up / down not working with Mellanox
@ 2022-05-17  6:46 Haider Ali
  2022-06-06 10:24 ` Haider Ali
  0 siblings, 1 reply; 2+ messages in thread
From: Haider Ali @ 2022-05-17  6:46 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

Hi,

I am trying to test the link-up and link-down features of Mellanox using this link https://dpdk-test-plans.readthedocs.io/en/latest/shutdown_api_test_plan.html. But found that even after setting the link-down, NIC is forwarding the traffic. Please check my test setup:

Server 1:
$ sudo ./build/app/dpdk-testpmd -l 0,2 -n 4 --file-prefix=ha -a 0000:04:00.1 -- -i --rxq=1 --txq=1
testpmd> set fwd mac
testpmd> start
testpmd> set link-down port 0
Port 0: link state change event

Server 2:
>>> sendp(Ether()/IP()/TCP()/Raw('x'*300),iface='enp4s0f1')
$ sudo tcpdump -i enp4s0f1 -vve

22:59:52.469337 00:00:00:00:00:00 (oui Ethernet) > Broadcast, ethertype IPv4 (0x0800), length 354: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto TCP (6), length 340)
    localhost.ftp-data > localhost.http: Flags [S], cksum 0xf9b9 (correct), seq 0:300, win 8192, length 300: HTTP

22:59:52.469379 b8:ce:f6:ed:9f:af (oui Unknown) > 02:00:00:00:00:00 (oui Unknown), ethertype IPv4 (0x0800), length 354: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto TCP (6), length 340)
    localhost.ftp-data > localhost.http: Flags [S], cksum 0xf9b9 (correct), seq 0:300, win 8192, length 300: HTTP


Please correct me if I am doing anything wrong.

Regards,
Haider

[-- Attachment #2: Type: text/html, Size: 4376 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: link up / down not working with Mellanox
  2022-05-17  6:46 link up / down not working with Mellanox Haider Ali
@ 2022-06-06 10:24 ` Haider Ali
  0 siblings, 0 replies; 2+ messages in thread
From: Haider Ali @ 2022-06-06 10:24 UTC (permalink / raw)
  To: users; +Cc: Asaf Penso, rasland

[-- Attachment #1: Type: text/plain, Size: 1739 bytes --]

Hi All,

Thanks, Asaf and Raslan for resolving this issue.

After doing the below FW configurations that separate the logical vs physical link status of the NIC, this issue gets resolved:
mlxconfig -d 0000:04:00.1  set  KEEP_ETH_LINK_UP_P1=0  KEEP_ETH_LINK_UP_P2=0

Regards,
Haider
________________________________
From: Haider Ali
Sent: Tuesday, May 17, 2022 11:46 AM
To: users <users@dpdk.org>
Subject: link up / down not working with Mellanox

Hi,

I am trying to test the link-up and link-down features of Mellanox using this link https://dpdk-test-plans.readthedocs.io/en/latest/shutdown_api_test_plan.html. But found that even after setting the link-down, NIC is forwarding the traffic. Please check my test setup:

Server 1:
$ sudo ./build/app/dpdk-testpmd -l 0,2 -n 4 --file-prefix=ha -a 0000:04:00.1 -- -i --rxq=1 --txq=1
testpmd> set fwd mac
testpmd> start
testpmd> set link-down port 0
Port 0: link state change event

Server 2:
>>> sendp(Ether()/IP()/TCP()/Raw('x'*300),iface='enp4s0f1')
$ sudo tcpdump -i enp4s0f1 -vve

22:59:52.469337 00:00:00:00:00:00 (oui Ethernet) > Broadcast, ethertype IPv4 (0x0800), length 354: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto TCP (6), length 340)
    localhost.ftp-data > localhost.http: Flags [S], cksum 0xf9b9 (correct), seq 0:300, win 8192, length 300: HTTP

22:59:52.469379 b8:ce:f6:ed:9f:af (oui Unknown) > 02:00:00:00:00:00 (oui Unknown), ethertype IPv4 (0x0800), length 354: (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto TCP (6), length 340)
    localhost.ftp-data > localhost.http: Flags [S], cksum 0xf9b9 (correct), seq 0:300, win 8192, length 300: HTTP


Please correct me if I am doing anything wrong.

Regards,
Haider

[-- Attachment #2: Type: text/html, Size: 6438 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-07  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17  6:46 link up / down not working with Mellanox Haider Ali
2022-06-06 10:24 ` Haider Ali

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