Skip to contentSkip to conversation

virtio-network: Clarify VLAN filter table configuration

PATCH Superseded Parav Pandit 2 participants 5 messages Jan 4, 2023 – Jan 6, 2023

v4 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 virtio-network: Clarify VLAN filter table configuration

The filtering behavior of the VLAN filter commands is not very clear as discussed in thread [1].

Hence, add the command description and device requirements for it.

[1] https://www.mail-archive.com/[email protected]/msg912392.html

---
changelog:
v3->v4:
- added description for accepting vlan tagged packets when vlan filter is not negotiated
v2->v3:
- corrected grammar
- simplified description for untagged packets
v1->v2:
- adapt to new file path
v0->v1:
- added missing conformance section link

---
 .../virtio-network/device-conformance.tex     |  1 +
 device-types/virtio-network/device.tex        | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
device-types/virtio-network/device-conformance.tex +1 -0
index c686377..54f6783 100644
@@ -9,6 +9,7 @@
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
+\item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / VLAN Filtering}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Automatic receive steering in multiqueue mode}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Receive-side scaling (RSS) / RSS processing}
device-types/virtio-network/device.tex +22 -0
index e7cdd6f..0e6d872 100644
@@ -1210,6 +1210,28 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
 Both the VIRTIO_NET_CTRL_VLAN_ADD and VIRTIO_NET_CTRL_VLAN_DEL
 command take a little-endian 16-bit VLAN id as the command-specific-data.
 
+VIRTIO_NET_CTRL_VLAN_ADD command adds the specified VLAN to the VLAN
+filtering table.
+
+VIRTIO_NET_CTRL_VLAN_DEL command removes specified VLAN from the VLAN
+filtering table which was previously added using
+VIRTIO_NET_CTRL_VLAN_ADD command.
+
+\devicenormative{\subparagraph}{VLAN Filtering}{Device Types / Network Device / Device Operation / Control Virtqueue / VLAN Filtering}
+
+When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts
+all VLAN tagged packets that matches the device's filter
+configuration.
+
+When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device starts with
+an empty VLAN filtering table.
+
+When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all
+VLAN tagged packets whose VLAN tag is found in the VLAN filtering
+table; the device should drop all VLAN tagged packets whose VLAN tag
+is not found in the VLAN filtering table. The VLAN filtering table
+applies only to the VLAN tagged packets.
+
 \subparagraph{Legacy Interface: VLAN Filtering}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / VLAN Filtering / Legacy Interface: VLAN Filtering}
 When using the legacy interface, transitional devices and drivers
 MUST format the VLAN id
Signature · 18 lines
2.26.2


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
#1 lore raw
Quoted 9 lines · Parav Pandit

The filtering behavior of the VLAN filter commands is not very clear as discussed in thread [1].

Hence, add the command description and device requirements for it.

[1] https://www.mail-archive.com/[email protected]/msg912392.html

Looks like we are going back to issues that we had in v1. what happened here?

Quoted 34 lines

---
changelog:
v3->v4:
- added description for accepting vlan tagged packets when vlan filter is not negotiated
v2->v3:
- corrected grammar
- simplified description for untagged packets
v1->v2:
- adapt to new file path
v0->v1:
- added missing conformance section link

---
 .../virtio-network/device-conformance.tex     |  1 +
 device-types/virtio-network/device.tex        | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
device-types/virtio-network/device-conformance.tex +1 -0
index c686377..54f6783 100644
@@ -9,6 +9,7 @@
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Processing of Incoming Packets}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Packet Receive Filtering}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Setting MAC Address Filtering}
+\item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / VLAN Filtering}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Gratuitous Packet Sending}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Automatic receive steering in multiqueue mode}
 \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Receive-side scaling (RSS) / RSS processing}
device-types/virtio-network/device.tex +0 -0
index e7cdd6f..0e6d872 100644

device-types/virtio-network/device.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1216

Quoted 7 lines
device-types/virtio-network/device.tex +4 -0
@@ -1210,6 +1210,28 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
 Both the VIRTIO_NET_CTRL_VLAN_ADD and VIRTIO_NET_CTRL_VLAN_DEL
 command take a little-endian 16-bit VLAN id as the command-specific-data.
 
+VIRTIO_NET_CTRL_VLAN_ADD command adds the specified VLAN to the VLAN
+filtering table.
+
+VIRTIO_NET_CTRL_VLAN_DEL command removes specified VLAN from the VLAN

the specified

device-types/virtio-network/device.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1218

Quoted 2 lines
device-types/virtio-network/device.tex +2 -0
+filtering table which was previously added using
+VIRTIO_NET_CTRL_VLAN_ADD command.

bad ordering so it's unclear what was added. it's vlan not the table. So:
removes the specified VLAN - which was previously added using VIRTIO_NET_CTRL_VLAN_ADD command - from the VLAN filtering table.

device-types/virtio-network/device.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1224

Quoted 6 lines
device-types/virtio-network/device.tex +6 -0
+
+\devicenormative{\subparagraph}{VLAN Filtering}{Device Types / Network Device / Device Operation / Control Virtqueue / VLAN Filtering}
+
+When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts
+all VLAN tagged packets that matches the device's filter
+configuration.

bad grammar here and it's not a match.

Quoted 15 lines
device-types/virtio-network/device.tex +10 -0
+
+When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device starts with
+an empty VLAN filtering table.
+
+When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all
+VLAN tagged packets whose VLAN tag is found in the VLAN filtering
+table; the device should drop all VLAN tagged packets whose VLAN tag
+is not found in the VLAN filtering table. The VLAN filtering table
+applies only to the VLAN tagged packets.
+
 \subparagraph{Legacy Interface: VLAN Filtering}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / VLAN Filtering / Legacy Interface: VLAN Filtering}
 When using the legacy interface, transitional devices and drivers
 MUST format the VLAN id
Signature · 1 line
2.26.2

This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.

Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/

#2 lore raw
Quoted 11 lines

From: Michael S. Tsirkin <[email protected]>
Sent: Wednesday, January 4, 2023 1:41 AM

Quoted 5 lines · Parav Pandit

The filtering behavior of the VLAN filter commands is not very clear as discussed in thread [1].

Hence, add the command description and device requirements for it.

Quoted 8 lines
Quoted 4 lines

[1] https://www.mail-archive.com/[email protected]/msg912392.html

Looks like we are going back to issues that we had in v1. what happened here?

I was missing text in v3 for the case of device behavior for handling vlan tagged packets when CTRL_VLAN is not negotiated. Which I added in v4. Parts of the v1 was taken care. More below.
[..]

Quoted 6 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+VIRTIO_NET_CTRL_VLAN_DEL command removes specified VLAN from the

VLAN

the specified

Ack.

Quoted 8 lines

device-types/virtio-network/device.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1218

Quoted 2 lines
device-types/virtio-network/device.tex +2 -0
+filtering table which was previously added using
+VIRTIO_NET_CTRL_VLAN_ADD command.

bad ordering so it's unclear what was added. it's vlan not the table. So:
removes the specified VLAN - which was previously added using VIRTIO_NET_CTRL_VLAN_ADD command - from the VLAN filtering
table.

Ack.

Quoted 10 lines

Review

Quoted 7 lines
(quoted diff) +7 -0
+
+\devicenormative{\subparagraph}{VLAN Filtering}{Device Types /
+Network Device / Device Operation / Control Virtqueue / VLAN
+Filtering}
+
+When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts all
+VLAN tagged packets that matches the device's filter configuration.

bad grammar here and it's not a match.

How about,

When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts all VLAN tagged packets based on the device configuration.

Above spec line covers
(a) existing mac filter table entries
(b) promiscuous variations and
(c) future filtering rules.

This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.

Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/

#3 lore raw
Quoted 50 lines · Parav Pandit
Quoted 11 lines

From: Michael S. Tsirkin <[email protected]>
Sent: Wednesday, January 4, 2023 1:41 AM

Quoted 5 lines · Parav Pandit

The filtering behavior of the VLAN filter commands is not very clear as discussed in thread [1].

Hence, add the command description and device requirements for it.

Quoted 8 lines
Quoted 4 lines

[1] https://www.mail-archive.com/[email protected]/msg912392.html

Looks like we are going back to issues that we had in v1. what happened here?

I was missing text in v3 for the case of device behavior for handling vlan tagged packets when CTRL_VLAN is not negotiated. Which I added in v4. Parts of the v1 was taken care. More below.
[..]

Quoted 6 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+VIRTIO_NET_CTRL_VLAN_DEL command removes specified VLAN from the

VLAN

the specified

Ack.

Quoted 8 lines

device-types/virtio-network/device.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1218

Quoted 2 lines
device-types/virtio-network/device.tex +2 -0
+filtering table which was previously added using
+VIRTIO_NET_CTRL_VLAN_ADD command.

bad ordering so it's unclear what was added. it's vlan not the table. So:
removes the specified VLAN - which was previously added using VIRTIO_NET_CTRL_VLAN_ADD command - from the VLAN filtering
table.

Ack.

Quoted 10 lines

Review

Quoted 7 lines
(quoted diff) +7 -0
+
+\devicenormative{\subparagraph}{VLAN Filtering}{Device Types /
+Network Device / Device Operation / Control Virtqueue / VLAN
+Filtering}
+
+When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts all
+VLAN tagged packets that matches the device's filter configuration.

bad grammar here and it's not a match.

Quoted 4 lines

How about,

When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts all VLAN tagged packets based on the device configuration.

We came up with a better wording e.g. in
[email protected] .

Quoted 4 lines

Above spec line covers
(a) existing mac filter table entries
(b) promiscuous variations and
(c) future filtering rules.

This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.

Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/

#4 lore raw
Quoted 3 lines

From: Michael S. Tsirkin <[email protected]>
Sent: Wednesday, January 4, 2023 8:38 AM

[..]

Quoted 5 lines
Quoted 2 lines

When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts all VLAN tagged packets based on the device configuration.

We came up with a better wording e.g. in 20230103054736-mutt-send-email- [email protected] .

The above link is broken for me.
Did you mean below wordings?
" Filtering of untagged packets is not affected by whether VIRTIO_NET_F_CTRL_VLAN is or is not negotiated."

If so, then it's different because above text line is for the untagged packets. While the text I added bak in v4 is for tagged packets.

Please review v5 to see if it makes sense.

This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.

Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/