From: Halil Pasic <pasic@linux.ibm.com>
To: Parav Pandit <parav@nvidia.com>
Cc: mst@redhat.com, virtio-dev@lists.oasis-open.org,
virtio-comment@lists.oasis-open.org, si-wei.liu@oracle.com,
Halil Pasic <pasic@linux.ibm.com>
Subject: Re: [virtio-comment] [PATCH v10] virtio-net: Clarify VLAN filter table configuration
Date: Wed, 25 Jan 2023 19:04:54 +0100 [thread overview]
Message-ID: <20230125190454.043e54e0.pasic@linux.ibm.com> (raw)
In-Reply-To: <20230112212550.763889-1-parav@nvidia.com>
On Thu, 12 Jan 2023 23:25:50 +0200
Parav Pandit <parav@nvidia.com> wrote:
> 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://lists.oasis-open.org/archives/virtio-dev/202301/msg00210.html
Reference is wrong. This links an unrelated thread.
For reference see:
https://www.mail-archive.com/virtio-dev@lists.oasis-open.org/msg09424.html
[..]
@ -1194,7 +1194,11 @@ \subsubsection{Control Virtqueue}\label{sec:Device
Types / Network Device / Devi
> \paragraph{VLAN Filtering}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / VLAN Filtering}
>
> If the driver negotiates the VIRTIO_NET_F_CTRL_VLAN feature, it
> -can control a VLAN filter table in the device.
> +can control a VLAN filter table in the device. The VLAN filter
> +table applies only to VLAN tagged packets.
> +
> +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device starts with
> +an empty VLAN filter table.
>
> \begin{note}
> Similar to the MAC address based filtering, the VLAN filtering
> @@ -1210,6 +1214,22 @@ \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.
>
[..]
> +
> +\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 MUST
> +accept all VLAN tagged packets as per the device configuration.
The story so far (other thread):
> > I find "as per the device configuration" difficult to comprehend. Maybe we can
> > work on this with an editorial. What are you trying to express here? On one
> > hand you say "the device MUST accept all VLAN tagged packets" on the other
> > hand "per the device configuration" may explain, or may relativize and restrict
> > that statement.
> >
> From VLAN filtering perspective, it should accept all packets, but this is subject to other device configuration such as MAC programming.
> The current one is fine that cover both the aspects to VLAN specific and other config.
IMHO you need to be explicit about this "From the VLAN filtering
perspective". A sub-case of "not negotiated" is "not offered because the
device does not support it" and in that case there is conceptually
no "VLAN filtering perspective".
> > Would
> > "When VIRTIO_NET_F_CTRL_VLAN is not negotiated, VLAN filtering is not
> > applied. I.e. VLAN tags are ignored by the device."
> > also work?
> >
> No. its not about ignoring "VLAN tags". Its about dealing with "packets" that starts with the VLAN tag.
I'm not sure I understand the difference.
Would just
"When VIRTIO_NET_F_CTRL_VLAN is not negotiated, no VLAN filtering is
done by the device."
work?
I don't like this "as per device configuration" formulation. If you
have multiple filtering mechanisms, like VLAN and MAC, and describe
all of these using this "as per device configuration", you would
end up with statements like:
"When feature F_X is not negotiated, the device MUST accept all
P_X packets as the per device configuration."
Where as per device configuration is supposed to cover all other
active filtering mechanisms except the one that is tied to F_X, but
exclude the mechanism that is tied to the feature F_X.
I'm also not convinced about the information content of "as per
device configuration". Kind of the complementer would be "contrary
to the device configuration" which does not make much sense. I would
also argue that we can add "as per device configuration" to most
of our device normative statements. It would IMHO only decrease
clarity and increase the confusion. But if you ask yourself
is the behavior prescribed by an arbitrary device normative statemen "as
per device configuration" or not, I don't think one would ever answer
"no" to that question.
> +
> +When VIRTIO_NET_F_CTRL_VLAN is negotiated, the device MUST
> +accept all VLAN tagged packets whose VLAN tag is present in
> +the VLAN filter table and SHOULD drop all VLAN tagged packets
> +whose VLAN tag is absent in the VLAN filter table.
We could also add "as per device configuration" here as well...
From the other thread
On Mon, 23 Jan 2023 12:41:16 +0000
Parav Pandit <parav@nvidia.com> wrote:
> > BTW why SHOULD drop?
> This is the offload feature to drop such packets so that OS driver doesn't need to do the filtering work. :)
Why not MUST drop? If the device is allowed to produce false negatives,
then I think the OS probably wants to check again to filter out those.
Can we change SHOULD to MUST, so the conforming device is guaranteed to
do the filtering, and the OS can rely on it?
Regards,
Halil
> +
> \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
> diff --git a/device-types/net/device-conformance.tex b/device-types/net/device-conformance.tex
> index c686377..54f6783 100644
> --- a/device-types/net/device-conformance.tex
> +++ b/device-types/net/device-conformance.tex
> @@ -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}
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: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
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/
next prev parent reply other threads:[~2023-01-25 18:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 21:25 [virtio-comment] [PATCH v10] virtio-net: Clarify VLAN filter table configuration Parav Pandit
2023-01-19 18:35 ` [virtio-comment] " Parav Pandit
2023-01-25 18:04 ` Halil Pasic [this message]
2023-01-25 19:09 ` [virtio-dev] RE: [virtio-comment] " Parav Pandit
2023-01-25 20:31 ` [virtio-dev] " Michael S. Tsirkin
2023-01-25 20:36 ` [virtio-dev] " Parav Pandit
2023-01-26 11:48 ` Halil Pasic
2023-01-26 16:17 ` [virtio-dev] " Parav Pandit
2023-01-26 16:27 ` Michael S. Tsirkin
2023-01-25 20:55 ` Michael S. Tsirkin
2023-01-25 23:30 ` Parav Pandit
2023-01-25 23:46 ` Parav Pandit
2023-01-26 0:46 ` [virtio-dev] " Si-Wei Liu
2023-01-26 5:01 ` Michael S. Tsirkin
2023-01-26 5:07 ` Michael S. Tsirkin
2023-01-26 16:27 ` Parav Pandit
2023-01-26 16:31 ` Michael S. Tsirkin
2023-01-26 16:42 ` Parav Pandit
2023-01-26 17:15 ` Michael S. Tsirkin
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=20230125190454.043e54e0.pasic@linux.ibm.com \
--to=pasic@linux.ibm.com \
--cc=mst@redhat.com \
--cc=parav@nvidia.com \
--cc=si-wei.liu@oracle.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox