From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marvin Liu Subject: [PATCH v2 2/8] net/virtio: add VIRTIO_F_IN_ORDER definition Date: Mon, 25 Jun 2018 23:17:04 +0800 Message-ID: <20180625151710.29437-3-yong.liu@intel.com> References: <20180625151710.29437-1-yong.liu@intel.com> Cc: zhihong.wang@intel.com, dev@dpdk.org, Marvin Liu To: maxime.coquelin@redhat.com, tiwei.bie@intel.com Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 1332D5F28 for ; Mon, 25 Jun 2018 09:31:13 +0200 (CEST) In-Reply-To: <20180625151710.29437-1-yong.liu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Also introduce use_inorder_[rt]x flag for selection of IN_ORDER [RT]x handlers. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index a28ba8339..77f805df6 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -121,6 +121,12 @@ struct virtnet_ctl; #define VIRTIO_TRANSPORT_F_START 28 #define VIRTIO_TRANSPORT_F_END 34 +/* + * Inorder feature indicates that all buffers are used by the device + * in the same order in which they have been made available. + */ +#define VIRTIO_F_IN_ORDER 35 + /* The Guest publishes the used index for which it expects an interrupt * at the end of the avail ring. Host should ignore the avail->flags field. */ /* The Host publishes the avail index for which it expects a kick @@ -233,6 +239,8 @@ struct virtio_hw { uint8_t modern; uint8_t use_simple_rx; uint8_t use_simple_tx; + uint8_t use_inorder_rx; + uint8_t use_inorder_tx; uint16_t port_id; uint8_t mac_addr[ETHER_ADDR_LEN]; uint32_t notify_off_multiplier; -- 2.17.0