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 9307DA0548; Fri, 12 Nov 2021 10:40:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20149410EA; Fri, 12 Nov 2021 10:40:49 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 8775A40692 for ; Fri, 12 Nov 2021 10:40:47 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="219999704" X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="219999704" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 01:40:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,229,1631602800"; d="scan'208";a="453012523" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 12 Nov 2021 01:40:46 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 12 Nov 2021 01:40:45 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 12 Nov 2021 01:40:45 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Fri, 12 Nov 2021 01:40:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f+mcT3tQXMFIBNVW1TlXGQtAFus+ZeYRoZm6qbDM4bQ5mMjjVIeJ7cQhx4CcMMS3JOiwF56cfRCcDcWVU4cwB2EnXMUviwzocNPryu8FlEsYC1cM/uOHkbrQdAJpeNBdv6PEz6rI4HUuaHfWqDhJNxaXP5xKgrUzjJmEKw6xVebAZ111TYb/PyDGPyn5QWg/RchYN2DaQec+jUJfWZbhi2NJZLEw7MRwE+uiwLgK4pkOc5rGN0dHs2E3cCl4QlRDCzsENjU3htapTNmpivfwsPMIZUwpxYR/BsZ4oLBS35TfhCDSaJt1lhDagwlPftPUnA6Cgm+KCuMcvGrnNFQRHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xkgnTp6NIP6Mi4f+trBRiXhHsD213mZZsTAWD0ryHWg=; b=ZQdRqHYY5lPw5TLy5DsY9Oe5Jl9tdlG6t28dGK2NvOnQZ/2G1DhQMwyvzC27ZN/XZb6gAqysfH+3leuoqrlAHyncfZpSgssSQItTiwQvdMX/0ZeMR2uh5FFcV8fSnHHQrrUgIY4r/GOWElcvg/kXc2obNueo/x7t3kQvmoONAx7+GMBKB/uYonICCI8aiz24PaNmL93nk8IBhoMotIYPxyzHS3HGYfMEdrGCGH99lkm9xLwUdk3fJ97VsFOZ18XOcqQ1FbcgBisEW3yU/iJYL46STj8ify6dRxJEUCfGbz4Hz8EpgVrcqv36jay/ywRD19hB8bl2tPHTeCKEQyLyzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xkgnTp6NIP6Mi4f+trBRiXhHsD213mZZsTAWD0ryHWg=; b=dQbsORrlMNR2+qPF5p2QCZWRvns/G3NVo5P/ZS2ecFVWbwKV1Q2Uaed/YcqWKK3Vj7nNhE0AOqRzDNcIbQNNc/kV3o5MhKTh1VtV8aNHjll4gx1SaAwFZDJlfHe0D46/aWG7yUuuiWassuv5mOxc+2HTnxtzBAf7fOfwIaxdnBM= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB4740.namprd11.prod.outlook.com (2603:10b6:5:2ad::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Fri, 12 Nov 2021 09:40:43 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e%6]) with mapi id 15.20.4690.026; Fri, 12 Nov 2021 09:40:43 +0000 From: "Ananyev, Konstantin" To: "rohit.raj@nxp.com" , "dev@dpdk.org" , "Yigit, Ferruh" CC: "nipun.gupta@nxp.com" , Sachin Saxena , Vanshika Shukla Subject: RE: [PATCH v2] examples/l3fwd: fix jumbo packet drop issue Thread-Topic: [PATCH v2] examples/l3fwd: fix jumbo packet drop issue Thread-Index: AQHX13PE9cfeK7NlBUSa5jcMgR9Z8qv/onCQ Date: Fri, 12 Nov 2021 09:40:43 +0000 Message-ID: References: <20210727092523.22718-1-rohit.raj@nxp.com> <20211112031635.11400-1-rohit.raj@nxp.com> In-Reply-To: <20211112031635.11400-1-rohit.raj@nxp.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9d1be3f2-8818-4826-5552-08d9a5c07f2c x-ms-traffictypediagnostic: DM6PR11MB4740: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BJ9e+mD7ZS/wTebQx8laWHn38fPUA96Pl6aXRe9rMqAZLc66kiCkRaNxF336mvImc8sJ2yS2WVNuWJaeY+qdLk+hivnAmZrKDFD+UQCWgL+dCkOtVQ8/uMHpMplSAMjLeuXQjIjyQigClI/j5n8hAFgDaAG8dvjcmHbvqAsc1R826PPWTLIrCEQBaHjR/0CmApDOUfz5aQIUGgTVcMC3DJqAFbenJjB6NU97Oha+dCbyrXDjrkjO/34pKLaBWrvkP1wlZDG7NINk44xEnfAZ7TwqVvQSQaKmRVJaQPXyXnuJGDVc/vmWtnomWj4bqYyRGRwGDs/M0AyP5vn65ouRS+wr+0SZhaRnckToKyaCinGq0L80cPIsrJOZMD3XQSCLx+W0+pWko+KN5RoAa69Yrg8lSyYjvCaINNfELfTOTICk6UrZFegFIwCCm4p2vUvLipVz62+OLoH+i967T1vgGnBnaLMncIHptXwraemKvmH/iuYZXrs+6KX9VOFkasKfPV2KD61dpa6uZdi5ah/KE/ABJNiXKTjvK6P5s7+4r6LsXv3wwBFGE//kqo925mv0tv0gUMV6+Sx/c+tXGx+s1xz8TZVW84Wf938zgFPNjk1UXc0+AoK49ou0yXBYQ0jv1Vb2nN/TGFoACK6H8d5LIIrvpx/P/7Ra2igKqXrW6AT7BQoKZEqyNYYPO+Zof0gRLuS/83NAC8kqslV3rtkF0g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(8676002)(55236004)(38070700005)(508600001)(6636002)(9686003)(26005)(66946007)(6506007)(66476007)(122000001)(64756008)(76116006)(186003)(66556008)(66446008)(38100700002)(52536014)(33656002)(8936002)(83380400001)(110136005)(54906003)(7696005)(4326008)(5660300002)(86362001)(71200400001)(2906002)(55016002)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8L5ZuaMAYJmNR34gUcjPSMlugKw60bCNGtgWcfoIRz5Z0wIcf1BOnAxCyp86?= =?us-ascii?Q?24OtOr+yrTrMNaLLeD8RN/487TTxfJfCmmGztJ/EiVJ573LFTAyZJqxtO821?= =?us-ascii?Q?XC5tOQi9zo9bR9aDzVqZutSx9CSzdPgcC5AnFCKVUUNcl86kIQzgFVvQJspp?= =?us-ascii?Q?hTgs6POphFZ9HmFpH3w2T6Wqp3EvNmyLpcUlSTlsOpZLg1aNL2fHDDgatrgL?= =?us-ascii?Q?A/NMdw2hBVTzGflXpTzMrkr4fOkyXJ1g2JbQ+VdSVeHgdKjuJUqThByw5S2a?= =?us-ascii?Q?aZNSmmg9Pw7ldsasipXXeS0iaZ9ZnypX1qsGuNCHGrY4jqNIsvxxVs1XY8s/?= =?us-ascii?Q?daQi3KErFhgBjiZETujFZw6XTNHzr+3dMx0ZCPo9jnpb67P/jtGRegUqp/cO?= =?us-ascii?Q?hDBd3iV/wqZzqEFViouXH33eEgJXtXfpRnnSNOtyqAcGaYoutAAqDPHFMuEo?= =?us-ascii?Q?dckKRYWlFmxuzxjD+FevAgidYldDWgE/jx3IYlSgKMfKjTufJIIzXfGOiDOD?= =?us-ascii?Q?+x1jbFPRDb9/HhTgJXHyZHGp7bWonbsBzMQoBksa+WgtdVvve2ys02J+lztM?= =?us-ascii?Q?QOQiSGdjz8Td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Agc?= =?us-ascii?Q?L5qJdhvRyx5rIA7jBIJ7hJvqPcummVJyMF5zPNrnJw3w46kIP2REAi6W5CQk?= =?us-ascii?Q?AdhIegiTSEqg4ti3C6kfQi78nLYTLRBPbKCfsWCC/OEE2FQe3Yxh+W4leIfA?= =?us-ascii?Q?yZBxkymliu0m6A8j7LP73/3QphaD5HHN+6ebAyrneLOxVRIyl6KUkWwn3Zao?= =?us-ascii?Q?g2kScQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d1be3f2-8818-4826-5552-08d9a5c07f2c X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Nov 2021 09:40:43.2233 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NeaiOJrxzu0lx32Qiknq9tUJdFFlqL+mjX6exiqA07auzOj4bbQyd5P5qLlXZN64Jpt0hXvM3MvRItlf16kqU/icF4T+QRg+zKksvyW0VqU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4740 X-OriginatorOrg: intel.com 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 > From: Rohit Raj >=20 > l3fwd uses mbufs with 2KB data size. If we enable jumbo packets, it is > not able to store packets with size greater than 2KB, hence these > packets are dropped. >=20 > This patch fixes this issue by enabling scatter for jumbo packet, if > it is supported by NIC. >=20 > If scatter is not supported by NIC and max packet length is greater > than default mbuf data size, then application exits with proper error > message. >=20 > Fixes: f68aad7904f ("examples/l3fwd: update") >=20 > Signed-off-by: Rohit Raj > Signed-off-by: Sachin Saxena > Signed-off-by: Vanshika Shukla > --- >=20 > v2: > * Improved the check to not enable Rx scatter when packets fits into > buffer. > * Check if jumbo packet is enabled using max_rx_pktlen instead of > jumbo packet flag. >=20 > examples/l3fwd/main.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) >=20 > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c > index d69373f881..61448c759c 100644 > --- a/examples/l3fwd/main.c > +++ b/examples/l3fwd/main.c > @@ -1109,6 +1109,19 @@ l3fwd_poll_resource_setup(void) > "Invalid max packet length: %u (port %u)\n", > max_pkt_len, portid); >=20 > + /* Enable Receive side SCATTER, if supported by NIC, > + * when jumbo packet is enabled. > + */ >From the code below, it looks like you always enable scatter if HW supports= it. Without paying attention to max_pkt_len provided by user.=20 > + if (dev_info.max_rx_pktlen > RTE_MBUF_DEFAULT_DATAROOM) { > + if (dev_info.rx_offload_capa & > + RTE_ETH_RX_OFFLOAD_SCATTER) > + local_port_conf.rxmode.offloads |=3D > + RTE_ETH_RX_OFFLOAD_SCATTER; > + else > + rte_exit(EXIT_FAILURE, > + "Max packet length greater than default MBUF size\n"); > + } > + > if (dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) > local_port_conf.txmode.offloads |=3D > RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; > -- > 2.17.1