From patchwork Wed Feb 22 16:09:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahaf Shuler X-Patchwork-Id: 20670 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 6A7CE378B; Wed, 22 Feb 2017 17:10:25 +0100 (CET) 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) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shahafs@mellanox.com) with ESMTPS (AES256-SHA encrypted); 22 Feb 2017 18:10:19 +0200 Received: from arch009.mtl.labs.mlnx (arch009.mtl.labs.mlnx [10.7.12.209]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v1MGAJkM008209; Wed, 22 Feb 2017 18:10:19 +0200 Received: from arch009.mtl.labs.mlnx (localhost [127.0.0.1]) by arch009.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id v1MGAJFk046832; Wed, 22 Feb 2017 18:10:19 +0200 Received: (from root@localhost) by arch009.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id v1MGAJQZ046831; Wed, 22 Feb 2017 18:10:19 +0200 From: Shahaf Shuler To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, thomas.monjalon@6wind.com, jingjing.wu@intel.com Cc: dev@dpdk.org Date: Wed, 22 Feb 2017 18:09:57 +0200 Message-Id: <1487779800-46491-2-git-send-email-shahafs@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1487779800-46491-1-git-send-email-shahafs@mellanox.com> References: <1487779800-46491-1-git-send-email-shahafs@mellanox.com> Subject: [dpdk-dev] [PATCH 1/4] ethdev: add Tx offload limitations 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: , 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 */