[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [EXT] [PATCH v3 5/6] virtio-net: Add flow filter match entry, action and requests
Hi Parav > -----Original Message----- > From: Parav Pandit <parav@nvidia.com> > Sent: Friday, October 27, 2023 6:23 AM > To: virtio-comment@lists.oasis-open.org; mst@redhat.com; > cohuck@redhat.com > Cc: Satananda Burla <sburla@marvell.com>; shahafs@nvidia.com; si- > wei.liu@oracle.com; xuanzhuo@linux.alibaba.com; Parav Pandit > <parav@nvidia.com>; Heng Qi <hengqi@linux.alibaba.com> > Subject: [EXT] [PATCH v3 5/6] virtio-net: Add flow filter match entry, > action and requests > > External Email > > ---------------------------------------------------------------------- > Define flow filter match key for the defined types. > > Currently it covers the most common filter types and value > of Ethernet header, IP addresses, TCP and UDP ports. > > Define generic flow filter add and delete requests and its transport > using a control virtqueue command and flow filter virtqueue(s). > > Fixes: https://urldefense.proofpoint.com/v2/url?u=https- > 3A__github.com_oasis-2Dtcs_virtio- > 2Dspec_issues_179&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=NHDPsfcAYlN2z- > NXHHG4WB09qqS0voo_nf6_kGS625A&m=pDD152kDeYQpenIq0s9wtl9jKhGXu8vH8UADzvj3 > 0H0vYSHapi4Dg_VGMbM6Q11k&s=JVXwjbepSf9bUQv4ij0cZm6juQ5i1eh61To_7gykte8&e > = > Signed-off-by: Heng Qi <hengqi@linux.alibaba.com> > Signed-off-by: Parav Pandit <parav@nvidia.com> > > --- > changelog: > v1->v2: > - squashed with match fields definition patch of v1 > - added length to the flexible array defintion struct to benefit > from future runtime length bound checkers listed in > https://urldefense.proofpoint.com/v2/url?u=https- > 3A__people.kernel.org_kees_bounded-2Dflexible-2Darrays-2Din- > 2Dc&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=NHDPsfcAYlN2z- > NXHHG4WB09qqS0voo_nf6_kGS625A&m=pDD152kDeYQpenIq0s9wtl9jKhGXu8vH8UADzvj3 > 0H0vYSHapi4Dg_VGMbM6Q11k&s=d23DLZc9XwFc79vSSZqnKj8FcXXZZOeQbK73LIlxNgY&e > = > - renamed value to key > - addressed comments from Satananda > - merged destination and action to one struct > v0->v1: > - reworded add flow request text to consider optional mask > - replaced respond with set > - added mask flag to the type > --- > device-types/net/description.tex | 209 +++++++++++++++++++++++++++++++ > 1 file changed, 209 insertions(+) > > diff --git a/device-types/net/description.tex b/device- > types/net/description.tex > index c52ed41..486f661 100644 > --- a/device-types/net/description.tex > +++ b/device-types/net/description.tex > @@ -1270,6 +1270,50 @@ \subsubsection{Flow Filter}\label{sec:Device > Types / Network Device / Device Ope > }; > \end{lstlisting} > > +\begin{lstlisting} > +struct virtio_ff_match_entry { > + le16 type; > + u8 mask_present; > + u8 key_mask_len; /* sum of length of fields key and mask */ > + le64 fields_bmap; > + u8 key[]; > + u8 mask[]; /* optional, only present when mask_present is set > to 1 */ > +}; > + > +struct virtio_ff_match { > + u8 num_entries; /* indicates number of valid entries */ > + u8 reserved[7]; > + struct virtio_ff_match_entry entries[]; > +}; > + > +#define VIRTIO_NET_FF_DEST_TYPE_RQ 0 > + > +struct virtio_ff_action_forward { > + u8 dest_type; > + u8 reserved[3]; > + union { > + le16 vq_index; > + le32 reserved1; > + }; > +}; > + > +#define VIRTIO_NET_FF_ACTION_DROP 0 > +#define VIRTIO_NET_FF_ACTION_FORWARD 1 > + > +struct virtio_ff_action_entry { > + u8 action; > + u8 len; /* indicates the length of value in bytes */ > + u8 value[]; > +}; > + > +struct virtio_ff_action { > + u8 num_entries; /* indicates number of valid entries */ > + u8 reserved[7]; > + struct virtio_ff_action_entry entries[]; > +}; Thanks. Looks good now. Regards Satananda
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]