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 0722EA0548; Thu, 8 Sep 2022 05:32:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D465427F9; Thu, 8 Sep 2022 05:32:15 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2051.outbound.protection.outlook.com [40.107.92.51]) by mails.dpdk.org (Postfix) with ESMTP id C1666400D6; Thu, 8 Sep 2022 05:32:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T5ls4bc8LQLf5lPi/UKmDSCiB1LliLQ1rRn7vZ9gDZkf8Bmz15ohZ55Pj7V42F8U7Tc5PM89g+jfIMVgUnacHyxdmx71fpBh7FFm+SD2jcmS7AimeTDyKwdI7ocJGU4iYtFU8OfdLDkoJdeh2SjmKRqGpOhEl6mNZvC+IgGisKRYnG5o+uY0c7LOpkbCCqUmo87JcSfCImyaEXQkyN3NKSCMPpH1/EvORku4ToMn2M2X/mGWp2QfYtRRm/oSdbCZkhe4Wzi5Ok5lKQtOW3RwSYAbgr0L8I6Z3NSFq784mLHmRC2oSyvlbYozkmixA1xz7zz4TGc/3MzPdIXrZg5ZqA== 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=3RweBnZRfzHvR9GLwmMBcE7amI6TGOaaD3jc1JozoUY=; b=Nqot42rr0h2U+LfsrG4ZqSpLzDoHm+pUyIi0zpjQg17FVkqVZT95IEj83paClc49x6X8w5ASuGQBJ1vPic4awSKNpb02gCU/Qg1RQQjB7WcxntXRtOLnf9MKYFVjwTvtM8Zojyx0AqCQ3FXjSpa9PX8P4dgiEbPaRGHnt0wEIg2R4yuP5cl/s/6efFt7e5Y/8dbzJ5tHacgQ5+VlNEIysrTKYc+dzJx+/Gk5Ce1FkgCHYqgDhivqfVnC49MfdsE8ODNdLuJGfIuVfjf4mAr8aPV2vQvzmc/c2L5hzPeZ3KUfiSoQbkkhxxLbqzK8BEPPFmfmPuejWWdqwvAPGIG/3g== 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=3RweBnZRfzHvR9GLwmMBcE7amI6TGOaaD3jc1JozoUY=; b=TGnJCjNBxWLlHmh46txe9VltDFtrHtheOV5emYS9wRKLzcM/GMjksIWD/0zXSsMRfMpfrUJi0b1+ljgvoAhIFrZGxPaSL+wr6OxBcFUyx/KiHGCeHRiJmT+V4trtzlGgxUitVPjxMxOftFucQAR+qZC+d0ywMy1sRme9jML1oM8= Received: from MW4PR04CA0070.namprd04.prod.outlook.com (2603:10b6:303:6b::15) by MW4PR12MB6874.namprd12.prod.outlook.com (2603:10b6:303:20b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.18; Thu, 8 Sep 2022 03:32:10 +0000 Received: from CO1NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6b:cafe::e0) by MW4PR04CA0070.outlook.office365.com (2603:10b6:303:6b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12 via Frontend Transport; Thu, 8 Sep 2022 03:32:10 +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:10 +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:32:07 -0500 From: Bhagyada Modali To: , CC: , , Bhagyada Modali Subject: [PATCH v2 2/3] net/axgbe: clear buffers in failure scenario in scattered rx Date: Wed, 7 Sep 2022 23:31:08 -0400 Message-ID: <20220908033109.126547-2-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908033109.126547-1-bhagyada.modali@amd.com> References: <20220907173326.124914-1-bhagyada.modali@amd.com> <20220908033109.126547-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_|MW4PR12MB6874:EE_ X-MS-Office365-Filtering-Correlation-Id: 59d77527-86df-4369-e7ef-08da914ab6df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TPP6vtQ+q7dKmDhRcs5PQVoG54IdyqOIdgNOXsEmefvSrS4pY7g5yJvT36MAeLxUjRYzKqJ/HT0ctN3QCn6lFBFvRjIOQGyWEF5C3ZuduZl4ZA8J24G8jNBseSDufBciioEmH6E0jKZ5f/C5KvKDsHchcThI7hcWboXUvI7d9YmeOQH5HuyTDa7wbt3Dia9IxS14gfVSiYIaUlxyClqBRCohNqHA8VQQGgRj0z0jjehN905tmLrGs8oB1XFHn77Gf7g1H6hiZSH+5PTKICqulX52IB9RraUKMoUaXeyHRhNZPj81xtupbsLnCRrAU8GBmC+JeIKS970wZqYaqChrXwxvmn2r2grPzJNJFjnGqS9ADnsc/yNEu0FffFOrIjr3wID/ekzREYGnZ7SkUt7g2d9+QOZj5Auajz3zx0ZGeFIn0RnWyBf6xnshUKpDfYaqn/0sQHEdWW0VqTzVPvlFkifjif/yAGZ/5mGQqtpGX6oyda/ZQ/I0aBj7RIMxYGTsjEL+0i7JuZUTbnWtiC49Kpg9Yd4u/lH/hNFWdr2pWDU83VJUVnyu9hcfgXz8uz81Qie+Aue+zChGM5qyV9C3AuZCkOc74qZOHIphACmO44IRe/f6BFd0C0/thbVf23vwDO8Pbh1ZUuadoPS+e9q6etctFYNIYQY8iN9hF1T4bEHAoObfpaODTR19VjRXVBh52qsmy0PfsZ2Q8rDLJtFWgADIHf6qoF+yd3itDPVlC+uQ9u3CC+zUz9IqRoIDXhl0cBM4OBC1Glc6Vt97cJa7mmxy1n0J0Jpwo2gIyTBxEL4/Jzk7MQJCkxqmtN0lSTcanHAnaAzr97ZaEebk7uFJfA== 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)(136003)(346002)(376002)(39860400002)(396003)(40470700004)(46966006)(36840700001)(356005)(2616005)(450100002)(6636002)(336012)(16526019)(1076003)(47076005)(5660300002)(82740400003)(70206006)(70586007)(8676002)(316002)(40460700003)(36756003)(41300700001)(478600001)(186003)(110136005)(54906003)(426003)(7696005)(26005)(86362001)(8936002)(4326008)(36860700001)(40480700001)(83380400001)(44832011)(82310400005)(81166007)(4744005)(2906002)(83323001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 03:32:10.6206 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59d77527-86df-4369-e7ef-08da914ab6df 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: MW4PR12MB6874 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 Clearing mbuf, first_seg when chaining mbufs fail. Increment the error count for the same. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Cc: stable@dpdk.org Signed-off-by: Bhagyada Modali --- drivers/net/axgbe/axgbe_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index e1488483bc..c1f51ed6d6 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -418,8 +418,10 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, if (first_seg != NULL) { if (rte_pktmbuf_chain(first_seg, mbuf) != 0) { - rte_mempool_put(rxq->mb_pool, - first_seg); + rte_pktmbuf_free(first_seg); + first_seg = NULL; + rte_pktmbuf_free(mbuf); + rxq->errors++; eop = 0; break; } -- 2.25.1