[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [PATCH 3/7] virtio-net: Add flow filter group life cycle commands
All the flow filters are managed in the flow filter group. The device can have one or more flow filter groups. Each flow filter group has its own priority. The group priority which defines the packet processing order in the flow filter domain. Add commands to add and delete the flow filter group. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/179 Signed-off-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Heng Qi <hengqi@linux.alibaba.com> --- device-types/net/description.tex | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/device-types/net/description.tex b/device-types/net/description.tex index bf6d4c5..caa8c59 100644 --- a/device-types/net/description.tex +++ b/device-types/net/description.tex @@ -1192,6 +1192,11 @@ \subsubsection{Flow Filter}\label{sec:Device Types / Network Device / Device Ope filter group, a packet may find match to multiple flow filters. In such scenario, a flow filter with the highested priority is applied first to the packet, if there is no match, the next higher priority flow filter is applied. +The driver adds and deletes the flow filter group using a control +virtqueue commands \ref{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Flow Filter / Flow Filter Group Add} +and +\ref{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Flow Filter / Flow Filter Group Delete} +respectively. The match fields also optionally consist of a match mask. When a mask is specified for the flow filter, first the packet fields are masked before @@ -2036,6 +2041,8 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi #define VIRTIO_NET_CTRL_FF 7 #define VIRTIO_NET_CTRL_FF_CAP_GET 0 #define VIRTIO_NET_CTRL_FF_MATCH_CAP_GET 1 + #define VIRTIO_NET_CTRL_FF_GROUP_ADD 2 + #define VIRTIO_NET_CTRL_FF_GROUP_DEL 3 \end{lstlisting} \subparagraph{Flow Filter Capabilities Get}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Flow Filter / Flow Filter Capabilities Get} @@ -2107,6 +2114,32 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi Each array entry of \field{types} represents supported match fields of the packet by the device. +\subparagraph{Flow Filter Group Add}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Flow Filter / Flow Filter Group Add} + +The command VIRTIO_NET_CTRL_FF_GROUP_ADD adds a new flow filter +group with the supplied group identifier \field{id} with assigned +priority \field{priority}. + +\begin{lstlisting} +struct virtio_net_ctrl_ff_group_add { + le16 priority; /* higher the value, higher priority */ + le16 id; +}; +\end{lstlisting} + +\subparagraph{Flow Filter Group Delete}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Flow Filter / Flow Filter Group Delete} + +The command VIRTIO_NET_CTRL_FF_GROUP_DEL deletes the +flow filter group that has been previously added using command +VIRTIO_NET_CTRL_FF_GROUP_ADD. Flow filter group is +identified using a group identifier \field{id}. + +\begin{lstlisting} +struct virtio_net_ctrl_ff_group_del { + le16 id; +}; +\end{lstlisting} + \subsubsection{Legacy Interface: Framing Requirements}\label{sec:Device Types / Network Device / Legacy Interface: Framing Requirements} -- 2.34.1
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]