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 6B692A00C2 for ; Mon, 18 Jul 2022 16:30:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FF8040E25; Mon, 18 Jul 2022 16:30:21 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5675840041; Mon, 18 Jul 2022 16:30:18 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26I9dLct022853; Mon, 18 Jul 2022 07:30:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pfpt0220; bh=7eHhCa5sVR7oONOz4LlMUl+l+ZW7MqvLBltlbZjB2qA=; b=jFgrxUwdtkFD8bo3TarjzlC0NjAXsM6OvmuhEe7/z7AxKpI5Hk8hOYSm6wSglimMI98g qkSraV/ONwwLz6rWZCxdFXn5i9KPXggjEdMT/vmBGq7myDXZuKu55ZTP8Tl/A0PZCnJX IV49PvTGya4v874kXByL0hcQLaK66p6Yw7XapN2tY2TUqL2+D+ROW2hO3q1JwzIe4gSk wgHJdyrDys8ZuruTyUuGlCJ4wRugCUo/MMFAplEOrp8OBC6x1Jdcmd2Cvc5WRFRIgHRZ tmUFUn2LTMCx9sWRICDGiNn+Su748eVko3AjQKGavokMsMEx5wewK36JofDnhKQvlOXW 8w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3hbvumnec2-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 18 Jul 2022 07:30:17 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 18 Jul 2022 07:30:10 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 18 Jul 2022 07:30:10 -0700 Received: from [10.193.76.200] (unknown [10.193.76.200]) by maili.marvell.com (Postfix) with ESMTP id 440363F709F; Mon, 18 Jul 2022 07:30:04 -0700 (PDT) Message-ID: <95117186-c447-494c-8cd8-3591bf2da4af@marvell.com> Date: Mon, 18 Jul 2022 20:00:02 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] examples/l3fwd: fix issue with MTU set on event mode Content-Language: en-US To: Jerin Jacob , CC: Jerin Jacob , dpdk-dev , Ferruh Yigit , dpdk stable References: <20220421141632.21676-1-ndabilpuram@marvell.com> From: Nithin Kumar Dabilpuram In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: o-WOu6DZ-jNGPzrP3n842dDImKNoipl8 X-Proofpoint-ORIG-GUID: o-WOu6DZ-jNGPzrP3n842dDImKNoipl8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-18_13,2022-07-18_01,2022-06-22_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Ping. On 2022-06-02 1:15 PM, Jerin Jacob wrote: > On Thu, Apr 21, 2022 at 7:47 PM Nithin Dabilpuram > wrote: >> >> MTU configuration is missing for ethdev when using eventmode >> when user provides it via "--max-pkt-len" config. It is only >> done in poll mode setup. Fix the event mode setup code to >> do the same. >> >> Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length") >> Cc: ferruh.yigit@intel.com >> Cc: stable@dpdk.org >> >> Signed-off-by: Nithin Dabilpuram > > Acked-by: Jerin Jacob > > >> --- >> examples/l3fwd/l3fwd.h | 5 +++++ >> examples/l3fwd/l3fwd_event.c | 6 ++++++ >> examples/l3fwd/main.c | 4 ++-- >> 3 files changed, 13 insertions(+), 2 deletions(-) >> >> diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h >> index ad39496..b0bfdcc 100644 >> --- a/examples/l3fwd/l3fwd.h >> +++ b/examples/l3fwd/l3fwd.h >> @@ -107,6 +107,8 @@ extern struct lcore_conf lcore_conf[RTE_MAX_LCORE]; >> >> extern struct parm_cfg parm_config; >> >> +extern uint32_t max_pkt_len; >> + >> /* Send burst of packets on an output interface */ >> static inline int >> send_burst(struct lcore_conf *qconf, uint16_t n, uint16_t port) >> @@ -193,6 +195,9 @@ is_valid_ipv4_pkt(struct rte_ipv4_hdr *pkt, uint32_t link_len) >> int >> init_mem(uint16_t portid, unsigned int nb_mbuf); >> >> +int config_port_max_pkt_len(struct rte_eth_conf *conf, >> + struct rte_eth_dev_info *dev_info); >> + >> /* Function pointers for LPM, EM or FIB functionality. */ >> void >> setup_lpm(const int socketid); >> diff --git a/examples/l3fwd/l3fwd_event.c b/examples/l3fwd/l3fwd_event.c >> index 7a40129..e72add8 100644 >> --- a/examples/l3fwd/l3fwd_event.c >> +++ b/examples/l3fwd/l3fwd_event.c >> @@ -73,6 +73,12 @@ l3fwd_eth_dev_port_setup(struct rte_eth_conf *port_conf) >> rte_panic("Error during getting device (port %u) info:" >> "%s\n", port_id, strerror(-ret)); >> >> + ret = config_port_max_pkt_len(&local_port_conf, &dev_info); >> + if (ret != 0) >> + rte_exit(EXIT_FAILURE, >> + "Invalid max packet length: %u (port %u)\n", >> + max_pkt_len, port_id); >> + >> if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) >> local_port_conf.txmode.offloads |= >> RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; >> diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c >> index a629198..6585c8b 100644 >> --- a/examples/l3fwd/main.c >> +++ b/examples/l3fwd/main.c >> @@ -135,7 +135,7 @@ static struct rte_eth_conf port_conf = { >> }, >> }; >> >> -static uint32_t max_pkt_len; >> +uint32_t max_pkt_len; >> >> static struct rte_mempool *pktmbuf_pool[RTE_MAX_ETHPORTS][NB_SOCKETS]; >> static struct rte_mempool *vector_pool[RTE_MAX_ETHPORTS]; >> @@ -1136,7 +1136,7 @@ eth_dev_get_overhead_len(uint32_t max_rx_pktlen, uint16_t max_mtu) >> return overhead_len; >> } >> >> -static int >> +int >> config_port_max_pkt_len(struct rte_eth_conf *conf, >> struct rte_eth_dev_info *dev_info) >> { >> -- >> 2.8.4 >>