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 7CCFCA0548; Thu, 8 Sep 2022 05:32:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D0F940DDC; Thu, 8 Sep 2022 05:32:14 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2043.outbound.protection.outlook.com [40.107.237.43]) by mails.dpdk.org (Postfix) with ESMTP id 2286D400D6; Thu, 8 Sep 2022 05:32:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dtJpjehyRsl61PeiLXFBFFmLcqblIL6UN0XPHSyIKUF6pxP/8Yz5f3GcubPK9PljnKfFt/nxGYJJAYueHuExlde9BruRYdtUaSWjpqG/KMYxvUgdEJj1RKn4v8CWBu0c3MbmRTo7CeXVke9BQnw8lZea/nTFd+AI+cy1Fcny4+wLZzL++371u3/pGZfCYsHn5cCFRNKSSDzjhYmzqFUhtR8+mji6XbqntWI4JOuoVRWD2ExynDbY5+1xx6YtxGLcyv+a45pZtAF6/1pCupgCrO2rWQqG13YzZtUJLCkh6zcQl6k5OL3yXBWNp8/BOqwlJNFamPAbCbDPQHGlwWgrpA== 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=usoeaoj0nvA2pJdYdT+wIliV1bHjerO9aLN1FjUZEgU=; b=YtM4ogcIf82tesQcdwuISd68NdymzLa1FeQRAFoiEZFKQwEaPdcNXTbkiooMdQ6J3XGnUVyCh8Xnsxp5sKBIx2jh55jczxXlG3HcJ4L/UWjLyb8lahIh7Ud/VZDA0KNbRmHlpEw5cDtja4qNzYKbB5IkfiY7dO8b99lH9x6+l/EVxPHMX114yMIxLrY7BJe4+L1iJBJ7IsALFMF+pp/8t9JWZGxSCA0GlUbS7pK1EAXN2ZLs9OXgCid+e96x6m79ft3mEVQGVXHBonSIhh6KvVZvu+vjbT1EAemHTVQiNmbOmQBMZE6ZM+nC/6hyKHp82ahJTsUSzlwHgnp+X4rZEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=usoeaoj0nvA2pJdYdT+wIliV1bHjerO9aLN1FjUZEgU=; b=fKV1sFhv//Fm5MoBeXmUt2d5lQ1XhmMV2PS+Xkb/Do0FAq4wXMt6H6G56eD3n5Gy6sa1DSmUqto8PUi7c7rStZLuNEvZXv6NbRgItF13yMrbO5KZiLAsaHAX+jugAi8TRM6zOejjSAPIYMxZ+qFk4lykbGuni1W6iEr/wuoGgBg= Received: from MW4PR04CA0085.namprd04.prod.outlook.com (2603:10b6:303:6b::30) by MW4PR12MB7118.namprd12.prod.outlook.com (2603:10b6:303:213::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11; Thu, 8 Sep 2022 03:32:10 +0000 Received: from CO1NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6b:cafe::19) by MW4PR04CA0085.outlook.office365.com (2603:10b6:303:6b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14 via Frontend Transport; Thu, 8 Sep 2022 03:32:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT011.mail.protection.outlook.com (10.13.175.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Thu, 8 Sep 2022 03:32:08 +0000 Received: from cae-Selwin.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 7 Sep 2022 22:31:25 -0500 From: Bhagyada Modali To: , CC: , , Bhagyada Modali Subject: [PATCH v2 1/3] net/axgbe: reset the end of packet in scattered rx Date: Wed, 7 Sep 2022 23:31:07 -0400 Message-ID: <20220908033109.126547-1-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220907173326.124914-1-bhagyada.modali@amd.com> References: <20220907173326.124914-1-bhagyada.modali@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT011:EE_|MW4PR12MB7118:EE_ X-MS-Office365-Filtering-Correlation-Id: 8974b038-c493-40fc-32c9-08da914ab5e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JmC3UDihA7VRt96ZwzGPrp6Sb7AlsVHBsjn+7UunAMXfltO08TtpqONHe3EY7XtfMf3XbFCoVusLHd7lpfqIOSdFTe8WVnqo6S2St5xHKBkUC4o0nf/25cXqQ9GcRQixAilOMJExE4gA+SzmdKZMNM8mWbMJ1nlGy5E6sTUGpbVXjeXv9/4XMLsqGIMJt2N/py366ES1Ww8OXpo9BpupNjW3cSD+mXt28A89p8LzX5U/k47aHyeLQdq6+oS5MSHzB2XeFusKG+rmeVE0FeIfyl9oEgmtXiPAl6nflRJbVvcnmIIm/5rrwijUY+USUCb+SDu8g1nDFBLmt8K1tXu7iBJIpUnNq6zK2uhWIho+SGbleGvFu+5fZKhzIoKSrJ9+z7xPDwAN54KB5cxH5m6aLPbiv7TWDt3bSkM0X2MNgBu0dFs2Td+Iv2L+tAfVSoLwuvERkRd8dRvxlDxqoTkiHp3mkKLsz/5Mra58Jj8znmvhh3GC5YZc/MleCcETG1hK/NkKwG4NKRgw668BtTIJKgy4hqTUjnV3R/6og1Ei7LdHVdGm5VPr50xclIfBOYuoDmFVrl/VD8lyPo+pwn4+WnMgOmSYolmbWxxd6k60GPAbj+5lMOR2akGLEqKvkmHLLuJZ91w+VWW3nECKnC3jf+eLNZtYPzqex1DnpwgJ53UfSUnqpk9ViRNPndFy/ssZB2/WbGJp5uvyfMDc4yCSTIXTYz7QxWNN/8xfh2XetZCogl93vZZXuhR0fC6uLbvHGyV3BwJg6jRlt866uYvCUDPvaGYqhcx8UFDweiL9kZY8U9iWfIQGsHL3i3GhQ4NtY9j8i2hPUDVc6QLplfRiTA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(396003)(136003)(376002)(39860400002)(346002)(40470700004)(36840700001)(46966006)(478600001)(8676002)(26005)(54906003)(6666004)(110136005)(7696005)(47076005)(2616005)(336012)(4326008)(186003)(6636002)(316002)(16526019)(83380400001)(5660300002)(70206006)(450100002)(70586007)(41300700001)(2906002)(81166007)(82740400003)(36756003)(36860700001)(8936002)(44832011)(426003)(40480700001)(82310400005)(1076003)(40460700003)(356005)(86362001)(83323001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 03:32:08.9801 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8974b038-c493-40fc-32c9-08da914ab5e3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT011.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7118 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 Reset the eop in the failure scenario and also after the last segment. Removed the packet length updation explicitly as it is done in Chaining. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Cc: stable@dpdk.org Signed-off-by: Bhagyada Modali --- drivers/net/axgbe/axgbe_rxtx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 8b43e8160b..e1488483bc 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -346,10 +346,11 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, uint32_t error_status = 0; uint16_t idx, pidx, data_len = 0, pkt_len = 0; uint64_t offloads; + bool eop = 0; idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur); + while (nb_rx < nb_pkts) { - bool eop = 0; next_desc: idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur); @@ -416,9 +417,12 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, mbuf->pkt_len = data_len; if (first_seg != NULL) { - if (rte_pktmbuf_chain(first_seg, mbuf) != 0) + if (rte_pktmbuf_chain(first_seg, mbuf) != 0) { rte_mempool_put(rxq->mb_pool, first_seg); + eop = 0; + break; + } } else { first_seg = mbuf; } @@ -462,8 +466,8 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, rte_pktmbuf_free(mbuf); goto next_desc; } + eop = 0; - first_seg->pkt_len = pkt_len; rxq->bytes += pkt_len; mbuf->next = NULL; -- 2.25.1