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

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

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


Subject: Re: [virtio-comment] [PATCH V4] virtio-spec: dynamic network offloads configuration


Dmitry Fleytman <dfleytma@redhat.com> writes:
> From: Dmitry Fleytman <dfleytma@redhat.com>
>
> Virtio-net driver currently negotiates network offloads
> on startup via features mechanism and have no ability to
> disable and re-enable offloads later.
> This patch introduced a new control command that allows
> to configure device network offloads state dynamically.
> The patch also introduces a new feature flag
> VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.
>
> Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>

Thanks for this contribution!

I've merged it into the text version of the document as follows, and
raised an issue in the issue tracker for the TC to accept the change.

Cheers,
Rusty.

commit 65bc14ca515ce99c28dadc9a32257e7e0631af69
Author: Rusty Russell <rusty@au1.ibm.com>
Date:   Wed Aug 14 14:11:34 2013 +0930

    As submitted to virtio-comment list:
    https://lists.oasis-open.org/archives/virtio-comment/201308/msg00009.html
    
    (Edited into plain text)
    
    From: Dmitry Fleytman <dfleytma@redhat.com>
    
    Virtio-net driver currently negotiates network offloads
    on startup via features mechanism and have no ability to
    disable and re-enable offloads later.
    This patch introduced a new control command that allows
    to configure device network offloads state dynamically.
    The patch also introduces a new feature flag
    VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.
    
    Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
    Signed-off-by: Rusty Russell <rusty@au1.ibm.com>

diff --git a/virtio-spec.txt b/virtio-spec.txt
index d762461..a3ee054 100644
--- a/virtio-spec.txt
+++ b/virtio-spec.txt
@@ -1132,6 +1132,9 @@ features.
 
   VIRTIO_NET_F_GUEST_CSUM (1) Guest handles packets with partial checksum
 
+  VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2) Control channel offloads
+	reconfiguration support.
+
   VIRTIO_NET_F_MAC (5) Device has given MAC address.
 
   VIRTIO_NET_F_GSO (6) (Deprecated) device handles packets with 
@@ -1473,6 +1476,38 @@ Processing this notification involves:
 2. Sending VIRTIO_NET_CTRL_ANNOUNCE_ACK command through control 
   vq. 
 
+2.5.1.5.3.4 Offloads State Configuration
+
+If the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature is negotiated, the driver can
+send control commands for dynamic offloads state configuration.
+
+2.5.1.5.4.3.1 Setting Offloads State
+
+	u64 offloads;
+
+	#define VIRTIO_NET_F_GUEST_CSUM       1
+	#define VIRTIO_NET_F_GUEST_TSO4       7
+	#define VIRTIO_NET_F_GUEST_TSO6       8
+	#define VIRTIO_NET_F_GUEST_ECN        9
+	#define VIRTIO_NET_F_GUEST_UFO        10
+
+	#define VIRTIO_NET_CTRL_GUEST_OFFLOADS       5
+	 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET   0
+
+The class VIRTIO_NET_CTRL_GUEST_OFFLOADS has one command:
+VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET applies the new offloads configuration.
+
+u64 value passed as command data is a bitmask, bits set define
+offloads to be enabled, bits cleared - offloads to be disabled.
+
+There is a corresponding device feature for each offload. Upon feature
+negotiation corresponding offload gets enabled to preserve backward
+compartibility.
+
+Corresponding feature must be negotiated at startup in order to allow dynamic
+change of specific offload state.
+
+
 2.5.2 Block Device
 ==================
 



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