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 40653A050E; Tue, 26 Apr 2022 19:04:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D94D240E78; Tue, 26 Apr 2022 19:04:05 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2042.outbound.protection.outlook.com [40.107.237.42]) by mails.dpdk.org (Postfix) with ESMTP id E4632406A2 for ; Tue, 26 Apr 2022 19:04:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J+koTpcgztoKpCijuhG0Knk8tgO9wnWKtqa9fPtjb49Qb4WjNOTyztebolPof1jXdA+73Pc6/vEgLiJQeuwszqSh9nPw5PZOtBejWaB3imBUOm8pquUockI/dH1a/x4mU3D3W6pCCoF/9kI45udX9COBaUd9qb2nImCQLH5VUcbCQo+DeIZFgL2fb6YvSXYmUC135qtKVKjz/v7GU3AFU1fTjimmWEgpGtNstEqv9NlKFHO9W7ur4kLDUS6ZYQdR2lbY9UcK4LDZCDny10ui9xOZnDZrmTBZx2EN9tFeRPdButPPuSuMO1X5kRkmCR6sCSrJOs7yfwxsgefisIKklw== 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=NuRnaH2yLcmFUyXBmm4Z5KJyO9HBc8K7KCwoqgaiA5E=; b=YSymr/kcKg1YzSYcftZUDCpm2Xaakc8F0ZUwgLLJd4wEinClQ2GVUpgF6RBpxAXQy0tv+ribZbn8nqrJ2dcFLc7N4l7n2T+BtSVIqIt+rFiD5GbYgwcHoVVfqjrkSkMtLNB7qGgA65EE7lfEjO32lM6aTYHwdvUVJ5cDWxTnoXsjU0C6oK8Vwb2YVrgXFCh5fNRpMwo/nGIfMnnSBJmyxrqW7QtHGnwDfSRvB6DXrplwtdDf/jA0Fr0+iacmlRi3Kz5G4N2uNJEUc3yFoUL4O+PGq1YeTAc3lhgGm+Op38/3PYoUi5TcOa59XTt8qHIOXvenUT0hv2qP8OFACMCOqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=cgstowernetworks.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NuRnaH2yLcmFUyXBmm4Z5KJyO9HBc8K7KCwoqgaiA5E=; b=jdWclTKhKeWsCxyROlTxy60SSjRj7S7/lOYmJXDVYECAk5mkZ7TdwQcTd8EOHpnosZ3Zpg6pntey3GTq3JPQg2ax1ZR5Ls26AC9OSvE9T2ohFZaOpJEJUxmPmvNxmQBzw4+dGZdPEOssl6yxF3aoCo0UrR79eLArExU8asJ6hAI= Received: from SA9PR10CA0004.namprd10.prod.outlook.com (2603:10b6:806:a7::9) by CH0PR02MB8135.namprd02.prod.outlook.com (2603:10b6:610:10c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Tue, 26 Apr 2022 17:04:01 +0000 Received: from SN1NAM02FT0027.eop-nam02.prod.protection.outlook.com (2603:10b6:806:a7:cafe::82) by SA9PR10CA0004.outlook.office365.com (2603:10b6:806:a7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14 via Frontend Transport; Tue, 26 Apr 2022 17:04:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by SN1NAM02FT0027.mail.protection.outlook.com (10.97.4.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5186.14 via Frontend Transport; Tue, 26 Apr 2022 17:03:59 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Tue, 26 Apr 2022 18:03:58 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 26 Apr 2022 18:03:58 +0100 Envelope-to: Ido@cgstowernetworks.com, stephen@networkplumber.org, dev@dpdk.org Received: from [10.71.117.131] (port=50361) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1njObW-0007nt-2p; Tue, 26 Apr 2022 18:03:58 +0100 Message-ID: Date: Tue, 26 Apr 2022 18:03:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] net/pcap: support MTU set Content-Language: en-US To: Ido Goshen , Stephen Hemminger CC: "dev@dpdk.org" References: <20220317174347.110909-1-ido@cgstowernetworks.com> <20220317112047.2d8d4f8a@hermes.local> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38ff0242-5548-4deb-d319-08da27a6c230 X-MS-TrafficTypeDiagnostic: CH0PR02MB8135: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: v3YbqO/couvG+Oys0tmF/FDxLwKjJhbSbWoOYEtFqHedjtUDRo7T5AVMN2eDeupX6KMT9avjo/rrcXiky47KSIwumQJTz+kh2PSmP+rNiKoClsymtJCSEKurz1J1rxkfus72WxKdigJjc+t3HsiSQZX/PLWrakuOlkewDEkJ8BIa/cn0INPjgtQtTM/p3dIPMRtYXiJamca0QOtv4EaNCyUvkDmhNaYzowQs5XYgUnkJqV98WFTfk6+yvuDwm7H+jKcY0GYTo+4YR4OSm6Hh3B301Rogng+haiknMNd6k0q9g/PJLxIe7zkYWst0agNWauKLBXwlpah9EZajTS/PTQmQjnAfSDub5hhFpHtXLHkrQyM0F1VRGVXeHFP89/iBZKauIgtzeoneHB1Pq788buCXs1Jfhz9gGRzEJOP2TBwiE4VKiJsVy3dRi+6A04ZCg31T/FcNTol9Zr+wyydRxEjsUS+/ImnNMueY/ZS96JD1AsAYP55lRaoWGZgg7moAEPXDCkKLFN8j034S2ketKU6e7KCDwcCTO0D9jDoK1PSmUN4Z22FfJP11JSjhRlpgJSdoat8IeraQFBMV2jfebcWSi+E9yPd6fL75SDDZ+KJG5K5eJcM4hDTHAz+ri705jQUQnYSrT19OrAJyUbVHv6fiL//2Cq7FLY8of8lXJbCD7sZLrKjajlRDrvEE9joTOqXuSZ0LRNaDt3cOTHnB9obXxcbNyeQ4DMGQX8+BvE0YIhQC4jezOfH3b7tQiW+XJ8BVz3rkBsUc9xXb3IG/6XwIicHUbAweDjKmi3G4me3WeLIyBegcFuqR/Br/RmfrVjh8AjgR1wiQb7Hxa7+Hv82CvishoVIuChLOFUBfnIQ= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(44832011)(356005)(8936002)(9786002)(4326008)(70206006)(83380400001)(316002)(8676002)(7636003)(31696002)(966005)(70586007)(508600001)(2906002)(110136005)(40460700003)(5660300002)(2616005)(426003)(336012)(186003)(47076005)(53546011)(26005)(36860700001)(36756003)(6666004)(82310400005)(31686004)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2022 17:03:59.9724 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38ff0242-5548-4deb-d319-08da27a6c230 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0027.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR02MB8135 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 On 3/22/2022 1:02 PM, Ido Goshen wrote: > This test https://doc.dpdk.org/dts/test_plans/jumboframes_test_plan.html#test-case-jumbo-frames-with-no-jumbo-frame-support fails for pcap pmd > Jumbo packet is unexpectedly received and transmitted > Hi Ido, Yes, pcap ignores MTU, but I don't see why it should use MTU (except from making above DTS test pass). For the cases packets written to .pcap file or read from a .pcap file, most probably user is interested in all packets, I don't think using MTU to filter the packets is a good idea, missing packets (because of MTU) can confuse users. Unless there is a good use case, I am for rejecting this feature. > ---------------------------------------------------------------------------------------- > without patch: > > root@u18c_3nbp:/home/cgs/workspace/master/jumbo# ./dpdk-testpmd --no-huge -m1024 -l 0-2 --vdev='net_pcap0,rx_pcap=rx_pcap=jumbo_9000.pcap,tx_pcap=file_tx.pcap' -- --no-flush-rx --total-num-mbufs=2048 -i > ... > testpmd> start > ... > testpmd> show port stats 0 > > ######################## NIC statistics for port 0 ######################## > RX-packets: 1 RX-missed: 0 RX-bytes: 8996 > RX-errors: 0 > RX-nombuf: 0 > TX-packets: 1 TX-errors: 0 TX-bytes: 8996 > > Throughput (since last show) > Rx-pps: 0 Rx-bps: 0 > Tx-pps: 0 Tx-bps: 0 > ############################################################################ > > ---------------------------------------------------------------------------------------- > While with the patch it will fail unless --max-pkt-len is used to support jumbo > > root@u18c_3nbp:/home/cgs/workspace/master/jumbo# ./dpdk-testpmd-patch --no-huge -m1024 -l 0-2 --vdev='net_pcap0,rx_pcap=rx_pcap=jumbo_9000.pcap,tx_pcap=file_tx.pcap' -- --no-flush-rx --total-num-mbufs=2048 -i > ... > testpmd> start > ... > testpmd> show port stats 0 > > ######################## NIC statistics for port 0 ######################## > RX-packets: 0 RX-missed: 0 RX-bytes: 0 > RX-errors: 1 > RX-nombuf: 0 > TX-packets: 0 TX-errors: 0 TX-bytes: 0 > > Throughput (since last show) > Rx-pps: 0 Rx-bps: 0 > Tx-pps: 0 Tx-bps: 0 > ############################################################################ > > root@u18c_3nbp:/home/cgs/workspace/master/jumbo# ./dpdk-testpmd-patch --no-huge -m1024 -l 0-2 --vdev='net_pcap0,rx_pcap=rx_pcap=jumbo_9000.pcap,tx_pcap=file_tx.pcap' -- --no-flush-rx --total-num-mbufs=2048 -i --max-pkt-len 9400 > ... > testpmd> start > ... > testpmd> show port stats 0 > > ######################## NIC statistics for port 0 ######################## > RX-packets: 1 RX-missed: 0 RX-bytes: 8996 > RX-errors: 0 > RX-nombuf: 0 > TX-packets: 1 TX-errors: 0 TX-bytes: 8996 > > Throughput (since last show) > Rx-pps: 0 Rx-bps: 0 > Tx-pps: 0 Tx-bps: 0 > ############################################################################ > >> -----Original Message----- >> From: Ido Goshen >> Sent: Thursday, 17 March 2022 21:12 >> To: Stephen Hemminger >> Cc: Ferruh Yigit ; dev@dpdk.org >> Subject: RE: [PATCH] net/pcap: support MTU set >> >> As far as I can see the initial device MTU is derived from port *RX* configuration >> in struct rte_eth_rxmode https://doc.dpdk.org/api- >> 21.11/structrte__eth__rxmode.html >> Couple of real NICs I've tested (ixgbe, i40e based) don't allow oversized, tests >> details can be seen in https://bugs.dpdk.org/show_bug.cgi?id=961 >> >>> -----Original Message----- >>> From: Stephen Hemminger >>> Sent: Thursday, 17 March 2022 20:21 >>> To: Ido Goshen >>> Cc: Ferruh Yigit ; dev@dpdk.org >>> Subject: Re: [PATCH] net/pcap: support MTU set >>> >>> On Thu, 17 Mar 2022 19:43:47 +0200 >>> ido g wrote: >>> >>>> + if (unlikely(header.caplen > dev->data->mtu)) { >>>> + pcap_q->rx_stat.err_pkts++; >>>> + rte_pktmbuf_free(mbuf); >>>> + break; >>>> + } >>> >>> MTU should only be enforced on transmit. >>> Other real network devices allow oversized packets. >>> >>> Since the pcap file is something user provides, if you don't want that >>> then use something to filter the file.