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 3D6A7A0032; Thu, 1 Sep 2022 14:50:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8C4C4282B; Thu, 1 Sep 2022 14:50:19 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) by mails.dpdk.org (Postfix) with ESMTP id 44640427FF for ; Thu, 1 Sep 2022 14:50:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h77Fd0ejU5ZCWa52HCgB/sH3R17PPqEJRkqHQ3xl2bB79la0RV9/hnZzi/YpAs6Ric+VQnYN9rvycxxqZ99pBflMs8ABhoUlQALwkR+WikCQOfD+muZz+XzaeDcc00iNAC+2DMRQxhKOOuRbY0la1Day73uxjPtd/8WA79GL0IqbeI4ikzGgohJ4b+62vgnSoHIA/TGtGpm3RJ10B2v4foD6gJtnwLML4Wzsnnb62oPMZvVeM6G7BJujhEp7BFvTdghCdIB0dqUO2yqkqMtZtsIOlqb6/QuLx2SI8kj+pjrGPFPzLeX8R3uMrL2OelL+rgadS/Ygcu7Yyj8rmUBO/w== 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=UBLd7jXmGnkAL5dAcA5BkoIM7ZYxo137548CnFK8EBo=; b=dYWBd9vW+DYi5rQ7xKNQHoKVvH2HV5gQxAmTV7zlQGq0nGBplptmBLfeKTQeNVaK5SMBaJF5TsbyShxd8aHn5SI2yQPpBUc17UgaUUG9MyhtjvUX/DsM5kJS9lV/D43slJrt5eBtV2Iako5WRjc3i9wCZh4vScQayKntGbGqfzfzo25TJRI7nvT7oR7IIrF5t3nu8gZ+2n9mrRTpeE+RPuN/NTiRG2H5tS4+3bygsDTuizcUGSQusCbw7Hoobu/DyIUWKlasir50LxA6EmrnxFjKbD4QMI0UfdXciQ4bCw0xfMti8XKC+VPZSu23cTXdFrovdSLGxbT4xcrhgoZpRw== 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=UBLd7jXmGnkAL5dAcA5BkoIM7ZYxo137548CnFK8EBo=; b=k71f44w6j8LSeTsB1hPJJWg4dA9I57ZCBPfcLpIQdfe9S2OyOT2BY/FOizmuPDdMGM9Uv6t4M+PKLCJPpqCIlSa7vweoGE2onQKk+hu/CoGUXPIT0aKkcW1AorKK2RV4kHqNkPrSmqJBcPxC5O6wWP9QOJFdr7F8NslUqNX7aqM= Received: from BN0PR07CA0004.namprd07.prod.outlook.com (2603:10b6:408:141::22) by CH0PR12MB5329.namprd12.prod.outlook.com (2603:10b6:610:d4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Thu, 1 Sep 2022 12:50:16 +0000 Received: from BN8NAM11FT067.eop-nam11.prod.protection.outlook.com (2603:10b6:408:141:cafe::c7) by BN0PR07CA0004.outlook.office365.com (2603:10b6:408:141::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10 via Frontend Transport; Thu, 1 Sep 2022 12:50:16 +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 BN8NAM11FT067.mail.protection.outlook.com (10.13.177.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.10 via Frontend Transport; Thu, 1 Sep 2022 12:50:16 +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; Thu, 1 Sep 2022 07:50:14 -0500 From: Bhagyada Modali To: , CC: , Bhagyada Modali Subject: [PATCH v2 4/4] net/axgbe: fix checksum and RSS in scattered Rx Date: Thu, 1 Sep 2022 08:49:48 -0400 Message-ID: <20220901124948.97063-4-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220901124948.97063-1-bhagyada.modali@amd.com> References: <20220901053311.92964-1-bhagyada.modali@amd.com> <20220901124948.97063-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-Office365-Filtering-Correlation-Id: f015fe46-53ee-414d-821d-08da8c1884d8 X-MS-TrafficTypeDiagnostic: CH0PR12MB5329:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yikEr2pnBRmYI2j5bXXfFpeH7vGCakQ8mTjgo0YLsHG5twBY3c2jEhxOLuVsfnvs9yh2La74GfcPBUBlbEq6vSzFX8Q7zCPfEObRIrHImgfwVjJImjo/5D7wLUbrcC937BKVsxjvelSHRCjC2csb2ntcAOoEVd6AdLBWWyV2SFpIYhsAicnRBS8I7X4K4omXf+QYtmMVl3Igxrg2LURzi/bLVXpwWHEiYw9andSzYvP0iNzn4KRY2mNj8/8XlPzmHAuxtXkImWTbhbHp03V6XWkdWqDdVqy0I8F9L4tT2K+XWwvtXvh7MpkURIX3dy/G5TQHsbUHZI3LqbQ4wqL8+432O8GpA85L8MGmMvR3ntOEcP4jANE06Z1iqKzeu+rEU+MeM1CTU8nxhRnKXPdDxw28Je/v5g4W+SgJRxF0RX6z8qex1bouLYJ1WzXYstnBI3UcTnIgoM5lWGJngE4DL192IjwwIHah3blHxK0J5uS/lvXXQmaC4zAXxtTMGOCA/Xin8ua7jdb+kS85XKVjOa9kVeTqzPSwjs8zmcqcv9Yj7GmiSsCtYiAfuYptvPxUbR7BlrdOzvaT/wYyjv8TSy5+lprPe17mCEsmVLqRh8poUWKIt6ycFk8Jfk6bGZd0XL/Kg+p95qmvCt3M83yGrNKG/r5zJV2YKAK5hXbB+ClR9i7XgLNU23BINMxIHImippnsgPiNERbyl2s3ifAwFOGXbqi95sNciMd0X7n2OEdc3pgySaZhsU5th+JKuNTJJmAFtzayhbsr3kettfGVSrvpIcSavhWrq5BUCbYLA3BcoTLzjpFOIlnULZHT+85MeA7HtMtVRD+a8VGrjTWH8w== 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)(39860400002)(396003)(346002)(376002)(136003)(46966006)(40470700004)(36840700001)(336012)(16526019)(26005)(426003)(47076005)(186003)(1076003)(2616005)(8936002)(44832011)(40480700001)(7696005)(5660300002)(36756003)(6666004)(41300700001)(86362001)(478600001)(82740400003)(40460700003)(356005)(36860700001)(83380400001)(316002)(54906003)(110136005)(82310400005)(2906002)(6636002)(81166007)(70206006)(70586007)(4326008)(8676002)(83323001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 12:50:16.1606 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f015fe46-53ee-414d-821d-08da8c1884d8 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: BN8NAM11FT067.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5329 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 Updated the RSS hash and CSUM checks with first_seg instead of mbufs. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali --- drivers/net/axgbe/axgbe_rxtx.c | 41 +++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 7c07fd90ef..2bad638f79 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -427,24 +427,27 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, /* Get the RSS hash */ if (AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, RSV)) - mbuf->hash.rss = rte_le_to_cpu_32(desc->write.desc1); + first_seg->hash.rss = + rte_le_to_cpu_32(desc->write.desc1); etlt = AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, ETLT); offloads = rxq->pdata->eth_dev->data->dev_conf.rxmode.offloads; if (!err || !etlt) { if (etlt == RX_CVLAN_TAG_PRESENT) { - mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN; - mbuf->vlan_tci = + first_seg->ol_flags |= RTE_MBUF_F_RX_VLAN; + first_seg->vlan_tci = AXGMAC_GET_BITS_LE(desc->write.desc0, RX_NORMAL_DESC0, OVT); if (offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) - mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED; + first_seg->ol_flags |= + RTE_MBUF_F_RX_VLAN_STRIPPED; else - mbuf->ol_flags &= ~RTE_MBUF_F_RX_VLAN_STRIPPED; + first_seg->ol_flags &= + ~RTE_MBUF_F_RX_VLAN_STRIPPED; } else { - mbuf->ol_flags &= + first_seg->ol_flags &= ~(RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED); - mbuf->vlan_tci = 0; + first_seg->vlan_tci = 0; } } @@ -468,18 +471,24 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, first_seg->port = rxq->port_id; if (rxq->pdata->rx_csum_enable) { - mbuf->ol_flags = 0; - mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; - mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; + first_seg->ol_flags = 0; + first_seg->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; + first_seg->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; if (unlikely(error_status == AXGBE_L3_CSUM_ERR)) { - mbuf->ol_flags &= ~RTE_MBUF_F_RX_IP_CKSUM_GOOD; - mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD; - mbuf->ol_flags &= ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; - mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; + first_seg->ol_flags &= + ~RTE_MBUF_F_RX_IP_CKSUM_GOOD; + first_seg->ol_flags |= + RTE_MBUF_F_RX_IP_CKSUM_BAD; + first_seg->ol_flags &= + ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; + first_seg->ol_flags |= + RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; } else if (unlikely(error_status == AXGBE_L4_CSUM_ERR)) { - mbuf->ol_flags &= ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; - mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; + first_seg->ol_flags &= + ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; + first_seg->ol_flags |= + RTE_MBUF_F_RX_L4_CKSUM_BAD; } } -- 2.25.1