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 A8A0EA0032; Thu, 1 Sep 2022 10:08:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0463D4281B; Thu, 1 Sep 2022 10:08:44 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2078.outbound.protection.outlook.com [40.107.96.78]) by mails.dpdk.org (Postfix) with ESMTP id 5F6EB40684 for ; Thu, 1 Sep 2022 07:34:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vg3kNfNTl646sWDOYZREWyNgTWnW6Jike3v9tH18xteDxztUawgjPosVqTTd1bkBTXdJ2tPCNhCUO1Ncinos5omK8IgOZloALIwQAd8QCWVGjtv5jLwRLGAxtfbQ/G7m/CIhhQgXKCnmEwhD//icK+iLoOwZ2l7cD2Kt4u3uy6FoUTt46KrKT+aLPm9nS0oguI3BsZ4ueR5qF1bbNdn/dVdrB9BlfHJ0QjQ0k403y2+NU+nwFHFpXWZnkDXx6y5IHVAqG708AKxNj39nRZSxOUo+m+sX9NcWqTLXjn/mnSUQbYbPil+kRMfuYW05Lvj1c0+Gfk5C9mdIaeHPGLm5Jg== 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=KU8mm3bXKRhaHzXbE+1SYby1T7VY9ZcqRgyfu/LVjpQ=; b=XtBGLkDRr76hyw1M9zysfeXbB2iXHTsGu7TJQdQqU5lVDTfqNgbp5GBev30M8jCP/9GpxjSa+n9hUpyxX/9OhrVYxG1RW5Cth0G0YwDxRupk5AjBdpGnF0GU/GyizEpPHeJD7fYxKua5CS1TX6qWS2UCDD89Mwu7RuV5CfMoQqGLlzSFp/ZjVajP6rf5EjHkbfat1juBw5Pv7FCbeR0/mE/qBaUUCowMgaQ+5HApfI+t3XeLEMrq9rdc4SSnklPXwPPCG/gx1enEZ/KvioKJxUFBp8iSiutn/J9Kt7FhbmAuAtlZf0/BfMrmQLfP277QV/hg0vAFAq89PPpJ/RuFIA== 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=KU8mm3bXKRhaHzXbE+1SYby1T7VY9ZcqRgyfu/LVjpQ=; b=4l6/uthK8jJcXWBwdM1HjTElb1TO7/VrrMDWzHr5wSEgEKCs+aiw1Ubv66ba6o8c2Et3XkBfg5kCZwXy824mCLddy7XzQ8EpxRz2vMvKBLZQRqyuQYDZN4wJC1ZP2xErCVuGu7KHjIi0k8z68Nl4XbrW7Ai9FSjoZhjfM4a4+Cw= Received: from DM6PR08CA0003.namprd08.prod.outlook.com (2603:10b6:5:80::16) by SA1PR12MB5658.namprd12.prod.outlook.com (2603:10b6:806:235::5) 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:17 +0000 Received: from DM6NAM11FT069.eop-nam11.prod.protection.outlook.com (2603:10b6:5:80:cafe::3) by DM6PR08CA0003.outlook.office365.com (2603:10b6:5:80::16) 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 05:34:17 +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 DM6NAM11FT069.mail.protection.outlook.com (10.13.173.202) 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: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 00:34:14 -0500 From: Bhagyada Modali To: , CC: , Bhagyada Modali Subject: [PATCH 2/4] net/axgbe: fix scattered Rx function Date: Thu, 1 Sep 2022 01:33:09 -0400 Message-ID: <20220901053311.92964-2-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: 3f43e45d-7303-4636-69e9-08da8bdb9cba X-MS-TrafficTypeDiagnostic: SA1PR12MB5658:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +EvBBWMcfKBT13bFOLbm7je815fTmYOGrlhQciwNZ28K3Tu/1rmqes6njMWlXAOOmQsLnxdsNNPv5mGFFR60yMvofXixOifuT8ZJsZgeObn8VqDgT2rhd2IvSJDbGcsNk90nle/IXWsrsK5LaJ24KJvczkCgaKFrWoO6RjZelTvmaV8dsTX9+czOjTsY9byoMxBDJZb/IsLXxSZ2BIZB1CqMLqtLYoVnjNvuL38xpKUUdPpcVIdNc9Vu2d46hCBSY4/fnNsUTlkW3mV0Nxm5D0VkoS61Wur+zJqyvd9rtuTZX7Q11u5cq/C4FiQyqjSWgDgQ+CepqOJ9QrSHWBmxMTXm7y2wU/tpKFVz+9Okg5FeNCGH3MOkb+TlYpWr8g8MFXcncTnrrcN1XT5Gqn9kqplDJy2dVx0LkoGZRhGvrSrQnx9brHhjjrtX5L6tLuMaxNIxklyLbfJAocv0/9tlEJtxFfrOSm45CNbmLnGzCVEUm+ypzQNSsGGHElMBvaSB2QyiFNC2WnSiuuetDd4VXfeieuEAAfWyQukbVtTnm37J1co601gWN3zGggk5AwErcueuqtN4NCiAb4GYMvPDEMNQAJhv2gteOC+lNvg7xs/X+XW7lTT9HxuIgHEkbAPxn2chDM7qRuoFJ1ywpVs/l8iGDWtLDgHLknMSsdkCFIYB1TgI//7U9oLtrz0akJ4CsIUbXWxrXW9iiBjvwalkPdXl0mZ8sGGARicu0ffBc5HoMJ6bfk3G4fplpYi2PPnzMIX2kYZFve5YEBt9JnsekhjRWRoMZu1Qsp+KpT+63u+YSqZoTPNBxsvrdGLxUe7i 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)(346002)(376002)(396003)(39860400002)(46966006)(36840700001)(40470700004)(8676002)(54906003)(5660300002)(4326008)(8936002)(2616005)(426003)(36860700001)(6636002)(47076005)(2906002)(70586007)(110136005)(4744005)(44832011)(36756003)(316002)(1076003)(7696005)(41300700001)(6666004)(70206006)(478600001)(86362001)(26005)(82310400005)(16526019)(40480700001)(356005)(336012)(186003)(83380400001)(81166007)(40460700003)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 05:34:16.8970 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f43e45d-7303-4636-69e9-08da8bdb9cba 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: DM6NAM11FT069.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5658 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 pkt_len and data_len in the last segment of the packet. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali --- drivers/net/axgbe/axgbe_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 6909d3a852..3594421e08 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -391,8 +391,8 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, } else { eop = 1; pkt_len = AXGMAC_GET_BITS_LE(desc->write.desc3, - RX_NORMAL_DESC3, PL); - data_len = pkt_len - rxq->crc_len; + RX_NORMAL_DESC3, PL) - rxq->crc_len; + data_len = pkt_len % rxq->buf_size; /* Check for any errors and free mbuf*/ err = AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, ES); -- 2.25.1