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 69523A052A for ; Wed, 23 Dec 2020 10:42:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3360ACA39; Wed, 23 Dec 2020 10:42:33 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 43E7CCA39; Wed, 23 Dec 2020 10:42:30 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0BN9UoDa002442; Wed, 23 Dec 2020 01:42:29 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0220; bh=iasjBH2QJu5TSeBfQxiYkDb2hzEARHopEFlES4iNeiY=; b=H/SimwMsgP0xl6fMVvmfeObHzYkbPO/QYklSZOL4KWibmm57QYKlqifrBmbnJSw7z3cy /c5eQVPcWknoNfJJ1Hjm7lZkgQ3y7DvjdjQDxclZKzTb/g3EKCLbgPNlxFesKn9y5mK6 5gLVQUhk89KGU3WOsCR0jmfcZWN+6hRwNpDNUZ7KysT6L+3FMKPPGD5Gvxlx0tmuXG6f ePKaVlSA1UgUcjBuxSqKzcnGFPFRfGuYXGaihqjH4jcSnvcw175SEm3bWblDPnxV5twC 2oQrPGNT+sbXTRW4LymfcB2I2XoqR9fS3TDIdU+a4hEWpk8ZlE9VZpE3vgtfcGQVmtjZ Bg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 35k0hx5n9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 23 Dec 2020 01:42:29 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Dec 2020 01:42:27 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Dec 2020 01:42:27 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 23 Dec 2020 01:42:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFjkm2vNL/TMxyEEwvGpodzotL56VpTbcq4sc69NUXDJ0puKkFYVe4Gv0uKoi8ng6Nal72U0s2+5I5CB53ol8l43eBj3oE+NUjuU+Lq6/5IRkHyyFKPXnq00/XrJsmyIUQ0BFe0sVY8HYMqvlrbC4gWPKXeN7sym5DdDUvoOIiSC+3crws/7SKksUBhfCCsVgXXepk/P/wbIPxdrNi5NqnBft39VBmdFGiPrwzIZyh5spQ+GZYyXYyVKD/ozAcTRffgy7xwQWtAP9RdUmd6Xbx2RVYSJzsiT/k4qF2BHyQzZogMmdhf5dKBFmPCK8CaL0u87/QLf5D+DEptbB6QrLg== 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-SenderADCheck; bh=iasjBH2QJu5TSeBfQxiYkDb2hzEARHopEFlES4iNeiY=; b=RuEZpOQEEyZRKS3sTFptvw4rd46J0SNGMuj2rCPxv2DN7JxXod9LfnSChB1COAteB7th9lhWQuPZ8t+HNgQ0LdGJqAoI354CrHOlmVLgTsupsbA/UApL7VwIfEpYcSWcDwtpUuWrxn+xss78TyEYdZDolxGxGc4r4qTlXCeQKbclfrBtET5DIDsDOKq4qBHoFv8XXafOy0JQpmJ0mvix4LZRsLYkwRAn9d9yL3eukh2X9Eg7O055pv4c5zXNRKAgg5wM3T91XNpHQ34qct1XGcdJ6RhEIa/P296h0QUsQQb2X1U995RDDGq7vxh76sNtiXTASJrc4wAo/xA8nkOHmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iasjBH2QJu5TSeBfQxiYkDb2hzEARHopEFlES4iNeiY=; b=A3w3AM6nYWvzcTwSAmxtXVm+dwrnsOXlXvSfr3rYoFwXZlydF2GRbUL1SbmnB6Y6ooujMXScYdZXmwolYFax06CJzy8JnWcA5VrrA5c24nz6KEv+sZYYWWU11ZVo/HHgx4eRhRyjaVdkXQXlUH8M69DEr7gyQrlg2bA7t1foMh0= Received: from DM5PR1801MB2058.namprd18.prod.outlook.com (2603:10b6:4:67::31) by DM6PR18MB3603.namprd18.prod.outlook.com (2603:10b6:5:2a5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Wed, 23 Dec 2020 09:42:25 +0000 Received: from DM5PR1801MB2058.namprd18.prod.outlook.com ([fe80::303b:5c79:93c7:b432]) by DM5PR1801MB2058.namprd18.prod.outlook.com ([fe80::303b:5c79:93c7:b432%7]) with mapi id 15.20.3676.033; Wed, 23 Dec 2020 09:42:25 +0000 From: Michael Shamis To: Liron Himi , Jerin Jacob Kollanukkaran CC: "dev@dpdk.org" , Liron Himi , "stable@dpdk.org" , Yuri Chipchev Thread-Topic: [dpdk-dev] [PATCH v1 05/38] net/mvpp2: remove CRC len from MRU validation Thread-Index: AQHWyJQFrltUQH9c1Uu7W6cuS4C1N6oEjqSg Date: Wed, 23 Dec 2020 09:42:25 +0000 Message-ID: References: <20201202101212.4717-1-lironh@marvell.com> <20201202101212.4717-6-lironh@marvell.com> In-Reply-To: <20201202101212.4717-6-lironh@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [83.130.154.133] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3a56c7ad-a94a-4adb-2b5c-08d8a7270e5d x-ms-traffictypediagnostic: DM6PR18MB3603: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IkdYRog2HGgvgMJe9Wm9YX8AOJYiHsCsMGPmXy70mxkgJ+wPN1AxO/i3rZgsu9mtZ1kpVzIjPA6B8ZAtpMYCOxgHg5By/csZMOpUYFxdN9Mvf/gs54SMYVnrAyxid0YSzA7K1w2cLVbxSAEScTxzsqjRs8+nMsVf+vzjq+DgZ/K3jpLLES4PBKozU3J03Tkl+GcA6kfO40JBSNXTz3TBqw6E0MwKzA1EFyyvG2VeY5QF0MoM2R72Wb/i6YCjsSP23HCxVVkBgJ4oGt7gBR8ABENZy01zYOqJVp3ST5aabLnCK4JhkvHOlHWMFsfDyD9U84JBa/fYtypzdwrX0HoykntkwDSkuurUuAMsKhi93z+8n4HkdGhiZGkby4n0MzzoxOSl2kfAypcesBT6Jdc2aQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR1801MB2058.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(346002)(366004)(376002)(396003)(66446008)(53546011)(54906003)(450100002)(66556008)(52536014)(66476007)(66946007)(4326008)(5660300002)(64756008)(107886003)(33656002)(9686003)(6506007)(76116006)(55016002)(6636002)(86362001)(71200400001)(478600001)(7696005)(186003)(2906002)(110136005)(316002)(83380400001)(26005)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?77jDSf800SwLZn9g8pwKwi0qxCjXvJ6s3Qf0VSp3wHhl3QQC6i4/x1UXcmM+?= =?us-ascii?Q?g6BIr/UsvbSJkMYyq89WRPzJFnQ0VJ7ZgZKLkXmI+jIlKy9gy4vh1zTJ9cmp?= =?us-ascii?Q?WtBU++IuXahJLppjND7axNXaW+DEpzcPy22tW5WNA2r32+mJBQx0f9H5CH2J?= =?us-ascii?Q?rhn5L0vg5JV0sY/1Ra8QvN8mhcg48v9Z5efFMns0MJDqfbW8EZs0ZbhWTwhm?= =?us-ascii?Q?5cGxsSIBzWYTidLrUfrsq+XRY08prGTlDg2cX/7cp5U+xFCDpbTi5EXTdeSh?= =?us-ascii?Q?isl2y2zhF0b7b0WhmDCxfsjC3G89WkB8agTG0juK49q97lY/uPH2xHEqhQmG?= =?us-ascii?Q?4eDWC7PcHoczxrIqTK5dPPwfqkecK8MbRGqPI3VDgTF+l/uwZg76YDW4hgYR?= =?us-ascii?Q?tAK9iZhtrRV9Q+iwXcflGRN9+dTsyc9rPeZXciOKnQVa6d2gt/BM/bRODmSg?= =?us-ascii?Q?zeKdPDVDy2hE0bjXmMnpjcAW7q0c7ZJcYy5DHV5V1U+3RfBoJFcR4nn4JKcV?= =?us-ascii?Q?FEaD1LAYkHbzl4vIItRk41dEX7vgl6UZK/GoIK9+jEfp4VD36P2nzp9cw1qL?= =?us-ascii?Q?tBmy07uQl5xZjFCWdZ20ft1DejciRdCPZ29M9wjzDy/UrNjD/YusMSszjkup?= =?us-ascii?Q?ZTtbGVbubypxsmkjyAU1fe3myOFr9nbXbCm6RrD0BGK+7xqkS4A48OkxHFQC?= =?us-ascii?Q?rRImCVgkVR/1xw2+XD58EwDNqmsWKk+wfVJaobjTtw2xijmxSwflkRN/EKfI?= =?us-ascii?Q?nzYYLtCeroKBWod9SY/UYb/d3t6mYY8Vbl8DN5GA3zfudYioJeuMZMLzpbQf?= =?us-ascii?Q?1h976Dm56Q7AhxALqZWLxoMJepnKK4trjrHGL4akQLDMLUNftcevuM8jwUO/?= =?us-ascii?Q?DoLia1XZGMSnjmOQMy8FJo7WCysZn9FdQZvjqTt99OZpsITmKWuwhxS1WrU5?= =?us-ascii?Q?SIjWQPeGKOgpiySBcVQnZ6YT1WITS4AIjcNOVTRY+YA=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: DM5PR1801MB2058.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a56c7ad-a94a-4adb-2b5c-08d8a7270e5d X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2020 09:42:25.7666 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wZZhgrNgHCc5IfCS+KHFtjG5S09r7/jXviXqMQ69VreWm5Vu6XKQLSuUXsI8lutuI6m521ISzNX/FVKATVQMeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB3603 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-23_04:2020-12-21, 2020-12-23 signatures=0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v1 05/38] net/mvpp2: remove CRC len from MRU validation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Reviewed-by: Michael Shamis -----Original Message----- From: dev On Behalf Of lironh@marvell.com Sent: Wednesday, December 2, 2020 12:12 PM To: Jerin Jacob Kollanukkaran Cc: dev@dpdk.org; Liron Himi ; stable@dpdk.org; Yuri Ch= ipchev Subject: [dpdk-dev] [PATCH v1 05/38] net/mvpp2: remove CRC len from MRU val= idation From: Liron Himi CRC is being removed by HW before packet get write to the buffer, so CRC le= n should not be included in MRU validation Fixes: 79ec62028 ("net/mvpp2: update MTU and MRU related calculations") Cc: stable@dpdk.org Signed-off-by: Liron Himi Reviewed-by: Yuri Chipchev --- drivers/net/mvpp2/mrvl_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethde= v.c index 0985ccebe..dbb193496 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -441,8 +441,8 @@ mrvl_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) * when this feature has not been enabled/supported so far * (TODO check scattered_rx flag here once scattered RX is supported). */ - if (mru + MRVL_PKT_OFFS > mbuf_data_size) { - mru =3D mbuf_data_size - MRVL_PKT_OFFS; + if (mru - RTE_ETHER_CRC_LEN + MRVL_PKT_OFFS > mbuf_data_size) { + mru =3D mbuf_data_size + RTE_ETHER_CRC_LEN - MRVL_PKT_OFFS; mtu =3D MRVL_PP2_MRU_TO_MTU(mru); MRVL_LOG(WARNING, "MTU too big, max MTU possible limitted " "by current mbuf size: %u. Set MTU to %u, MRU to %u", -- 2.28.0