From: liweihang <liweihang@huawei.com>
To: "dledford@redhat.com" <dledford@redhat.com>,
Jason Gunthorpe <jgg@nvidia.com>
Cc: "leon@kernel.org" <leon@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linuxarm@openeuler.org" <linuxarm@openeuler.org>
Subject: Question about the mechanism of RoCEv2 VLAN validation
Date: Thu, 28 Jan 2021 14:08:21 +0000 [thread overview]
Message-ID: <ff917571dbae45fe9c9d840bac400404@huawei.com> (raw)
Hi All,
I'm confusing at the VLAN validation mechanism of RoCEv2.
Assuming that we have two nodes with an HCA that supports RoCE v2. And we add
a VLAN (id = 1) on each nodes, but they are of different network segments. The
IP and VLAN configuration are as follows:
NODE_A NODE_B
+--------+---------------+------+ +--------+---------------+------+
| device | IP | VLAN | | device | IP | VLAN |
+--------+---------------+------+ +--------+---------------+------+
| eth0 | 192.168.97.1 | 0 | /----| eth0 | 192.168.100.2 | 0 |
+--------+---------------+------+ / +--------+---------------+------+
| eth0.1 | 192.168.100.3 | 1 |---/ | eth0.1 | 192.168.98.2 | 1 |
+--------+---------------+------+ +--------+---------------+------+
Now I try to ping eth0 on NODE_B from eth0.1 on NODE_A, of cource it fails
becauce these devices are using different VLAN ID.
Then I do some tests on RoCE, the first one is a simple RC send test:
NODE_A: ib_send_bw -d mlx5_0 -x 5 (the sgid 5 belongs to eth0.1)
NODE_B: ib_send_bw -d mlx5_0 -x 3 <server ip> (the sgid 3 belongs to eth0)
The result is as expected, the RoCEv2 packet with unmatched VLAN ID was
dropped. I think the reason is that for RC service, the VLAN information
of a QP is recorded in QPC, and the HCA can check it when receiving a packet.
But when I run a simple UD send test:
NODE_A: ib_send_bw -d mlx5_0 -x 5 -c UD (the sgid 5 belongs to eth0.1)
NODE_B: ib_send_bw -d mlx5_0 -x 3 -c UD <server ip> (the sgid 3 belongs to eth0)
The test ends without error successfully. So the question is, RoCEv2 is based
on Ethernet, shouldn't a RoCEv2 node check the VLAN ID of every incoming
packets?
UD is connectionless-oriented, an UD QP won't record VLAN info in it's QPC,
so how to achieve the checking mechanism? Or a UD QP should just ignore the
unmatched VLAN ID?
I didn't find any info from the IB specification, I'd appreciate it if someone
could help explain it.
Thanks
Weihang
next reply other threads:[~2021-01-28 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 14:08 liweihang [this message]
2021-01-28 14:11 ` Question about the mechanism of RoCEv2 VLAN validation Jason Gunthorpe
2021-01-29 1:21 ` liweihang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff917571dbae45fe9c9d840bac400404@huawei.com \
--to=liweihang@huawei.com \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@openeuler.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.