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 D8D09A0032; Thu, 1 Sep 2022 10:09:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0572242836; Thu, 1 Sep 2022 10:08:46 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2068.outbound.protection.outlook.com [40.107.95.68]) by mails.dpdk.org (Postfix) with ESMTP id 8268640395 for ; Thu, 1 Sep 2022 07:34:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WofZB6y1rHGIJEaLK6KQA53LUH4xTzpSKTnacjvfaIZ8hH1Fq+9b1dcJu6XV/JXezUn3lEm08TzkN1ZyRpO8uoLO73Uu4zzTIUDHMV7HBOr9Wo1UGqVeYnYAc6FGsW3GF9GXfSCgee/bcgVLj8ei9BimNcnMngGoU0udUk1PxPTCqpLskdJT36TlijtsKAtLPxpiPxQlwKWjPGM5FYKO0SZWBJBRvEKbEeF21GqW9zlhv8hEnkNqm0N8mA8OVk6z+DRBe0XD3FRQMGz7sLO32xvwAbh1dc2ZEP6PxUfFll8SkkZrmyci/6P+xpMRo5fb5VzbRzMdAT6CmiHQaOzg2A== 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=URApiAKSYDnSiZzykkM5HVYLmrYwfbhOs4Q62Cn+Exc=; b=ZNHezWt+u7C/Bwe/3pEl+HybcVkD0vOwB2iMTFmzn9J/pZR0fheMwN480wu4rC9F1Ey2iL/CsC3ynCgxqqV50IE1yzmT045YYCljpAp+8wn3+rDVQ8VXzSsowrhfXcC9D6n48zkWLO7SkEap+FSXbTOCTKQ64GWjpgwd8ZrEba8eq+j6gVNmCiXZawRtWChcs7U8STH9j3OG30Qvr8ZXNECZltV4qdzuU8z7Ym8ACt1P9eZnongn6/WZ5wPmOcOFjGD8+4XjUtpq2SkBik9mEkGTMBe2sn+rRY7lXYHSEJnRErDGiw3lZbUBB8Lns9VbdlWJe3UTiOg0VyKwo/VtZw== 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=URApiAKSYDnSiZzykkM5HVYLmrYwfbhOs4Q62Cn+Exc=; b=0xhihQghaiIbmE14qHxlPlPPr8C9IwSv3coS33qazJW4loOdKfQ/DeXQsNPVfsdcL63/Y2ygvSWrbEziHgRYuqFLSFYPVEs+cHr1EjnMI+RChRmGL76OrnZCFo+U5xW+ijSHqXcJydcRaCEWO1LGo80zO2GRtsZ82uLXd49ectY= Received: from DM6PR10CA0012.namprd10.prod.outlook.com (2603:10b6:5:60::25) by IA1PR12MB6164.namprd12.prod.outlook.com (2603:10b6:208:3e8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.21; Thu, 1 Sep 2022 05:34:30 +0000 Received: from DM6NAM11FT033.eop-nam11.prod.protection.outlook.com (2603:10b6:5:60:cafe::ef) by DM6PR10CA0012.outlook.office365.com (2603:10b6:5:60::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11 via Frontend Transport; Thu, 1 Sep 2022 05:34:30 +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 DM6NAM11FT033.mail.protection.outlook.com (10.13.172.221) 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 05:34:29 +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 00:34:27 -0500 From: Bhagyada Modali To: , CC: , Bhagyada Modali Subject: [PATCH 4/4] net/axgbe: fix scattered Rx function Date: Thu, 1 Sep 2022 01:33:11 -0400 Message-ID: <20220901053311.92964-4-bhagyada.modali@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220901053311.92964-1-bhagyada.modali@amd.com> References: <20220901053311.92964-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: 2dfe4522-5a73-4bec-a6d5-08da8bdba497 X-MS-TrafficTypeDiagnostic: IA1PR12MB6164:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E7i4OoRQJ+ofa1jXqw7BsyC6rwQJX5ditxZxU0jbbD/qV6vlpsEpO46CbvS06cjHByO4yFONDDVZNPyKm4hPorpJTH3opscsmowTk4+eLgMitpi+UTrqa5pv6clu/rlGuHh6JJ8trLj8eeFQ/E5/U0EtrIYo8a8Sl84xsDicnp8qbZHJfAbglLfjimwwVFdv2aOKlDCx2tEReXvONu5J/n08cRUCVmF+7akK3EcllLBxr+XkyEB9WjltWs+4uRuPHOlrGbPzSYAMvEtit150jvXpX4AnbBBuA6Zu0ae5m5NvZ0ymDPg6UUmPRhoLOpi9jER1o3x4RKu4PnlII2VTAUREM6t4cRLj6OBfsQ/zGOfqqORLlf3eLMPs0E089aHZ5u3o2cHlRUsoK8MkhU84Se9J2Npg/XgPNJ+MNAXjbQv9N2rNiiz+GnN4zhno2bYoDpYjhTIIBzaG9XlSJ3223j7JVtA4Rk2FzR3lnBr4V2nL3U9h5SItkX9mtbXK78wbKmwuXvZenUkR6en7tJqIWAZHer17I0fLXx+NXnwejRBIGsjqn2oNv4T3Eyi2n4Q+7EEYbG1ZIYjznQJsOp6huBJ+pQTzz2Fz+i3s6TMQbmtkKg8sRMbeRtYIbc6Ye39admKOi4WPgqUc9vslaiQiBcxpDLN6P64cx5XsnETQU4dR7hucLZtTTUzA800CLkcFb0313/DwVDr+zdEITmYWncgqUwe7p4lTyb4RTsxsxGf5fEPxfgWpXJnaLGDFfym9/YjvwioQdJaW4oHn+hGHK9VwUmOhdRg/NsSOb53f1aPCO0E4mEIxLD7cU3rrzE/2 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)(396003)(376002)(136003)(39860400002)(346002)(36840700001)(40470700004)(46966006)(82310400005)(26005)(44832011)(7696005)(6666004)(82740400003)(2616005)(1076003)(2906002)(16526019)(40480700001)(186003)(47076005)(336012)(36860700001)(426003)(83380400001)(40460700003)(4326008)(54906003)(6636002)(316002)(8676002)(70206006)(70586007)(110136005)(81166007)(36756003)(8936002)(356005)(5660300002)(86362001)(41300700001)(478600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 05:34:29.9972 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2dfe4522-5a73-4bec-a6d5-08da8bdba497 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: DM6NAM11FT033.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6164 X-Mailman-Approved-At: Thu, 01 Sep 2022 10:08:40 +0200 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 d3e9368b44..78a32db973 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -428,24 +428,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; } } @@ -469,18 +472,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