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 3739DA0544; Fri, 2 Sep 2022 10:48:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76E3642826; Fri, 2 Sep 2022 10:48:35 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2072.outbound.protection.outlook.com [40.107.223.72]) by mails.dpdk.org (Postfix) with ESMTP id 69FB6427F9; Fri, 2 Sep 2022 10:48:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nk5I0A7BpVcFSHOiOeY9znIcjxua93aHVCUnRpm3M0siuTw6JFLY0KbUIUb5thaj9qS/ESpH6qZ3XSwnkXyhNGB3MQDX5GQAWvFMAT50PIWgj77I5LonlfklP8x188Evv8x0gjgwzBRhLoy7x5cR5GWsnFVnBIbAWcEQhLZLwjs+zSmtoxpKjU5Y6l44Az8O5/uQ+q9Es7vOT6+i2SC/GzEbxL2k9wMoNhdkcqaGPsflMX9l3CUeU843fv/ZHO6N2mysjx00SEnmhu0WWEM5OquZqsH5xulcZJFJEM11NoE+eR0Nfh9XsQDtmRSQx87ZvSvhjyLipuv/yn0A3OVdCg== 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=eAcZzJVfpEDVGVQO24f2o1DyzsW2/qYCg7bCCH/wxPE=; b=PgpAKCUeXJYfsQobcPpdeBIbNgqDIfZHX26+9Kp486xbfNM+B8nylQ6+Kc53aX68LqmlN5QjSRvjfaujyFUE3DD8GHuNXwsddM7T0CLgWTaVYqjX4GIvrldCXYr/+I4sFIe5uGZBfxhllJtar9M+UWB9D23s0TBDBxV2xDMl/qgfOW0p3rDtWQpUu4tGT7t8WLMw4WLaSZIlvW4ebPNACnbGrtn2KokTf8iwJ8Qg1l4IGAWU4ORwCZVLRab3jkw3EtM8kUy7+UbpGCthhG551gC7BxaWBtmPQuPcUtBydHUkovjYG+RffnypfWML396sVUS8jHm5DrZbAURy9aq7TA== 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=eAcZzJVfpEDVGVQO24f2o1DyzsW2/qYCg7bCCH/wxPE=; b=Oft7L143XzeF79HggNcIJpcUo+YT0O7ghG4QtUp6ebQGI0oIg7BlE2Rp5njlPU6uGCQcyOe6kzL++68sqelfUab04PfkVtsekFlvjwxCHmHmEa9tGPD5wL5xxoqAxp4JczO+Ek+7lHM2uG4I9Yi1rN01E1eAtNY11Y63RRRxWNQ= Received: from CY5PR18CA0041.namprd18.prod.outlook.com (2603:10b6:930:13::19) by BN9PR12MB5306.namprd12.prod.outlook.com (2603:10b6:408:103::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11; Fri, 2 Sep 2022 08:48:31 +0000 Received: from CY4PEPF0000B8ED.namprd05.prod.outlook.com (2603:10b6:930:13:cafe::ec) by CY5PR18CA0041.outlook.office365.com (2603:10b6:930:13::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.16 via Frontend Transport; Fri, 2 Sep 2022 08:48:31 +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 CY4PEPF0000B8ED.mail.protection.outlook.com (10.167.241.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.7 via Frontend Transport; Fri, 2 Sep 2022 08:48:31 +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; Fri, 2 Sep 2022 03:48:28 -0500 From: Bhagyada Modali To: , CC: , , Bhagyada Modali Subject: [PATCH v3 4/4] net/axgbe: fix checksum and RSS in scattered Rx Date: Fri, 2 Sep 2022 04:47:54 -0400 Message-ID: <20220902084754.99884-4-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220902084754.99884-1-bhagyada.modali@amd.com> References: <20220901124948.97063-1-bhagyada.modali@amd.com> <20220902084754.99884-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-Office365-Filtering-Correlation-Id: 6166c66a-fcab-4eff-9e51-08da8cbfe98f X-MS-TrafficTypeDiagnostic: BN9PR12MB5306:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DkpVD0HVffJ8HZH66Xs9sXi3e3Wd0g8/EcTPD3TQMqqvZYy5WOl6r6IGkXHOHSiF7jvAC3J69nA1vq4wlPP+2sTGG25Mn8DEaJXAExbe9hbj5N0ettnN1RrEitoTxFWFxOPlJ7iwZ8V3qugEo/zbT2fWx6mOuMIdEOpJBiiKQqbuhcAETXTjj28Pp+3LTFYpUcBGGlKAMTtINFkwAemZSeFfTQaAk8NryPLnZqzlG3agoWE0Ug4XflB+aqePoM0QjCebDzP06ev6MC8ohxsyXvC+Q+MeD1jwHyQm7YBJWQn4/M7L5SNCz48vu3uHS5NnaD7ecNmgHBaTo6EtbqzDJ76mWO8tBdODlV7I6FMuoRVd7h90yu6BHA/WRR5M3d4iFCjKhmHpHwwKzJ7KPqdIiLdf2PZp7JDJRbjHrW8wVX5U2npzlMfYqpO2fAJqhIdIzREXuTl/WlRuYModTpIBBuekZFyfxyNWsrhs0ld7qo3xrfmpHMytR6gDHdf0YhsUuQiXO+sY9UjJbUSNU00sAOvlpPlREFB3hwiyjP13g0pt5qSEnybB6ejzGzM7AnNMr99uUHTNVJ0II6yVPtYZt+vvc77Yk1QAGMxhtguhrLd9VUrGlx4znrk9Y+l2aApwMjX2wZEieJNx5r74L2h3ZGKDkv86k3o5TQ4RGdj0IvnO19EJ1FLIYYYcb9xUb0MJkWo06XX9nbuVaePAdnB43shnr2OPuuZzZd2dwmoNfwytF/U60nMmBAkbnjdnmAcveV1LrFADAVRGEGL4JTpCbFOfnKn3VVKRGWvzGhNR0pOnKQAS329cdcB9veOfpZ0b1dat1gK7611bg/wra6EL4w== 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)(39860400002)(346002)(396003)(376002)(36840700001)(40470700004)(46966006)(16526019)(7696005)(26005)(426003)(47076005)(336012)(2616005)(186003)(1076003)(44832011)(5660300002)(8936002)(36756003)(41300700001)(6666004)(86362001)(478600001)(36860700001)(83380400001)(356005)(81166007)(54906003)(6636002)(110136005)(82310400005)(2906002)(40480700001)(316002)(40460700003)(82740400003)(4326008)(8676002)(70206006)(70586007)(450100002)(83323001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2022 08:48:31.0242 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6166c66a-fcab-4eff-9e51-08da8cbfe98f 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: CY4PEPF0000B8ED.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5306 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") Cc: stable@dpdk.org 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