From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680069.outbound.protection.outlook.com [40.107.68.69]) by dpdk.org (Postfix) with ESMTP id 2262E2B8C; Mon, 12 Nov 2018 08:21:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Me0vsescp3CIR1N579e/uMU5+NzgABCenyzkJFvff9k=; b=SxljzyOqamXJsVO3zOEgpVja7tx5uLQZKj8xm29O3B2a5XU58FpVBSkdaTv+L8RZi5nhxTPap4L323bZn8Pemie5QZnt3e45J/eUNBqipjPzC05ps3wZ/PqF0tTS4jttA3DYXJKWEf4Ua3T3e4t8WpLq45Lri97O6Qu43uKDDPo= Received: from SN6PR07MB5152.namprd07.prod.outlook.com (52.135.101.33) by SN6PR07MB4750.namprd07.prod.outlook.com (52.135.77.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Mon, 12 Nov 2018 07:21:43 +0000 Received: from SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::49cb:b2a:974:2211]) by SN6PR07MB5152.namprd07.prod.outlook.com ([fe80::49cb:b2a:974:2211%4]) with mapi id 15.20.1294.044; Mon, 12 Nov 2018 07:21:42 +0000 From: "Verma, Shally" To: "Dabilpuram, Nithin" , "dev@dpdk.org" , "Jacob, Jerin" , "Czekaj, Maciej" CC: "Nilla, Subrahmanyam" , "stable@dpdk.org" , "Dabilpuram, Nithin" Thread-Topic: [dpdk-dev] [PATCH] net/thunderx: fix Tx desc corruption in scatter-gather mode Thread-Index: AQHUd/AuSS2AzzKAgEaWUfJgiWHgWqVLwLHg Date: Mon, 12 Nov 2018 07:21:42 +0000 Message-ID: References: <1541742633-798-1-git-send-email-nithin.dabilpuram@caviumnetworks.com> In-Reply-To: <1541742633-798-1-git-send-email-nithin.dabilpuram@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB4750; 6:rEAHnLSdJt/s3oDDmyfUVcX/9fdpEAgI7i5eaBAwPAHpeu7zCFZrhf4bpRMawJvtoXgP2cKCl6BuiHy8uRm7kLwbZbQD+LZkKW+FcfsbTvYCJOdOtS3rygrAVAnUfHpjERoYi9kW9sdLSCyYk4PKvOhtWCH3iDEZtHbEIfDR6q8m0z6uAVPn4PmBfOCarlsmmrdTL1NhAWVpJXwt8zsgLBv4E3YfH6jnC+swoDLKMSXlI5LiRe4GcbGKWAFfcvZenIg+XG/YWWGO1m9SLjWpABZUQ2ndf3cx6zoYApGvmBPd72aMachWwi+KIogMCL26RbXU6UZqV8gYVFFMA5OQSBI+7I1CMCTLX/+ej/KrXTDJmeLZZuqpjG1KH3LDt0U/pTrS3ByVix7sAAVAgVY8aGpOE8dLxLkzacABYcGwkxi74298uw1/4M/Lu8hKpIKVi5Cw+ijF/sRg42TaS/H8XQ==; 5:pb5cboQRG9ViWfze6jksuCm1Vhpd6doqU6iI4klyE3+4Jmv347xtNjMai1onOK/GQCCmAKy2aQiZIjVMjmx6fnSI6jfNbSsm/7ITeNgVGlqyRK2odR/DX8vib2tJ1HZFU+GZHoj3C197CAf1resJpMjTimencoNZHDmKGPJKD8M=; 7:HxqFJhmTX5cwYEKoh4ZVPA9ZpOiV4uxjv7HG785+uLVNuk6g/zKOqzEdlfnZEliNuz6wK2LULv8a36qxUpXbmODX/q+SrXfsuKxLhdK0zd0yNWCb8F76dUt9Jvv7EYfTeU4W5VN4tyD2AoyeYZw8cg== x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(39860400002)(366004)(346002)(136003)(376002)(396003)(13464003)(199004)(189003)(99286004)(7696005)(55236004)(76176011)(229853002)(11346002)(6506007)(72206003)(26005)(6246003)(107886003)(2900100001)(54906003)(476003)(8936002)(446003)(9686003)(486006)(450100002)(55016002)(110136005)(5660300001)(4326008)(86362001)(68736007)(316002)(53936002)(2906002)(6436002)(7736002)(66066001)(2501003)(74316002)(14454004)(106356001)(25786009)(71190400001)(105586002)(71200400001)(6636002)(186003)(33656002)(102836004)(478600001)(3846002)(6116002)(256004)(305945005)(14444005)(81166006)(81156014)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4750; H:SN6PR07MB5152.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-correlation-id: e4d21696-9816-407e-5a1f-08d6486f7ece x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390040)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4750; x-ms-traffictypediagnostic: SN6PR07MB4750: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231382)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB4750; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4750; x-forefront-prvs: 0854128AF0 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: XzOQbYZk0WPSczTN4b2BmUL1pe+tB957+do4kcdNqI+r8x8LUjDdEnMLPwIFq4Ca7BDUBhUa8vXgc2Sh9F1u7eSHnCeT0fhmXNL+RXGIwav92ZmD7qe2X/suEKFG9Jnn6VhXFQyJNvRHzatH4gWv1oAIuzYIz4RGY5EzJo2rsd/P/gxujDM3Ts2/DJnBiwrawwqUouM/pd2rE2scz5IT92t6VscdLqaGuQMB5iEE2jBpnm9X0BUxCwyzOUjq6mLDlxwfFaToZeEl8qNZyGoPEKdmVCrJmK58olAT8EtQepqJdgPf1uX3RMgpa677tosabWrXMbnXGNACFfKKEOhqJW3yy7BGcVW3kW3BNi2ahtU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4d21696-9816-407e-5a1f-08d6486f7ece X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Nov 2018 07:21:42.3795 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4750 Subject: Re: [dpdk-dev] [PATCH] net/thunderx: fix Tx desc corruption in scatter-gather mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2018 07:21:45 -0000 >-----Original Message----- >From: dev On Behalf Of Nithin Dabilpuram >Sent: 09 November 2018 11:21 >To: dev@dpdk.org; Jacob, Jerin ; Czek= aj, Maciej >Cc: Nilla, Subrahmanyam ; stable@dpdk.org; = Dabilpuram, Nithin > >Subject: [dpdk-dev] [PATCH] net/thunderx: fix Tx desc corruption in scatte= r-gather mode > >External Email > >From: Subrahmanyam Nilla > >For performance reasons, word1 of send_hdr_s >sub descriptor was not cleared assuming it is always >having default value of zero since it comes from fixed >offsets of SQ buffer. >This is causing issues in case of SG mode because, >the size of send command might change and hence the word1 >of send_hdr_s is not always at fixed offsets of the SQ buffer >and hence not having default value of zero. > >This fixes the issue by clearing the word1 in case of SG mode >for every packet. > >Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx") >Cc: stable@dpdk.org > >Signed-off-by: Subrahmanyam Nilla >Signed-off-by: Nithin Dabilpuram >--- > drivers/net/thunderx/nicvf_rxtx.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicv= f_rxtx.c >index 247c356..1c42874 100644 >--- a/drivers/net/thunderx/nicvf_rxtx.c >+++ b/drivers/net/thunderx/nicvf_rxtx.c >@@ -61,6 +61,14 @@ > entry->buff[0] =3D sqe.buff[0]; > } > >+static inline void __hot >+fill_sq_desc_header_zero_w1(union sq_entry_t *entry, >+ struct rte_mbuf *pkt) >+{ >+ fill_sq_desc_header(entry, pkt); >+ entry->buff[1] =3D 0ULL; >+} >+ > void __hot > nicvf_single_pool_free_xmited_buffers(struct nicvf_txq *sq) > { >@@ -204,7 +212,7 @@ > used_bufs +=3D nb_segs; > > txbuffs[tail] =3D NULL; >- fill_sq_desc_header(desc_ptr + tail, pkt); >+ fill_sq_desc_header_zero_w1(desc_ptr + tail, pkt); > tail =3D (tail + 1) & qlen_mask; > > txbuffs[tail] =3D pkt; >-- Acked-by: Shally Verma Thanks Shally >1.8.3.1