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 24E44A034C; Sun, 19 Jun 2022 11:31:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6D5B427EB; Sun, 19 Jun 2022 11:31:34 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20110.outbound.protection.outlook.com [40.107.2.110]) by mails.dpdk.org (Postfix) with ESMTP id E4FC04280E for ; Sun, 19 Jun 2022 11:31:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TBaFVg37Yiefy32pL8icjAAJKYCtwDpGxc/uLLr2MWkgtWGkuoBlZ9XhIDJvfSy3H0zYKTPx5BAk5AWFGeQGhV0RsRLLfRPAxZ/994bK45WzSXIGh/mUFGlcH0jPnZj2K8z1GD123GrOIPlsSSA5nneLZbMe8AbOQLFmWhIPm9gXRq/7RHU/9A9KsPUu2bDDF75/zefDqIljYeulp5g3NB65B67P6SQ1HgLxqjNMD0p36cyOOvsl0REXbPlD0YTbuUSHdCTRTxgjKvzGXZ7B57Sq85siKaueghgWtDSehTDmzmb4JalopG8u7JMyJMktKgoAjtmaopHQZLruOijOuA== 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=s8aQe7pE/LnQqVj34ZT3wyedHhizqqSnCKNq7N/hWEo=; b=n9SCouiFGdjUppGRVsttlNAdiD2UrKk1HFRwC+Y8m6E9bCPmMz9FACaXP9NKX6exbFlGVPreBmqDLcj/KlJbaMvbR6+BhgXrq/L69MCajkxftQbXeIj8Uz4rwUo80YhateSq3JMRUBrTixRXooqbuCihk1rOp11fdMG9dUyExsOVaiBqnqJN4MnZhWNAZrQ2FYKojC5YOIYTbTk/lhFQGqUga2Y3XmH3yOVKTbGeR5ia1VQ5nTGcg+MtlqJQAFsYL5bSl7U63HktAm1pmaMEH1fqBclVObaWPbIlxhfxhHIJetgZztJnfsrS5HbyP8dbt6kenEMwEMg7dHIl5oJaiQ== 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=s8aQe7pE/LnQqVj34ZT3wyedHhizqqSnCKNq7N/hWEo=; b=MIVi0lqrNHUNlw8aozuSOo2phitTELgEKh6d9cfG8+wjBsJJJZ7KcCT25wGDutkHmyYu4cMBzQd7N5ixuilXP+jO7ykhuqHixWdsJkc4028yfwjhfRxQE+gXCjI0v87VRoquDAUKtX+dBcWKmz0SXibM1QBSNrtir7XyHFJSRbw= 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 PAXPR09MB5056.eurprd09.prod.outlook.com (2603:10a6:102:15e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Sun, 19 Jun 2022 09:31:32 +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.020; Sun, 19 Jun 2022 09:31:32 +0000 From: Ido Goshen To: ferruh.yigit@xilinx.com, stephen@networkplumber.org Cc: dev@dpdk.org, Ido Goshen Subject: [PATCH v7 2/3] pcap: support MTU set for linux interfaces TX enhancment Date: Sun, 19 Jun 2022 12:30:33 +0300 Message-Id: <20220619093034.26891-3-ido@cgstowernetworks.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220619093034.26891-1-ido@cgstowernetworks.com> References: <20220317174347.110909-1-ido@cgstowernetworks.com> <20220619093034.26891-1-ido@cgstowernetworks.com> Content-Type: text/plain X-ClientProxiedBy: VI1PR0901CA0095.eurprd09.prod.outlook.com (2603:10a6:800:7e::21) 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: 05b842f9-4f71-4510-e143-08da51d67f08 X-MS-TrafficTypeDiagnostic: PAXPR09MB5056: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: sIVxeNkEtQbdtEnxqEci/KWGNoeXCNQOEcO8q7i/WXfn7r1egvG7J32ai+JYDUXyKuj5HnpM5MuEA04ekP3IWtnznpYCfiYbmHuokweWfTpM+v6Mrl7vHIFlyh4xmn101q6orn4/d558+tE1vk09qe1rw+TGQc3hRpQEenfbLSMOlWzfdvDmEUwQJ1qUrPUwJv6SZEwAiV1p+PIFrSIoLqdDv4kOizdlK7VOExkgH4hIPqscHZ92ip9F0yW5jgwWt6rVB0320o4aVOLxjJ+ZGJ7QG1AdSSjzodH7C45bEiQ7cjzie8OMquO6VEGvIICH3LGf4Vu2KY/UH1QFPqnH28vp6ceaDowlqEBJqk7tLSUB3A17gK0FqL+C+pve6kf+GT8AXB+gdDf1OpCllCxsbp8oio9kxNc9LP4bjdGvIfqevZSX5WYvPzYphbSaZSFBRd69I5Iw5jjE1vFSg3ikFRm5ChEZMm/0FU6tX79UePCVcGAJeWtPOpAnroTosxZuBDrJJEkFgs6FlJV1XUWaF0LNxXFtO7k9eU1Hs0s7u/aVaa4jgvGSMUXtOIYSu+/n1ssXxvTEI3pcv18S+/h56hkc6AqO/ybJGZY8XVNA1ER2DThN96WV4ogmRWRJ3umfvJlMMDiuE3Wr97yfvFnZb+qpVUN06Ny9dKpBr6CLiDtcWfREdYCw91c0QyOZ0vtXRLrBjG9uCv26lIhYmUys7w== 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)(346002)(396003)(39830400003)(366004)(136003)(26005)(107886003)(41300700001)(6512007)(38100700002)(83380400001)(86362001)(508600001)(2906002)(6506007)(8936002)(6486002)(4744005)(66556008)(38350700002)(52116002)(186003)(1076003)(36756003)(316002)(66946007)(66476007)(4326008)(2616005)(5660300002)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CUcEzLG9TERFiJV9x7Gv+Jm0GcG0PCOMp01a+F+c3fOPujfhiQVDIsgK78iu?= =?us-ascii?Q?DwELdsZVUYlwcOfRqwWW9YylcR9kUJt0IO0D/ili1UHS8llrGtt6dAYN+iaO?= =?us-ascii?Q?skU6bUDsMyL4+5JyZMlESXa2i52duqeq0Wg0qGf7ncHWIwdPL7gdoP+sHSOd?= =?us-ascii?Q?pVIWq5WQ8YRf57tzTWdAkWM4ggUvQBX5Kd1HmRfyayAZLMGx2WNDSAIbF7Po?= =?us-ascii?Q?SHj+YwbwWr+BpVc+rfwZrs5r+V+JP9X5CCuLxDqhgEwBVEnS4Ed3x+KswQpF?= =?us-ascii?Q?Q34OwavzJcp6Zrg4LZOiVHq5f9UKA8HZU1VblcC65K0uhwtDVazK9UxISxQT?= =?us-ascii?Q?1EI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ptas1niRqpnXcH?= =?us-ascii?Q?npnhh2FrNdB5SC/+lAN8Gs0O1lTOECbOQ2pAqbqR0Q9WFbOrfIZiO1ePYgRR?= =?us-ascii?Q?l6Cwj0lzFZ3LgEP2FjsddwJ8g3Jch6+D4l6pfeX6BoP9oDwnOncVT72yiaSd?= =?us-ascii?Q?0Txt0njDp6S9haMR3redTnEGcmfImRa/f2ts0fIOyNEIQpYj49Ghgxm1ix2l?= =?us-ascii?Q?yREHS9DwCVpslSTuJRk5yx9mnesFONvjgy1tlwJNmyUSo1dfiqXbfB2myrdq?= =?us-ascii?Q?EqIZzeUfVpVdYuOLBkXsQ2qrThlZto+3066sjBhs25+p6bYzY1pAGBhmJcR+?= =?us-ascii?Q?vnf4V+W4RMYCLP+TidHTUAbufYxcQf6hZq0i47F6KvyQJyWsc4xvA+B7N4C3?= =?us-ascii?Q?65r2yK/IiQ73ENThHgCIWhkOc/2DUYHJrV+iG5wOJcQJCzfaOHiaPx95tqsd?= =?us-ascii?Q?kLAQpQRCYeiRTuzgdP02XPf9j6kmDcYwqU9Qo1sSvm++41KgSTuRydT6dj81?= =?us-ascii?Q?gwd3IYfH/CtjJbd0ExX6Tq0ATbe4yQ0=3D?= X-OriginatorOrg: cgstowernetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05b842f9-4f71-4510-e143-08da51d67f08 X-MS-Exchange-CrossTenant-AuthSource: AM0PR09MB3972.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2022 09:31:32.3735 (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: MSPj77n14BC+dzHqqjDaL4sXB/uez4hkZKWxs4oxIvgjFJt2wYRCBC5fKveHYi7vVdJztk2l2e5iXaY3mVuVAUUQiaFrS7cBpyqe0KmDVqA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR09MB5056 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 entrie 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