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 E18E4A054A; Wed, 7 Sep 2022 19:33:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84D5F40143; Wed, 7 Sep 2022 19:33:51 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by mails.dpdk.org (Postfix) with ESMTP id 52A70400D6; Wed, 7 Sep 2022 19:33:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CjYRqqmUg4kH4Ose6ehYo1XD8driLGeMjyL7F23im5ixTkylcE7vZGzD/ZGgOqjsRnQB4FSvMZHtYG4wLBeejdcJ/PoUhZoxmoRgaST/6wux+ePbLU0ipZo9INUB1bAAba/mSVG9Hq6s8acHRCvv8B6O0wGs6LMDfFVF4FTntKE5gktyIWvpP8WQuPoGM3hfZr/sMw1ESaXIZDEnFrQcPmd6sVwvuHH1YIMjiAPj+UkdLmn8xVPoi+gqT8oAlccMO2R9BODvLev03TNoo4Rt1JpjGPHlSBIfexKbcYex8wbqk/nTsyFNiBEIsguucGwknGAUC+TG3PdMYcZp5VGmXw== 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=LNShfvopSsPgc/Jbs0+jAL2dhP49MzZMoV17Fcp9ds0rNLiGFMC0RsG5c2/+JUcb8mi4e/LACsCWZaV7JovrGWrTfbPw899LC7jm0DaCt+rvLDws2gXGhGKms2uyE6p2pmiET57dNrKS66Z0FLI+LQVFtUm+pifEUIz295HRA4bTDgqXd5r3bo/PjWFO/cqpTvp5joWSv/+SDPbkEGW0W4vQk0TqWU6/iCUT0msny4HwwG7u8exyLitiHfQBlCAGgFU3oIa3AlxEP1AXI9iEGb7pZDvoU2WMcDcPutmWjEwG0BgoNfTRxqg/mFRBslrTl40+fJuHXlVOEKCYBmABWQ== 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=G4ZaleX/18xj2ZahtDnba6YG/FIf1QlAS8GJ32ZCLZ8vC6iCvBI4Y6GFi0w3caBQWqcedijgFWGBaucR2Tav+J50jYTv5wrCYv1vOMKrUII082N6AlwsLYA518YISrpGOtK04koP09ej8pGAPT+IQX/hHufNeqvm+lNL9v0lgg8= Received: from BN1PR14CA0003.namprd14.prod.outlook.com (2603:10b6:408:e3::8) by BL3PR12MB6379.namprd12.prod.outlook.com (2603:10b6:208:3b2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.18; Wed, 7 Sep 2022 17:33:47 +0000 Received: from BN8NAM11FT065.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e3:cafe::d6) by BN1PR14CA0003.outlook.office365.com (2603:10b6:408:e3::8) 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:47 +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 BN8NAM11FT065.mail.protection.outlook.com (10.13.177.63) 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:47 +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:44 -0500 From: Bhagyada Modali To: , CC: , , Bhagyada Modali Subject: [PATCH 1/3] net/axgbe: reset the end of packet in scattered rx Date: Wed, 7 Sep 2022 13:33:24 -0400 Message-ID: <20220907173326.124914-1-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 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: BN8NAM11FT065:EE_|BL3PR12MB6379:EE_ X-MS-Office365-Filtering-Correlation-Id: 85521345-1adf-494c-8d99-08da90f71e9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WPEmPDVFtLPi8UOtZpGVoE1DaMzjjYShF/UZlaZ53/FCPoQ3UeOdKriaAH8mudJGG5ngk1RDBlv/x73nWjOYE/HH/hr3mQPcvNQ23Zh9uu6h56taev8lK3zRe9hqOrWhQmzBXkBxRPz8UrRqC0tSO6sllyU/3UCcrYNDyXIKJFqPn5Edj7i9yM1JXVAYQecyfb4husb+KsxbitoYLTe7oqkB3UsucEMGbqJlvdLCHEDQ1NrbdYi79pfFR6qtnHPd64CJDaVCZBclxryT82L2e3Qj78c1ZhRqX3tImHtyNzEt1LA+sAvxERB2LvqOcG3/Duvp0rTkrS2/FvHCuoCXAHyg8qh95cC8tWRhVjMnEU8/mwn2TdyWI0+/5DrMxTPLMhkSTHefsIwWpJRAa11MZMyCpHtO0XG6DIxamRRPFduTHvBHr1a3MhlnZrOxKaD+FQoJA/6eX/5NwWiDjaiCG28wHlV8/koEFJ5AoVAyGmk8KXce4dRixQEJZV7HEClrs3j6U73F+gIHZQVdgETnDdmjucD7HQcPYNohYTEnOFPxu56QxKPpCT8MlScmClty+01PDONiUWkWpQ8TDdiWjHeYOoDvBB/AU+G5+QuT0n1c0MXgLHx+MmbaZLQsgtR7oHSXBlcSVn4RlUqjgER0tRYT2CDb+NDLrX39JhY2J47dycrIJZWHWMbefbLXvWwfyK87pSB8spFIypBg7p06suQe6A02sO6tGutERpRXfVAYpje0bYysHZf9tEEc8WV9Q4Oaf2Khpt6iS7IA2YfCVmFZYkBLdBwYgTe4g9sZKLCF/rwyMpOhSEY7TnB4ZJDjFI+gGDFysgDaPEAzZyvnuA== 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)(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:47.0816 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85521345-1adf-494c-8d99-08da90f71e9f 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: BN8NAM11FT065.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6379 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