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 2A5F6A054A; Wed, 7 Sep 2022 19:33:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABCAD427F7; Wed, 7 Sep 2022 19:33:55 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2081.outbound.protection.outlook.com [40.107.223.81]) by mails.dpdk.org (Postfix) with ESMTP id 9D9F0427EB; Wed, 7 Sep 2022 19:33:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bj+Qw6VIREEmqcAQmfLj/lhaWpzfYihurHmGqNSVvut1qap8dNHVNAZSNkLDkWeGP1+pwgTxTZTTQmiTsX0WqaHvBnjizkytY3Y228+uyIMQmG4LTPQFej6tS7tvTfUVN/WvTlpmWccz/ejTk63meyjen7WUKL4OBIzJ+Rqhx1mQUiz+aQjYcOmGm++j5s61QgSXbq6Gw4r8s/rell4/J7OkRj7WGGH3AmENOSVeekClMzBmydN4w+bjZX3RgNFohbibAia4mbLBDaSlWwjYypHeX95g+jxEJX2s35JoLUhYcfXW46JUGnenFRZPeeTe35f8NWaC2PXs30r9N/Q2EQ== 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=Svek0rlqmVTLsNtFFvMCw1F6JDOwkbNmmVEFMFqwNpCOAJvgx+Jx5XBiqxQ/OUilBxtIb0Cpbx48BfCQkTmBzKdcq+SfyTX9qJVMF1HPVMI/BQ4WF44KQwWajelt6wrCGMFbvdKf5+KdeMH5cNdS6x8gqkif7HZ7zL4zS4lclxAevn/xIWVqKoe9v+qL7CySLAjhcnJQKugjYE7M3paG4MOaZvXlHTYzFqr/QWGSAkEGkPkz903KhAThefioMuTGAiGBP0HO+HTDuFsh5ZHRCQmc+vIosV1EVtLLXsQuaC2kGsAkIE9gDJLl2NPt26jiZI/4ewbcHhdqdHkjRubtVA== 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=ACieTi68g0a70H21He+ztPb6T+wjb2C/pjVzOJ1qrrO6COm8aZIEk/QPI79C69y3MjEzhFaHdEj2KJEeR+6aHOQqjKm3uGYh759e1/6jhR+QK+H0Bee0Ghqpjrxe5MY3KzoBBHXZ4GLTLGFuXoBlbsm66poDldPbyy1PxAoYHac= Received: from BN9PR03CA0500.namprd03.prod.outlook.com (2603:10b6:408:130::25) by MN2PR12MB4127.namprd12.prod.outlook.com (2603:10b6:208:1d1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Wed, 7 Sep 2022 17:33:51 +0000 Received: from BN8NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:408:130:cafe::e8) by BN9PR03CA0500.outlook.office365.com (2603:10b6:408:130::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12 via Frontend Transport; Wed, 7 Sep 2022 17:33:51 +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 BN8NAM11FT063.mail.protection.outlook.com (10.13.177.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Wed, 7 Sep 2022 17:33:51 +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 12:33:49 -0500 From: Bhagyada Modali To: , CC: , , Bhagyada Modali Subject: [PATCH 2/3] net/axgbe: clear buffers in failure scenario in scattered rx Date: Wed, 7 Sep 2022 13:33:25 -0400 Message-ID: <20220907173326.124914-2-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT063:EE_|MN2PR12MB4127:EE_ X-MS-Office365-Filtering-Correlation-Id: c15e0ca2-8f0a-453b-1d37-08da90f7213c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TMQq/DeFqgee9FW8gYOAcAIUoWfFmMqXyzMTuMhKp0VpEOEWAiednYT48EO/DKpGFb0Q0FSOZ4xGXre/cTwuAz6U6nj0BJwfrVTIDHNqfQf55gxnnw2t17Z6u4O6YeMNdncfrxvWqpf9pYwMqw7JUsAyKeqFh/inpmed45G/toOz5y/ie5i1p0u/l4b09HVQ9FSqxNKK5O/FeEzEzYm5L5Gv2V+j6ZYJs955z1LlIGIGvxfSXWdPZlGx4KO1g68no61DDtugC6jFW3Io/iOIW/GM/MxAIjv1235vLVVsulgE6xZl6NDZ5xBfQCozkXyOFG4R2BUoxJFreMxFCaCepm0dHGdbZlG7WHXQ15mrvSfHS1tp7VO74MLzyE4QQ4GmeYioXCDo8IpYd/G1QqGxgfPmFfn7mq5sgx5+wa6O0AdBLq2sH2QWHJumV0e6ZzwkIeMpxbV70zoYkTBVu+Lz5b10n/BZKnDzxQqa9pcWUBomi2HTeqXgBsNsOMApoCMYZQBRMaYE2kMLOC3JkK9Wey5f3iSPM9l2IZapPNKfd+R/c5+uiqgpNx6s7tnbXoHhk9HqykUL/gr8MCIiY91pakrEtT7zfOEnoh2hDEAz8IUPpHyOC2FhOSSTyw6SMIx1CnvzRuNOG7xqpAPctlkRNDGpRW4TandanLKsPpctyPMG+3tL80fOajLeQzGrNoonEY3XPGkqWrUK1Dh4+U+dn2p2a7Mtd0aD5FQAxXTcmDAMXj0WDHY1aiGMg5Z+wkuONZNyGumyP+5KpBlLmXLFHDgnTUI4TMizGqOtJvXwPjf/oqFuM9091hkZPEtxmvSwzHH4ugs5D4aVo2KJtYqJpQ== 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)(346002)(396003)(39860400002)(136003)(376002)(40470700004)(46966006)(36840700001)(54906003)(6636002)(1076003)(16526019)(47076005)(186003)(82310400005)(336012)(356005)(426003)(110136005)(36860700001)(82740400003)(40480700001)(2616005)(83380400001)(316002)(8936002)(26005)(2906002)(40460700003)(41300700001)(36756003)(4326008)(7696005)(8676002)(5660300002)(4744005)(81166007)(44832011)(478600001)(70206006)(70586007)(86362001)(450100002)(6666004)(83323001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2022 17:33:51.4631 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c15e0ca2-8f0a-453b-1d37-08da90f7213c 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: BN8NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4127 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