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 0B693A0545; Mon, 20 Jun 2022 10:40:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12C56427F1; Mon, 20 Jun 2022 10:40:44 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2122.outbound.protection.outlook.com [40.107.21.122]) by mails.dpdk.org (Postfix) with ESMTP id A37DD40150 for ; Mon, 20 Jun 2022 10:40:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MgWh/IYqZLlUmtuALXLLPxD+Km1I/zZuDryTmxAMeHgrR6tpG1HXAyF0qpYOSuPbVmfGQQKWYc2uhHJRkm7abGyjfFIRTnwG7zI34hN/uIHxMnRj6h17m8c+wHFtezKdAZHqRRIsB0i+fEbmnQJ3nKzZtFVmkNe0gMtDoNvqpcIy+r9bwGo7bn3T1kBcDkO8N4YJUXp7KCghBPOsJmbAGSdRQoNBhi823etRL6C/ruDPE+WU9I3FZC+Kt6AtSkUb1nIq6LhPSuv/pMH4s8OMRHXkVo+Wp5VBrNQbaTgX9Yy3ipDXKceeB8j1cdOe4642QHFD2eF4F3fjlhlHrV+vOg== 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=ps0NLCw9zeQzJbgTh4V2l3dxGg8CVj+TdVn8gJoXt2E=; b=fl0FCpZOWlSDR0Y2lOEXCAQDqfYrJdof6/1dt0xM+ERlg6S38Iuu9+i+ca1Hd6QVVi3kP0ZAiynGl6aI8PBMMKtfA1qceiVvpoWnvyzh1YXcgDEUQE84nPb0cOh+Yn0JIUIatC00zLf+/Qn6IAoGtiRaetHZnP2fndYpHnl/xM4YwOZ8t9DjvW8XVy48PF8H22cOwJcx2G8dnGItkOCOioYGz95bG3ftwo7wdIzD/5GXZOtWOhecNOCe3iIZ1J+i//O+JNY1dEK/ImYQxMELHEj267nQxqdw3XpHFhkr2IIUrE5aFqd68+PxSrInLF5VYYBSr7jRmpQZJO9H96TMyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cgstowernetworks.com; dmarc=pass action=none header.from=cgstowernetworks.com; dkim=pass header.d=cgstowernetworks.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cgstowernetworks.onmicrosoft.com; s=selector2-cgstowernetworks-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ps0NLCw9zeQzJbgTh4V2l3dxGg8CVj+TdVn8gJoXt2E=; b=DzfBj3dP9h7k7cvbDNuyLPMfyDg1bBtYZy3UtOg9+BnHlxeaQykDmcZ+fDbjRH9WatcFCsX8e6+CuApvOIj4vu+HUmkeZKsKveadHPcRrkPM1Fk1RoaGzLKROX9hC2hJ+j/AWZ1Z6FlFnPguGgqq8lqZdKybD3Oyp3pj3gXviNE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cgstowernetworks.com; Received: from AM0PR09MB3972.eurprd09.prod.outlook.com (2603:10a6:208:195::21) by AM6PR09MB2824.eurprd09.prod.outlook.com (2603:10a6:20b:a5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.13; Mon, 20 Jun 2022 08:40:40 +0000 Received: from AM0PR09MB3972.eurprd09.prod.outlook.com ([fe80::d0d6:ba99:48ac:5e72]) by AM0PR09MB3972.eurprd09.prod.outlook.com ([fe80::d0d6:ba99:48ac:5e72%8]) with mapi id 15.20.5353.022; Mon, 20 Jun 2022 08:40:40 +0000 From: Ido Goshen To: ferruh.yigit@xilinx.com, stephen@networkplumber.org Cc: dev@dpdk.org, Ido Goshen Subject: [PATCH v8 2/3] pcap: support MTU set for linux interfaces TX enhancment Date: Mon, 20 Jun 2022 11:39:43 +0300 Message-Id: <20220620083944.51517-3-ido@cgstowernetworks.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220620083944.51517-1-ido@cgstowernetworks.com> References: <20220317174347.110909-1-ido@cgstowernetworks.com> <20220620083944.51517-1-ido@cgstowernetworks.com> Content-Type: text/plain X-ClientProxiedBy: VI1PR04CA0122.eurprd04.prod.outlook.com (2603:10a6:803:f0::20) To AM0PR09MB3972.eurprd09.prod.outlook.com (2603:10a6:208:195::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24677231-11d3-4584-e8a9-08da52988e74 X-MS-TrafficTypeDiagnostic: AM6PR09MB2824:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IQZW8Qo+k6IsTJUY7p/jVnCkXxRYAlMXih4DepKxMJ4jx2yEdczC2kR8bRe4ygXvjR8uPqy6dekrG78EGTfD9nNMn8OqqCZpCGxp00SyaCfn1Xjig+vHTI5xhu5Mgcec/MwU7/JcVtKZeP4sCD3r10LrB/tRStz5CHQgS1C++lvRqWMwVmHZewvXAXX3i8ptoWnCbzdeOS5djh0Q/K5tu2t/Wsyssn5+GgJUIMrTH63qh2T6UBGd8R6PdHjwv1QYF824DkVmL/hshscvo8LyKmAIDb9SqabfEuRHEX+t3dk6piSWH1ZnN2WCP42m4mXc/lh6XuDw3em2AXNpl6k2ct0CfdwTZA3bevx/PDE/lbqBcwU6eM6TF/HdXFtn6xnJVyyB0EWKl+VZPgbQgNyNf7eNW+rMWvl8oU+H0xTnNbUq1GfB7AWBAuMkprncgP15EEr4+srnwx11jUONCCgw4vcUT3raBLgYKHX4D18CnaM18iZDgsMVkT1i6/TcRAI5kenDaR6GWxAaGn0DD8CP1wg1MuuQckx6MKTKbPigTKZF4SHWRZ2dqSzhaDqYIdMRQ7p9IpvYb3Q+DsPUBI46pjILIJnD5CoZjgH5q4nRcF6Ix/bHibPwj+a1zE26W70bCIjBZfKgN4HxNAn44kX0RzLALRx4uYpCsQYjZKvqFXtcuqOxE9mfuywdJM/OLfEDwKrrQcYECaE49c4RzzmGtQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR09MB3972.eurprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(39830400003)(376002)(396003)(346002)(366004)(6512007)(478600001)(8936002)(41300700001)(8676002)(6506007)(52116002)(316002)(6486002)(36756003)(26005)(2616005)(4326008)(186003)(83380400001)(66556008)(66946007)(107886003)(66476007)(1076003)(38350700002)(86362001)(5660300002)(4744005)(2906002)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?yPlU6WuTxK/ExnROi4mC1DYEXvr3McnjrXxqPb9aZL7iWYuYN8gCXie59D4+?= =?us-ascii?Q?m7G1vT5aCvmGlnBPX8tTvx4YgLBmGBERc57dZPkkuyOQKgXrnGgVTfdTuFeg?= =?us-ascii?Q?QGrbES3Ru+9bQstyqH3Wfp6iaStp/h1+sHRXNlcZ9LcfDGz7kAUkAvRBkxvY?= =?us-ascii?Q?bmr98NSl7WwhVPGeHheTeTo6fZ+ZoVvoNXXlk0ynzjhvb0DLU6a/9/5oK5m+?= =?us-ascii?Q?iQP+/FmcCCDVg0MMz9qQL/E1fZAcWoE0LymTneE41+j28T8MMTnE9RtX+jxP?= =?us-ascii?Q?cup9D6mXMVL5R1ND5BoYj5UxkHamJCSSH6W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VqSxjMG4hg2+tjn5W6uWMKxTSLsJaOPnk4ljW6SDPf7Y0wJFbTXX?= =?us-ascii?Q?kXsK1LDfOYEM49E6iblpiY9nsg/uWMTkcSHCrckHN/u1BHM84CguTyDrb7t/?= =?us-ascii?Q?dsxVbwZ+Z39wFuTC+M8mxUpAHOkxT2KA1ZGRmduLSUQpuYY78XW2RSpM+lkj?= =?us-ascii?Q?4dmmrbx796w+gYhhlSQ9rLXBQ5V99ifkdAyICbllZ4ZNj4vLhodZznc0EqTA?= =?us-ascii?Q?Yg1AfLyIhXhjnqhSgjUuAYKSznjxP85zm/TOOb36dAGjjvbGxiP0QsNJbE/r?= =?us-ascii?Q?zyIGIgrjlZdrJ36nBykxihi8M7ZkXxgMSmErdtJMYrNtIIyYdi2rxlaJ2wt5?= =?us-ascii?Q?J+5PiCfo7/kdKr1EET6UhDWm41Rsh5LyoHRJ0JtLXbcLiHgmUEYIQTOQf1Io?= =?us-ascii?Q?Zb8YhfRw8umhjj301nSrvjGOuIpLgRhoS2GNYiYemV9og2WqD1yBzuD2gOud?= =?us-ascii?Q?S1P1Ad9cBFDMwAwlvoKJUC8ZC+31knjFqrfCoXHI2Raj7paJNgmJqNJRymAV?= =?us-ascii?Q?5CXg6iQM4JJTWxVQ4F09MojM5VqRfBo=3D?= X-OriginatorOrg: cgstowernetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24677231-11d3-4584-e8a9-08da52988e74 X-MS-Exchange-CrossTenant-AuthSource: AM0PR09MB3972.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2022 08:40:40.7535 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fc9e9498-07e8-4b82-b4cf-365bba23cbbf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vVpFPlhcPFxtAnEzMn+gKYFIGpsRkSkFzjtu03KuH1TEU/+ER7BALVBInaBCjAFGxF30BfQVycXGnzcCicEs2Pf0Q3lZkthOxIQe0fZ7n78= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR09MB2824 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 Drop only the oversized packets and not its entire burst mbuf will be freed and will be counted as oerror Signed-off-by: Ido Goshen --- drivers/net/pcap/pcap_ethdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c index 2221c53051..ff98762058 100644 --- a/drivers/net/pcap/pcap_ethdev.c +++ b/drivers/net/pcap/pcap_ethdev.c @@ -494,8 +494,14 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) */ ret = pcap_sendpacket(pcap, rte_pktmbuf_read(mbuf, 0, len, temp_data), len); - if (unlikely(ret != 0)) - break; + if (unlikely(ret != 0)) { + if (errno == EMSGSIZE) { + rte_pktmbuf_free(mbuf); + continue; + } else { + break; + } + } num_tx++; tx_bytes += len; rte_pktmbuf_free(mbuf); -- 2.17.1