virtio-network: Clarify VLAN filter table configuration
PATCH 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:v0->v1:
- added missing conformance section link
--- conformance.tex | 1 + virtio-network.tex | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+)
conformance.tex +1 -0
@@ -412,6 +412,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets} \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}
virtio-network.tex +23 -0
@@ -1210,6 +1210,29 @@ \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 which matches device's filter configuration. + +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device starts with empty +VLAN filtering table. + +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all the +VLAN tagged packets whose VLAN tag is found in the VLAN filtering table; +device should drop all VLAN tagged packets whose VLAN tag is not found +in the VLAN filtering table. + +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all +untagged packets which matches device's filter configuration. + \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 · 6 lines
2.26.2 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 39 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
Suggested-by Si-Wei Liu <[email protected]>Signed-off-by Parav Pandit <[email protected]>---
changelog:v0->v1:
- added missing conformance section link--- conformance.tex | 1 + virtio-network.tex | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+)conformance.tex +1
-0@@ -412,6 +412,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets} \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}virtio-network.tex +1
-0@@ -1210,6 +1210,29 @@ \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
virtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1223
Quoted 10 lines
virtio-network.tex +10
-0+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 which matches device's filter configuration.
which match the device's
virtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1225
Quoted 2 lines
virtio-network.tex +2
-0+ +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device starts with empty
an empty
virtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1228
Quoted 3 lines
virtio-network.tex +3
-0+VLAN filtering table. + +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all the
all the -> all
virtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1230
Quoted 2 lines
virtio-network.tex +2
-0+VLAN tagged packets whose VLAN tag is found in the VLAN filtering table; +device should drop all VLAN tagged packets whose VLAN tag is not found
the device
virtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
Quoted 4 lines
virtio-network.tex +4
-0+in the VLAN filtering table. + +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all +untagged packets which matches device's
which match the device's ...
Quoted 1 line
filter configuration.
This confusing, took me several reads to understand. E.g. with promisc we accept all packets, it is not necessary about a match.
I suggest "
Filtering of untagged packets is not affected by whether VIRTIO_NET_F_CTRL_VLAN is or is not negotiated. "
Quoted 6 lines
+
\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 idSignature · 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/
Quoted 35 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Tuesday, January 3, 2023 5:56 AMvirtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1223
Quoted 3 lines
virtio-network.tex +3
-0+ +When VIRTIO_NET_F_CTRL_VLAN is not negotiated, the device accepts all +VLAN tagged packets which matches device's filter configuration.which match the device's
Review
Quoted 3 lines
(quoted diff) +3
-0+ +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device starts with +emptyan empty
virtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi · line 1228
Quoted 3 lines
virtio-network.tex +3
-0+VLAN filtering table. + +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all theall the -> all
Review
Quoted 3 lines
(quoted diff) +3
-0+VLAN tagged packets whose VLAN tag is found in the VLAN filtering +table; device should drop all VLAN tagged packets whose VLAN tag is +not foundthe device
virtio-network.tex \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi
Quoted 4 lines
virtio-network.tex +4
-0+in the VLAN filtering table. + +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device accepts all +untagged packets which matches device'swhich match the device's ...
Quoted 9 lines
Quoted 1 line
filter configuration.
This confusing, took me several reads to understand.
E.g. with promisc we accept all packets, it is not necessary about a match. I suggest "
Filtering of untagged packets is not affected by whetherVIRTIO_NET_F_CTRL_VLANis or is not negotiated.
"
Make sense.
I simplified the wordings now.
Also fixed above comments in v2.
Thanks.
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/