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 BD7F7A034C; Sun, 19 Jun 2022 11:31:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 520C040150; Sun, 19 Jun 2022 11:31:08 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20117.outbound.protection.outlook.com [40.107.2.117]) by mails.dpdk.org (Postfix) with ESMTP id B72D7400EF for ; Sun, 19 Jun 2022 11:31:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U8emet5egXzE3npSj3DuFrFd//MaIj+7H/IhdnSroVaU+t8bWevmSnQquGsmhGMpY3KiSxobP38Dpw83yTeczGWKSmKgzGy52aSGUJtvXVKuJb6OlbtnISRVJorq5G4iM+ZXyO+A+bup0rQ+ZOqywCDYs44+hK+6Ui6p+pBSNV0pttmcBon6z3U0roqh0ESv8nl162ThA6BSfrWp+fvnJPfYgQCNqEhpKQ4mOJrBo102Kp1PfphD6DQMYT8NzKXhTjKvrSUespzy2ZFxhLNB6yYLL7bhw1pLwQRpTLdSQU2xFFW4DXIxsrFhIHSiwwvAXy1Lbh1Rccw6ytT8ojUDmQ== 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=mvM3vkZamNY4iJhpxZ2yYKRvuS4KjNI2cwWxsttPHd8=; b=C6fbgZugNlO9tcG9HdMczi8o8ybfv4ybq/pwhf0GLFTLWXkeNY5LNlTo5O/hrVTHd/SIcObYaAxDLbVp4kLCBtMOJ6cptOOwhn3bsOgqRHayRvxrBV3HvJxv/LLL8hOysaajhSKPYcBbD1L70WjlcCTXfHLGkQd+q3TTOUHL1zb7GYX1ckEnT7jYaiIj0SgE+2YQWAGylhT5taTkud7fj/Eh3qaj7mPUoFnJe0oyWr0tPpb6nDSQVn0c1KPs3V0MDeOad+OkG2LkILf/S9ER+TKMo5iE25X62H4ObT1WFlcYyMvQx6sZPco9iT2tvkoG6nzE6ZVQhMMouHFnIGZAEw== 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=mvM3vkZamNY4iJhpxZ2yYKRvuS4KjNI2cwWxsttPHd8=; b=eMkL3YElVa/BeDu+P+f80n/7kcvZ/REwFSlEQTt8QbZrywton7ANs8qgOlmuv9CS3xz6i50Qr2VviYFiGJiWcpcGuH7pt4f80kpXrgOfTpOO9ITMFhPdqi16+2nkKD0v0d4IHIH25Uqd7ak2aHmtu6Je0tBltlzAOloKxzO9qNc= 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:05 +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:05 +0000 From: Ido Goshen To: ferruh.yigit@xilinx.com, stephen@networkplumber.org Cc: dev@dpdk.org Subject: [PATCH v7 0/3] pcap: support MTU set for linux interfaces Date: Sun, 19 Jun 2022 12:30:31 +0300 Message-Id: <20220619093034.26891-1-ido@cgstowernetworks.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220317174347.110909-1-ido@cgstowernetworks.com> References: <20220317174347.110909-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: 5c6acdbf-ee9b-4684-8b07-08da51d66eb2 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: Gc2v92SzVPpNI6at0fhpVQM9BZ6XJwlR1G/WErNftswJtZJYcHVvHJwJayKf6luQlu2G9C2fmVIptCcqa5IaRaBliFB3mVOR4/Y8q00oNRhJDfLR3adgHXd4acaWLl/DAd1bSOC0icmRAg+SfvnSnYeyuxEmJmM1IYOu63Pd+IUuXPeAnLkZuXOuFUfdwwPwothDEjhZD7BdSJDPvn7NBB6ZErt0f6LFsF0YAR8cAs+F4reZz04sdw8moO3JyiEMWdoujjzpE0LWm8861s7Sidq0uWIB3Yf19+v2BMiJ3BGPqDwndJHCR5h7Trpk1EMFQRHCIcglfhRUVjfg4L6uRjlqMG3udn0+onvTObb7TbCJO8PQsu70EEpm98l1WImz6At8iNRN5WXRxnjDNtmv0IK/qB7byX1+ABn41dxuuhfqphpC8jVeAX5pUy14aBSuWsH2C6WXwn2VvQEac1cHVtg6sI1NsoI3zoazXwtXO9RRT7Wf4U5YmsGLP/RCLsAN0xhhvEz8pIOvVQR8f2m2H2AGKj8SbpGHTcg+C3EdqIThaSdL0JwygIDbLOrnClNvP78+tDW2mdX3+Z0B1STstkcw2C5nr2fPSH1bM7uLc7V10TTmarnCfq6sztSQicXnHUeq4oJFVM01ZrVPUqYedWzCaXMWTYLm7nothxJddYEQ3yG2tCw+RSzPdRXX4StujzZuced60XERENpLTp1bSw== 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)(41300700001)(6512007)(38100700002)(83380400001)(86362001)(508600001)(2906002)(6506007)(8936002)(6486002)(66556008)(38350700002)(52116002)(186003)(6666004)(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?q1bK7i8bM4EmOVtzBMRrYZkxe/nFBZ3mqNoQLvEkAazbjKm0q3qInc7bk+/p?= =?us-ascii?Q?uC7MQLaD9g4QG/H9igU2K1X3lY8zt6Gs8tCi1Afc4uIYkjQ89lQWWmBczHs5?= =?us-ascii?Q?jADNG+Cdx8uRzB6RelDMkJOg0hnvWc7ohkYHEeeeMAh2kRjyWV8MX2aSs19U?= =?us-ascii?Q?kIiPGuCTUjrnoWzAA33WoUAG6e95j9mK7I5CCl/O5yQu2D8dLw0hy5dxkWE5?= =?us-ascii?Q?E2U7uNIr6YDWUmm0JuGXefVIT6yfBSr86CQhdoJS8aU1BQxMia/D7Oy6ZOfB?= =?us-ascii?Q?lBJ8aMJUxaWDj7k5Moc7+GPCPVanNJE00AXbQMhcN3gS+BDFNTZggAHKPSzS?= =?us-ascii?Q?vP25yA1SvpUMD05OjQ5PUO0DNPVv/cI/yBMo4TK1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XQRRlMVbaX34e1R/S4kN6EGJsVi991JEYIpYznbZ5wVzhujxW?= =?us-ascii?Q?3d8FeZqzyxD+Kx+MwcXXrkNSxXpL/rSosz3VHJMABEE28+W6sv6chm+PjAJX?= =?us-ascii?Q?n9hAex6Eno9nHWX29nrC6P69tKuOceleoWHN4SVqAjZ+6lPfHT56KODFcuPO?= =?us-ascii?Q?VR1g74HDKrQ6XPjkm0i28VDkH5OO6vr32arT+hpufFmjihGOgJvTDLwBT2T0?= =?us-ascii?Q?O4Mq+3s9D/ps9Uz59lZbkWSz0rrMagEDgiG8828IUW+n1Vyw3dOXe3PdCMzp?= =?us-ascii?Q?BJmq0d1ufddmAwE4Swr+4kB7fkJd/UD8DeEcxhEoe4cu8hyc022uuT/MLFuw?= =?us-ascii?Q?0r1e+Ar9TzqSY0PpVAzGWXxMqlMlAeJK218o/9qnVQ7uwMbE2nn7orHYHK5g?= =?us-ascii?Q?x1Wj8l24heJg1DhmsUFfgApJlTlOsMDmY1TL2NqEO+B7hd47GvZ6vLEiSca5?= =?us-ascii?Q?Q8V1agR/5VZOm4hIr5oBUbrcBY77g+E=3D?= X-OriginatorOrg: cgstowernetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c6acdbf-ee9b-4684-8b07-08da51d66eb2 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:04.9979 (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: QH2CRAxtjUD7xL3N3vi49hJq4A/kgdr+J/uLYVhruSqZAdEi3tRVco+fcFULjN24RKk6J6HveYK19kM/9tZBSFcNljMjyfdHztJtfZ+kJDk= 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 Support rte_eth_dev_set_mtu for pcap ifaces vdevs by setting the underlying OS network interface's MTU. Support is for pcap ifaces only and not for pcap files. Support is for Linux only. patch series: [PATCH v7 1/3] pcap: support MTU set for linux interfaces [PATCH v7 2/3] pcap: support MTU set for linux interfaces TX [PATCH v7 3/3] pcap: support MTU set for linux interfaces count doc/guides/rel_notes/release_22_07.rst | 3 ++ drivers/net/pcap/pcap_ethdev.c | 126 +++++++++++++++++++++++++++++++++----------- drivers/net/pcap/pcap_osdep.h | 1 + drivers/net/pcap/pcap_osdep_freebsd.c | 7 +++ drivers/net/pcap/pcap_osdep_linux.c | 21 ++++++++ drivers/net/pcap/pcap_osdep_windows.c | 7 +++ 6 files changed, 134 insertions(+), 31 deletions(-) --- v7: 1. TX drop only individual oversized packets and not the entire burst 2. Count oversize drops by i/oerrors v6: Fixes for v5 approach 1. freebsd compilation fix 2. checkpatch warning fix v5: Alternative approach Instead of checking MTU in the pmd set it on the OS interface and let it do the enforcment. v4: 1. Add release notes comment 2. Access pmd internals via queue struct 3. eth_mtu_set code convention fixes v3: Preserve pcap behavior to support max size packets by default alternative to v2 in order to limit the code change to pcap only and avoid abi change. Enforce mtu only in case rte_eth_dev_set_mtu was explicitly called. v2: Preserve pcap behavior to support max size packets by default.