From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shahaf Shuler Subject: [PATCH 1/4] ethdev: add Tx offload limitations Date: Wed, 22 Feb 2017 18:09:57 +0200 Message-ID: <1487779800-46491-2-git-send-email-shahafs@mellanox.com> References: <1487779800-46491-1-git-send-email-shahafs@mellanox.com> Cc: dev@dpdk.org To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, thomas.monjalon@6wind.com, jingjing.wu@intel.com Return-path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 75E6B2BFF for ; Wed, 22 Feb 2017 17:10:22 +0100 (CET) In-Reply-To: <1487779800-46491-1-git-send-email-shahafs@mellanox.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" Many Tx offloads are performed by hardware. As such, each offload has its own limitations. This commit adds the option to query Tx offload limitations in order to use them properly and avoid bugs. The limitations should be filled by the PMD upon query device info. Signed-off-by: Shahaf Shuler --- lib/librte_ether/rte_ethdev.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 97f3e2d..3ab8568 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -728,6 +728,17 @@ struct rte_eth_desc_lim { uint16_t nb_mtu_seg_max; }; +struct rte_eth_tx_offload_lim { + /** + * Max allowed size of network headers (L2+L3+L4) for TSO offload. + */ + uint32_t max_tso_headers_sz; + /** + * Max allowed size of TCP payload for TSO offload. + */ + uint32_t max_tso_payload_sz; +}; + /** * This enum indicates the flow control mode */ @@ -920,6 +931,8 @@ struct rte_eth_dev_info { uint16_t max_vmdq_pools; /**< Maximum number of VMDq pools. */ uint32_t rx_offload_capa; /**< Device RX offload capabilities. */ uint32_t tx_offload_capa; /**< Device TX offload capabilities. */ + struct rte_eth_tx_offload_lim tx_off_lim; + /**< Device TX offloads limits. */ uint16_t reta_size; /**< Device redirection table size, the total number of entries. */ uint8_t hash_key_size; /**< Hash key size in bytes */ -- 1.8.3.1