From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B7EB9A0C47; Wed, 27 Oct 2021 11:14:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 390BC410FE; Wed, 27 Oct 2021 11:14:40 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 12F054068C for ; Wed, 27 Oct 2021 11:14:36 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="290953194" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="290953194" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 02:14:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="497781847" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by orsmga008.jf.intel.com with ESMTP; 27 Oct 2021 02:14:34 -0700 From: Ferruh Yigit To: Jakub Grajciar , Somnath Kotur , Huisong Li , Ajit Khaparde , Konstantin Ananyev Cc: Ferruh Yigit , dev@dpdk.org, Andrew Rybchenko , David Christensen Date: Wed, 27 Oct 2021 10:14:29 +0100 Message-Id: <20211027091429.2996153-2-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211027091429.2996153-1-ferruh.yigit@intel.com> References: <20211026153802.1820636-1-ferruh.yigit@intel.com> <20211027091429.2996153-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/2] net/memif: fix driver init with default MTU X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length, which doesn't include FCS (4 bytes CRC). But ethdev by default uses frame size with FCS when application doesn't define any explicit value. As a result device configuration fails because device is tried to be configured with a frame size length that is bigger than what device reported as supported. Device reports as max supported frame size is 1514 but configured value is 1518. Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the driver to report the max supported frame size, this matches to the initial intention. Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length") Signed-off-by: Ferruh Yigit Reported-by: Andrew Rybchenko Tested-by: David Christensen --- v2: * Remove unnecessary cast --- drivers/net/memif/rte_eth_memif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 8cec493ffdb9..e4ebabec6ad6 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -195,7 +195,7 @@ static int memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *dev_info) { dev_info->max_mac_addrs = 1; - dev_info->max_rx_pktlen = (uint32_t)ETH_FRAME_LEN; + dev_info->max_rx_pktlen = RTE_ETHER_MAX_LEN; dev_info->max_rx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS; dev_info->max_tx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS; dev_info->min_rx_bufsize = 0; -- 2.31.1