OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] [PATCH v3 1/3] virtio-net: Introduce extended RSC feature


Can we add some words about the new fields in the virtio_net_hdr structure, such as SHOULD, MUST,...

Also, should the virtio_net_hdr be bumped to v2?

Rob Miller
(919)721-3339


On Sun, Mar 1, 2020 at 9:33 AM Yuri Benditovich <yuri.benditovich@daynix.com> wrote:
VIRTIO_NET_F_RSC_EXT feature bit indicates that the device
is able to provide extended RSC information. When the feature
is negotiatede and 'gso_type' field in received packet is not
GSO_NONE, the device reports number of coalesced packets in
'csum_start' field and number of duplicated acks in 'csum_offset'
field and sets VIRTIO_NET_HDR_F_RSC_INFO in 'flags' field.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
---
Âinclude/uapi/linux/virtio_net.h | 22 ++++++++++++++++++++--
Â1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index a3715a3224c1..19e76b3e3a64 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/include/uapi/linux/virtio_net.h
@@ -57,6 +57,7 @@
                    Â* Steering */
Â#define VIRTIO_NET_F_CTRL_MAC_ADDR 23Â /* Set MAC address */

+#define VIRTIO_NET_F_RSC_EXTÂ Â Â61Â Â /* extended coalescing info */
Â#define VIRTIO_NET_F_STANDBYÂ Â Â62Â Â /* Act as standby for another device
                    Â* with the same MAC.
                    Â*/
@@ -104,6 +105,7 @@ struct virtio_net_config {
Âstruct virtio_net_hdr_v1 {
Â#define VIRTIO_NET_HDR_F_NEEDS_CSUMÂ Â 1Â Â Â Â/* Use csum_start, csum_offset */
Â#define VIRTIO_NET_HDR_F_DATA_VALIDÂ Â 2Â Â Â Â/* Csum is valid */
+#define VIRTIO_NET_HDR_F_RSC_INFOÂ Â Â 4Â Â Â Â/* rsc info in csum_ fields */
    __u8 flags;
Â#define VIRTIO_NET_HDR_GSO_NONEÂ Â Â Â Â Â Â Â 0Â Â Â Â/* Not a GSO frame */
Â#define VIRTIO_NET_HDR_GSO_TCPV4Â Â Â Â1Â Â Â Â/* GSO frame, IPv4 TCP (TSO) */
@@ -113,8 +115,24 @@ struct virtio_net_hdr_v1 {
    __u8 gso_type;
    __virtio16 hdr_len;  Â/* Ethernet + IP + tcp/udp hdrs */
    __virtio16 gso_size;  /* Bytes to append to hdr_len per frame */
-Â Â Â Â__virtio16 csum_start;Â /* Position to start checksumming from */
-Â Â Â Â__virtio16 csum_offset; /* Offset after that to place checksum */
+Â Â Â Âunion {
+Â Â Â Â Â Â Â Âstruct {
+Â Â Â Â Â Â Â Â Â Â Â Â__virtio16 csum_start;
+Â Â Â Â Â Â Â Â Â Â Â Â__virtio16 csum_offset;
+Â Â Â Â Â Â Â Â};
+Â Â Â Â Â Â Â Âstruct {
+Â Â Â Â Â Â Â Â Â Â Â Â/* Position to start checksumming from */
+Â Â Â Â Â Â Â Â Â Â Â Â__virtio16 start;
+Â Â Â Â Â Â Â Â Â Â Â Â/* Offset after that to place checksum */
+Â Â Â Â Â Â Â Â Â Â Â Â__virtio16 offset;
+Â Â Â Â Â Â Â Â} csum;
+Â Â Â Â Â Â Â Âstruct {
+Â Â Â Â Â Â Â Â Â Â Â Â/* num of coalesced packets */
+Â Â Â Â Â Â Â Â Â Â Â Â__le16 packets;
+Â Â Â Â Â Â Â Â Â Â Â Â/* num of duplicated acks */
+Â Â Â Â Â Â Â Â Â Â Â Â__le16 dup_acks;
+Â Â Â Â Â Â Â Â} rsc;
+Â Â Â Â};
    __virtio16 num_buffers; /* Number of merged rx buffers */
Â};

--
2.17.1


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]