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 2317FA0544; Fri, 2 Sep 2022 10:48:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13D58427F6; Fri, 2 Sep 2022 10:48:26 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2082.outbound.protection.outlook.com [40.107.237.82]) by mails.dpdk.org (Postfix) with ESMTP id E59F140684; Fri, 2 Sep 2022 10:48:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fDVZ2n7e/5KRwfpK3vqdJhUVHFDZd/wzWEoXhJhTGLkSui9nvB8rSE7G0VvCwQt6MMGWoZwE9CtnFn4cP+6mj9hqAiAtbimP6OM2KIe7o/c8On74hW9UUZmXqROI6FUax+nlwQ/PJVr/n1/Ey+Ux2flSOW0uCq/pvc0rCF5F5g//4JUCp6GrYk5+yjM5teNI0c7AGlKrNB1HjT+9Ufdn81+UD/6O1h5vO+O9ZvPXwvTE7gSqofMqOw2e2DaVoZxAfSxKMH/0/m9/GxDt+/x0RzVqcfNDDLlefxn5DoUdyAEElwfTJtIfwuOdyq6aFL2XC10CNZiwbCtGxcYRqjszcw== 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=j9f3ira0StvLzqF7mEy1rmO2vPLhSz/0l7yYy2u9iUE=; b=cWS8Ixl7q7XdJJQVzxDKDTOyrJiCndcCG1HAtlD3vG32pC7HmkC+X6QVv0Z4cYN/WIixcAvh7+s8SdLOG0bnMEa+587ur6hwJN1FW9TYt5askdVJbOVfu8yhSIQsswo4OBwZepKsx9Okk7tRjs/4ZjT3DE9taM9VABGA4AHN6v/0IjSvrsoaizYLy71CzPB8Ih4qk7nkk/jNMamNpOzrK1UArvxBue+Vi10MimUOcsNmyn3AhkbnWHuyiDdloiMmdChf2JtrhRACe/bKcydNd9VBKwITBsGHkcGaRx/PpUR00th+xEJiSxZ89okGOLKZW6/BtcePm8UatQ+3RJoTEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=temperror (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=temperror 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=j9f3ira0StvLzqF7mEy1rmO2vPLhSz/0l7yYy2u9iUE=; b=L6oblG2uAZxnhkJXEpwz7WuifY8MtYdG8Bl+/vrCXxqdD8wUPLn/oFKk2mRpnSdW1QPXmqsrVE9sJHdEGkMTUI97pCROokk6NZSqXd30rXPHAHwQmWqN6C+8+CL5zc5XxfDcJ7wA6vl5jv8LTButxrZxoKKqPlq6Y9gDkXWAqAk= Received: from DM6PR07CA0124.namprd07.prod.outlook.com (2603:10b6:5:330::34) by DM6PR12MB4960.namprd12.prod.outlook.com (2603:10b6:5:1bc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Fri, 2 Sep 2022 08:48:22 +0000 Received: from CY4PEPF0000B8EC.namprd05.prod.outlook.com (2603:10b6:5:330:cafe::d3) by DM6PR07CA0124.outlook.office365.com (2603:10b6:5:330::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10 via Frontend Transport; Fri, 2 Sep 2022 08:48:22 +0000 X-MS-Exchange-Authentication-Results: spf=temperror (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=temperror action=none header.from=amd.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of amd.com: DNS Timeout) Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000B8EC.mail.protection.outlook.com (10.167.241.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.10 via Frontend Transport; Fri, 2 Sep 2022 08:48:21 +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:18 -0500 From: Bhagyada Modali To: , CC: , , Bhagyada Modali Subject: [PATCH v3 2/4] net/axgbe: fix mbuf lengths in scattered Rx Date: Fri, 2 Sep 2022 04:47:52 -0400 Message-ID: <20220902084754.99884-2-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: 72d39bdb-fb89-4ca5-7c2f-08da8cbfe3b8 X-MS-TrafficTypeDiagnostic: DM6PR12MB4960:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GoshddOUxfDln5zFtNB38Bj+rrYWvnH2afZ2Ehsh/tCGcIipKRNxxOunXDQzbSek/QPZe1G902WaCtrXMu014F1Iu2+ouPFALdEiz3/lLQS4weMpFHq/ystyxj8rR20u1ohHdqA/gwcLGp60X+sFEYinDzIGLIHxHyjC4yOZrHu3jf85M7zRiiofrmvZaH4rV5qdVqJnleOQilt8lxNOdCUmtgrIypGFs9yiMsGhFQKWMKLgOyZU61zNv5YdNvDcuinazxBIsPRooIsWPjGO6TvagKOzGeB9hAh+79RY7nR18qsnkjkyC3TXQrJSsjhVL1PtHCFaZR7s9mpl0bdjtpszknxLOPcQ6zMp474npYNNF51eI0viuf6cUbYGfQtmdAjj6hZgWqJHuxfd6+egaumveLNUJVUzd5OnSznCRr96X7czc3orI/24/WbwbIH9lHIq8YemWkq5v41paBPauztmGgKQedOjDyV/SERzIOwRdSvQ+/3Ih2iCOoXQFeRiFcLqukoSN7SfcDBxqg20YkKW3PPbYSCZA9ofxcbqd7oSjK33tC2ju9knD4k4nYXwXJQ7vUh9JvQdaI/WNseJUltbqz9YjXQTRonQ79ZPrA/f7FDJb4jz9b4NqPBHc8gKUipRI5V94eS/hNMMsCQZujknWahMkZ1TcDCnygPEMVbZNNaK6Hy2xLPB0oGinhbwwlv7IUuJj2JawIbuUFJc5VAroNbu5UClmc8gXyPo6Q+kU2+88gJNIMJBzRvb+5QqbxNTIxqnHH/k8SFWFdhjE3/sRZUe2bjgblphy+KfYtj+sWldT8f4dE7d3yTBbPJ5M72MFvUNUWxGt2nl87eVXQ== 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)(346002)(136003)(376002)(396003)(36840700001)(40470700004)(46966006)(7696005)(16526019)(26005)(426003)(47076005)(336012)(2616005)(186003)(1076003)(4744005)(44832011)(8936002)(5660300002)(6666004)(41300700001)(86362001)(36756003)(478600001)(36860700001)(81166007)(40460700003)(356005)(63350400001)(63370400001)(83380400001)(54906003)(6636002)(110136005)(82310400005)(2906002)(40480700001)(316002)(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:21.1944 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 72d39bdb-fb89-4ca5-7c2f-08da8cbfe3b8 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: CY4PEPF0000B8EC.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4960 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") Cc: stable@dpdk.org 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 89ed6fd74a..2c2554e900 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