From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 202E21DB9 for ; Thu, 28 Jun 2018 16:06:48 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2018 07:06:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,283,1526367600"; d="scan'208";a="60850338" Received: from dpdk-test32.sh.intel.com ([10.67.119.193]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jun 2018 07:06:47 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, tiwei.bie@intel.com Cc: zhihong.wang@intel.com, dev@dpdk.org, Marvin Liu Date: Fri, 29 Jun 2018 05:52:26 +0800 Message-Id: <20180628215235.106069-3-yong.liu@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180628215235.106069-1-yong.liu@intel.com> References: <20180628215235.106069-1-yong.liu@intel.com> Subject: [dpdk-dev] [PATCH v3 02/11] net/virtio: add in-order feature bit definition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 14:06:49 -0000 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