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 D61CAA00C5; Tue, 9 Aug 2022 09:56:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85171406B4; Tue, 9 Aug 2022 09:56:32 +0200 (CEST) Received: from mail.tutus.se (mail.tutus.se [193.181.0.5]) by mails.dpdk.org (Postfix) with ESMTP id 7900140143 for ; Tue, 9 Aug 2022 09:56:31 +0200 (CEST) Received: from mail.tutus.se (localhost.localdomain [127.0.0.1]) by mail.tutus.se (Proxmox) with ESMTP id 069021436A5; Tue, 9 Aug 2022 09:56:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tutus.se; h=cc :cc:content-transfer-encoding:content-type:content-type:date :from:from:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=key1; bh=hphR7v/h7jb1ex54y916 nWQ7UD2D/GGNC+tw0Zo7S6Y=; b=kcmVlgV/2DJ6m4Eq6v2AEzYcPjDxIuUUhBjl NtpbvJD5tUHVX3dK+wZzhJTCmnLgfmNhl3Y6Kffyv5jwSFyf7nOSfCwqKddZdPay M69nwGtTUXbXqcx98vANp/EJZU8LKl9YmFxXDg4WhmsaTc7BLrCICn7bdo4xjIEI wBl2GLhLH/ksViDZSZCpF0U+B8l6CbCnKDboFl5YGQIMTlTcOgGh4MeT8H9fmOuW Xih+cy5bFM8i5G/WLe8GRL7WD82EOVQZZ2JJ6hUFy9wzgNDY07YhTkppWgViapuk HeH0qs9rVYhSPHab91M1g3xkpdDOhmDeU1vIPCJr70/7VySNIw== Message-ID: <52178e78-b630-3f97-9a3f-b2356ff426c9@tutus.se> Date: Tue, 9 Aug 2022 09:57:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v7] net/tap: Allow jumbo frames Content-Language: en-US To: Stephen Hemminger Cc: dev@dpdk.org References: <315474c3-7004-2114-9e24-8344da7aca9e@tutus.se> <20220808080323.53f303fe@hermes.local> <93cbc18c-fcc4-d34d-4419-5268513f7b87@tutus.se> <20220808094226.4775124e@hermes.local> From: Francesco Mancino In-Reply-To: <20220808094226.4775124e@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Interesting, did not know about that attribute. Tested some tap devices on my machine and get a maxmtu value close to max uint16, way bigger than RTE_ETHER_MAX_JUMBO_FRAME_LEN. I do not know if will have time to code and test using netlink to set this limit, for the time being i think RTE_ETHER_MAX_JUMBO_FRAME_LEN is better than the previous limit. On 2022-08-08 18:42, Stephen Hemminger wrote: > On Mon, 8 Aug 2022 17:38:21 +0200 > Francesco Mancino wrote: > >> Thank you for the feedback. >> >> I am sorry for the email spam, it was a learning process. >> >> I am not sure what results we would get by querying the MTU >> before configuring it, since we can (and do) set the MTU using >> SIOCSIFMTU. >> >> On 2022-08-08 17:03, Stephen Hemminger wrote: >>> On Mon, 8 Aug 2022 16:49:44 +0200 >>> Francesco Mancino wrote: >>> >>>> eth_dev_validate_mtu, introduced in 990912e676e, validates configured >>>> MTU plus overhead against max_rx_pktlen. >>>> Since TAP is a virtual device, it should support as big MTU as possible. >>>> >>>> Signed-off-by: Francesco Mancino >>> dev_info->min_rx_bufsize = 0; >>> >>> >>> Thanks for your patience. >>> >>> Since tap is built on top of an existing kernel network device a more >>> complete solution would be to query the kernel device to find out what >>> its MTU is. >>> >>> Acked-by: Stephen Hemminger >>> >> > > There is an attribute IFLA_MAX_MTU reported by devices over netlink. > > $ ip -d li show dev enp2s0 > 2: enp2s0: mtu 1500 qdisc fq state UP mode DEFAULT group default qlen 1000 > link/ether d8:5e:d3:06:5d:13 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 9194 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 gro_max_size 65536 parentbus pci parentdev 0000:02:00.0 > > Notice maxmtu of 9194 reported. > > Tap device already has a netlink infrastructure >