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 5BD6042602 for ; Thu, 21 Sep 2023 07:48:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53B9F402E6; Thu, 21 Sep 2023 07:48:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 355DE4014F; Thu, 21 Sep 2023 07:48:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695275324; x=1726811324; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mSOAi14fub2yf2Tl4zZC1yf6byWIZEW2t8HlYXR3Z7c=; b=fWrZdBAQ6cdQAsZWNYEzYI6Atj0dXKC/FVvdWINMUhwtmw9JtC0D8GwA UuldplGwJ0yX4uudCEsGqXoe5KsjW8y394mvkKwlTSMuy5Cj9SH++jGs4 XKa2vbYJJnHDDSIcw9MDj+c5kB/G7rVpQ2Qw1B5MMzP+qJmxK/tPCT6YK Rnx52Z56Dns5gMwvT49nBXOElDQMxDceRlNxPP1ZoRWIWBRoJCf+BABXt 4OVs5G1dKCou7mCkTAY+n8uiGAsx2a6l7cSc3kbDYnPaE+hQdyebn6D9b D9hu+Hs6yPv59SKsNbK13wdKiya0c4qQfQGZgKFb0SspQ+tIS5HsEmGX/ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="360677275" X-IronPort-AV: E=Sophos;i="6.03,164,1694761200"; d="scan'208";a="360677275" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 22:48:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="1077770025" X-IronPort-AV: E=Sophos;i="6.03,164,1694761200"; d="scan'208";a="1077770025" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Sep 2023 22:48:42 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2507.32; Wed, 20 Sep 2023 22:48:42 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 20 Sep 2023 22:48:42 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Wed, 20 Sep 2023 22:48:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mJt6Vrheu0I68ML7MpdlwX+Q6YcTHlh3+dNB+2/ukS2rHFJD36RUEFzCZyp8iXLMHgEdafGIYmisq6l1bGR1OpHbSTQE3X6rvxlePs0FsWmDanlDKUA+ci7WHxKPuLT+ysf+MeHAbjJzeTV9Ket++/nJaCebbnNoGvXYR+Bs8cYuu7FZGX8USyeHkWX9oR5duwCWvRcnI5ZRXkjL/SFjwSsTEcf967Mjd58xCyEIfoPlSN2hxKoq+Fyu1xBgFGm7a9kZ7Dbh+z7qvzrZ4NdaXVspH7+YC+CFJPAlOBTb0y5av4tS+vOQUyGBaY8AJ6QQY7wFk7Fd3OAOAj8dL8X/VA== 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=RRh1GJsdXKbYTVWIBr/TGV5ZdgHjERlSOh9PSOM3gLs=; b=aFqsm6p0rMaOGg+6MOpAHxVB9gsFhiAjhJ7RYfEz6gF4Bjn+4ogjCYOAbxmjKtW/2dmYSgt0qdQbHR2IZpUXk17XbOXxSyQ0OBGomUDu8VDGbIEaPSBPeuUh3ZqzBJ7aTppNJsNouLLg4QbVegqcOIpnNNhIg6PaHo9k/wM8YYqgHTRebkeXApk1YicMzk9yyE7ns1264gQNDlWtG5D2Q7kE5sgGh1fhS3KTmvEVU9lkLkkLV/o4gbLTZBWNnPh/k0y2BBmSl6rSyHLinsuRq+/1kwIu0wOXQaZpOVnJ/vuqR5kG6G6IXZI10WTjh78TTftdc3RE/q3P7H91IT6cOg== 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 Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by SN7PR11MB7705.namprd11.prod.outlook.com (2603:10b6:806:32f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Thu, 21 Sep 2023 05:48:35 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3%3]) with mapi id 15.20.6792.026; Thu, 21 Sep 2023 05:48:35 +0000 From: "Zhang, Qi Z" To: David Marchand , "dev@dpdk.org" CC: "ktraynor@redhat.com" , "mkp@redhat.com" , "dexia.li@jaguarmicro.com" , "stable@dpdk.org" , "Yang, Qiming" , Kevin Liu Subject: RE: [PATCH 2/2] net/ice: fix TSO with big segments Thread-Topic: [PATCH 2/2] net/ice: fix TSO with big segments Thread-Index: AQHZ6wJVaLW951Z9T06QTzdmUYaqGrAkxZ5Q Date: Thu, 21 Sep 2023 05:48:34 +0000 Message-ID: References: <20230919140430.3251493-1-david.marchand@redhat.com> <20230919140430.3251493-2-david.marchand@redhat.com> In-Reply-To: <20230919140430.3251493-2-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|SN7PR11MB7705:EE_ x-ms-office365-filtering-correlation-id: 86fb38c5-5c2b-4bee-f08c-08dbba66652a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vem5dxCnSCF5gV0/6IAAhu57LCjPZDD5QVJ/58bN2G9gs2zOyNM9BC5MCB2rTXOw+Irh01Sn8YvXWXIx4tWAR/SeXaKmuT/eWQROin0Dr8w4MePBZzT+iOqRnlS5hGy+KVdZfP1IO3Rl8SPEbahO7jHP2cA/YkAbXuGkEDwvihyaFWBM8C+7TjJiV0w7U/Cb0Ip6WPJGKwMFfk+uLvtSFOkrqmV+EYmb6BW2/k5mNiLSFjswkZwAzNj6FyZPiphyRVjcyguK45oLKCAh90TXeed+GzhjaXdj17yEQLqgfrxgQ0bRW6WSB3ReWlbKTd2tE0SHteTd5mwzefv/t/5l5ku8bUlPhYOEwMf1car6SwMGQlZeO1O1OyzOVlW5xo70JXS4lv7VGEBTRVRFWwnm5mPNREHQSqPxjZCbUTy5NJv8oDHRdMogPK5q7FHwJlZbd/+NSqKPlmBi37Nnr2rX9Da+8OBp4tgO9k6USztDhwqDZSwVIMPT/XZC8amdsNuQgSBxypLmOahZ7NImcAD2QJybhJtdQbPKVzt35Ogb662OqksSl+IUc7RTWVZjTQoGi2TVCmj2SCqsgSI27VwJs/wsOXi36HnzgRdFC/+drA8= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(136003)(376002)(346002)(39860400002)(451199024)(1800799009)(186009)(41300700001)(6506007)(966005)(478600001)(55016003)(71200400001)(26005)(5660300002)(2906002)(86362001)(7696005)(52536014)(8676002)(122000001)(82960400001)(64756008)(110136005)(66476007)(8936002)(76116006)(107886003)(9686003)(66446008)(54906003)(66556008)(316002)(38070700005)(53546011)(83380400001)(33656002)(4326008)(66946007)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ht36VfK79wd5TJpfmVc348MHJ5GquxlsPKQF49mfJy1aTqeHHIRsnobOG1ji?= =?us-ascii?Q?Wv3F9VfXwK7cUe455PVVXqUSOI+AFti/PDaLi8gyI959NY52Ja7idi6SjJcw?= =?us-ascii?Q?a4wQ00BhAHu7kEJ9qYdal6SQxSZpzXE6dbuBdJ1d2itNWEVMJJ7zJ5sCuTii?= =?us-ascii?Q?qUliziShHU7O9WLVeV2Auyln2F13b9LzV/95M04Wevz4MCUbpBQqXeRzn9yW?= =?us-ascii?Q?mXK0FbMQozzJzPotGnmXYtfZQBRCqS3oqnn3/xlkZPqxxTE57CKnfPLoC1mf?= =?us-ascii?Q?VfatEyxSJ4KLNVseDAWzoZZdAWy48TEnUGNAERmgvT+g9jcyKnlMOTl5mJ/z?= =?us-ascii?Q?BvG7gqCROrW9t9rmsDnj87AIz2CNzK2jp8DwiJbNvTZORL5vbfSEukiPzQqc?= =?us-ascii?Q?5ZU3+wjjRDe7a6ShnDY1+NQHB+NUDeMsN4SGgL3u+NTiCJOIxRdjFgZ9k3co?= =?us-ascii?Q?w5aE/0IPPP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?us-ascii?Q?wcXJNbGvCSqFFu1NBxSpl881DGRJuBB7phVBLY+hQ/6SYRnMSSvaOOAYyikv?= =?us-ascii?Q?B7rWmP5AEv6SVF8I5tnNQMlRzHcs1mkCltYw2ubraV0nzHpvErhHBGkuiKDa?= =?us-ascii?Q?eJrjXwjNFKafQTbBRaxUsBZw1NBjrg+7OevOc6Tq0Z3Ns4t7vQWKkrh2TPwi?= =?us-ascii?Q?0aLG6hp4CY2+ILfi2YkovIATFbwBuZbY9q+wKq8U?= 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: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86fb38c5-5c2b-4bee-f08c-08dbba66652a X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2023 05:48:34.9718 (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: WLj0ZkW4T7306xsDezLEJSyJjJjGmzGzfPWAde7MaL+YF3f9VHCEu6sOqAxtrb7QOAL9UwrHp7oGmmPwperApA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7705 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: David Marchand > Sent: Tuesday, September 19, 2023 10:05 PM > To: dev@dpdk.org > Cc: ktraynor@redhat.com; mkp@redhat.com; dexia.li@jaguarmicro.com; > stable@dpdk.org; Yang, Qiming ; Zhang, Qi Z > ; Kevin Liu > Subject: [PATCH 2/2] net/ice: fix TSO with big segments >=20 > Packets to be segmented with TSO are usually larger than MTU. > Plus, a single segment for the whole packet may be used: in OVS case, an > external rte_malloc'd buffer is used for packets received from vhost-user > ports. >=20 > Before this fix, TSO packets were dropped by net/ice with the following > message: > 2023-09-18T13:34:31.064Z|00020|dpdk(pmd- > c31/id:22)|ERR|ice_prep_pkts(): > INVALID mbuf: bad data_len=3D[2962] >=20 > Remove the check on data_len. >=20 > Besides, logging an error level message in a datapath function may slow > down the whole application. It is better not to log anything. >=20 > Fixes: ccf33dccf7aa ("net/ice: check illegal packet sizes") > Cc: stable@dpdk.org >=20 > Signed-off-by: David Marchand > --- > Note: there may be some followup patch later, as some additional check ha= s > been added in ice_prep_pkts. > For context, see: > http://inbox.dpdk.org/dev/CAJFAV8yOa3ShkVdEXHfnmOEmUTwV3e75Bu9U3 > OqpNc5usTt3Rw@mail.gmail.com/T/#u >=20 > --- > drivers/net/ice/ice_rxtx.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c inde= x > 64c4486b4b..80c4284200 100644 > --- a/drivers/net/ice/ice_rxtx.c > +++ b/drivers/net/ice/ice_rxtx.c > @@ -3685,9 +3685,6 @@ ice_prep_pkts(__rte_unused void *tx_queue, > struct rte_mbuf **tx_pkts, > int i, ret; > uint64_t ol_flags; > struct rte_mbuf *m; > - struct ice_tx_queue *txq =3D tx_queue; > - struct rte_eth_dev *dev =3D &rte_eth_devices[txq->port_id]; > - uint16_t max_frame_size =3D dev->data->mtu + ICE_ETH_OVERHEAD; >=20 > for (i =3D 0; i < nb_pkts; i++) { > m =3D tx_pkts[i]; > @@ -3704,11 +3701,8 @@ ice_prep_pkts(__rte_unused void *tx_queue, > struct rte_mbuf **tx_pkts, > return i; > } >=20 > - /* check the data_len in mbuf */ > - if (m->data_len < ICE_TX_MIN_PKT_LEN || > - m->data_len > max_frame_size) { > + if (m->pkt_len < ICE_TX_MIN_PKT_LEN) { +1=20 > rte_errno =3D EINVAL; > - PMD_DRV_LOG(ERR, "INVALID mbuf: bad > data_len=3D[%hu]", m->data_len); is it still worth to keep a debug level log here ? and it's better to unify= the logging method in the same function. > return i; > } >=20 > -- > 2.41.0