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 56F7E46812 for ; Wed, 28 May 2025 14:12:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBF8C40E0A; Wed, 28 May 2025 14:12:56 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id B9FFD40DFB for ; Wed, 28 May 2025 14:12:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748434374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=srobE0mnR+F8E9TPe7J3R1RM9gkJvM7e19kCOzgdYNM=; b=C4IZ5JUa5Kkav7pEpzMhDCzUtZy3pq8j4KrPxBcbjUBNKa1lU6PcYzGIhhG2p4z7hY4fDP v4UXXOFFzgHXrHlsp1h2MXSFHhLz5PHPXtxG5zTh1Yn0jLRBnBTM/4c+UjD7QpodxasYQ3 bCGQhThENyQwWK/wKc/5UevyloV++pY= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-BUCWVFQ4PJGjBs-oiZtfzw-1; Wed, 28 May 2025 08:12:51 -0400 X-MC-Unique: BUCWVFQ4PJGjBs-oiZtfzw-1 X-Mimecast-MFC-AGG-ID: BUCWVFQ4PJGjBs-oiZtfzw_1748434370 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-553227ef925so1946400e87.0 for ; Wed, 28 May 2025 05:12:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748434369; x=1749039169; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=srobE0mnR+F8E9TPe7J3R1RM9gkJvM7e19kCOzgdYNM=; b=qwon0/AcmHD9bhVfC3thJdOYKKoCk6T3oQv4neXj87y77ITTjVIV8RowopLQbzo4Zk 5wPOAP86BIcay+oD8p9QM1wBpQ86DyZlI47q2PQwk85o4lWYgdnx+3WGkM6UVRTNfHcy FnAEOWqiQhUsTCODfXv0RAN85gKHTb00uAvZsFLAmrC0UQzShdg19vdVgAa0rc3N+pT8 U4gw32PqMe7pyCuScXpK20Zt0qLpSPfWfhgxKzfAOkQOaj08ldJ2bqVFg160x7nI6UvP kXTDdhZXUyqQR6jtrHvGsOo6LoEkVxklzy7aZOEsTe9PF43VRLkifu3u85WLXNLRACsB I6lg== X-Forwarded-Encrypted: i=1; AJvYcCWkhjHFgo+rkA1aPZsgBTQ1+y+zGCAj9ZsHGgCWz3YWw4fGMM/PjmjUW2Yzc/euicCEzsA+tD8=@dpdk.org X-Gm-Message-State: AOJu0Yx3Gd5dqelIkh/M6slu7YIq02E8p96+C37WczaudtdZ61bVWQM9 fDNGEEBV0Mvh0k7k+5ROMmSo9r7utMCP6HBP5TRyTrl7xPAmDq0DOyozxtXEpRlrLgTxR+UxaTm mElAJ78ClF9rCRAYOOA3xkKriptPuhEuYcPDmiOhI1VV5sx8LbHMmQd7dm/KRv3iCjARscDlJL8 fHaZvcC9h6S7dezKUyL187Ifo= X-Gm-Gg: ASbGnctWXiwRwMh0+I1xY+MbW8Z1VXFWB3tvy3bpFbcF9N6Y2CRGzh2+mj/xZcMN+C6 PCI/IPgs78VSqgdGAZX23Fg3TssQN2HGZ0KpmDQgQNlK1uNECkZ6XFvBuxrojAMjheSvY1TU= X-Received: by 2002:a05:6512:33c9:b0:553:2f47:ed21 with SMTP id 2adb3069b0e04-5532f47ee2amr709100e87.41.1748434369484; Wed, 28 May 2025 05:12:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEOgTW2hcPTwdW4qLD+LlEqPYiVDDDrVBBCCFkWUMq2TaBFHU8pAm1B5TBV1V/PzVzcgSfjHsd5K20mlj9Xp4= X-Received: by 2002:a05:6512:33c9:b0:553:2f47:ed21 with SMTP id 2adb3069b0e04-5532f47ee2amr709088e87.41.1748434369085; Wed, 28 May 2025 05:12:49 -0700 (PDT) MIME-Version: 1.0 References: <20250528093644.2456221-1-maxime.coquelin@redhat.com> In-Reply-To: <20250528093644.2456221-1-maxime.coquelin@redhat.com> From: David Marchand Date: Wed, 28 May 2025 14:12:37 +0200 X-Gm-Features: AX0GCFu7jEDQ_CtFaMvXgnEsjDaFUT1PwGuuIKtKq37FXBOG4F8XpEvIozEzvCQ Message-ID: Subject: Re: [PATCH] net/mlx5: avoid setting kernel MTU if not needed To: Maxime Coquelin , dsosnowski@nvidia.com Cc: dev@dpdk.org, viacheslavo@nvidia.com, stable@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FyOjwJjN90y_Z35bKX52bzG12VEc5zi7Lf0vDWStGw8_1748434370 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hello, On Wed, May 28, 2025 at 11:36=E2=80=AFAM Maxime Coquelin wrote: > > This patch checks whether the Kernel MTU has the same value > as the requested one at port configuration time, and skip > setting it if it is the same. > > Doing this, we can avoid the application to require > NET_ADMIN capability, as in v23.11. > > Fixes: 10859ecf09c4 ("net/mlx5: fix MTU configuration") > Cc: stable@dpdk.org > > Signed-off-by: Maxime Coquelin > --- > > Hi Dariuz, > > I set priv->mtu as it is done after the mlx5_set_mtu() call, > but I'm not sure it is necessary, as is the existing call to > mlx5_get_mtu() because it seems done in mlx5_dev_spawn(). It seems there were some back and forth on this priv->mtu topic between Nelio and other devs in the past. Atm, I don't see the need for keeping such a cached mtu value in priv. There is only one user of the value, and it is for configuration operation that can do a query to the kernel. --=20 David Marchand