From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19A44A0613 for ; Thu, 29 Aug 2019 09:47:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 610761D15C; Thu, 29 Aug 2019 09:47:32 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 867BD1D15B for ; Thu, 29 Aug 2019 09:47:30 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from matan@mellanox.com) with ESMTPS (AES256-SHA encrypted); 29 Aug 2019 10:47:27 +0300 Received: from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x7T7lQwm025525; Thu, 29 Aug 2019 10:47:26 +0300 From: Matan Azrad To: dev@dpdk.org Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Konstantin Ananyev , Olivier Matz Date: Thu, 29 Aug 2019 07:47:12 +0000 Message-Id: <1567064832-22457-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [RFC] ethdev: add new fields for max LRO session size 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" It may be needed by the user to limit the LRO session packet size. In order to allow the above limitation, add new Rx configuration for the maximum LRO session size. In addition, Add a new capability to expose the maximum LRO session size supported by the port. Signed-off-by: Matan Azrad --- doc/guides/nics/features.rst | 2 ++ lib/librte_ethdev/rte_ethdev.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst index c4e128d..6d1c8a5 100644 --- a/doc/guides/nics/features.rst +++ b/doc/guides/nics/features.rst @@ -193,10 +193,12 @@ LRO Supports Large Receive Offload. * **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_TCP_LRO``. + ``dev_conf.rxmode.max_lro_session_len``. * **[implements] datapath**: ``LRO functionality``. * **[implements] rte_eth_dev_data**: ``lro``. * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_LRO``, ``mbuf.tso_segsz``. * **[provides] rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_TCP_LRO``. +* **[provides] rte_eth_dev_info**: ``max_lro_session_len``. .. _nic_features_tso: diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index dc6596b..6dbb9d9 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -395,6 +395,7 @@ struct rte_eth_rxmode { /** The multi-queue packet distribution mode to be used, e.g. RSS. */ enum rte_eth_rx_mq_mode mq_mode; uint32_t max_rx_pkt_len; /**< Only used if JUMBO_FRAME enabled. */ + uint32_t max_lro_session_len; /**< The maximum LRO session size. */ uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/ /** * Per-port Rx offloads to be set using DEV_RX_OFFLOAD_* flags. @@ -1148,6 +1149,8 @@ struct rte_eth_dev_info { const uint32_t *dev_flags; /**< Device flags */ uint32_t min_rx_bufsize; /**< Minimum size of RX buffer. */ uint32_t max_rx_pktlen; /**< Maximum configurable length of RX pkt. */ + uint32_t max_lro_session_len; + /**< Maximum configurable length of LRO session. */ uint16_t max_rx_queues; /**< Maximum number of RX queues. */ uint16_t max_tx_queues; /**< Maximum number of TX queues. */ uint32_t max_mac_addrs; /**< Maximum number of MAC addresses. */ -- 1.8.3.1