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 6D32843182; Mon, 16 Oct 2023 23:20:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E57D840299; Mon, 16 Oct 2023 23:20:14 +0200 (CEST) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id 2F2C7400D6 for ; Mon, 16 Oct 2023 23:20:13 +0200 (CEST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5ab2cb900fcso1952805a12.0 for ; Mon, 16 Oct 2023 14:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1697491212; x=1698096012; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=AGb7yXJB3ZvQnyH//wy9wbeT/Di2gbuf/AjjBeZ+Ygs=; b=xdu+mnnI948QB2u5MVf75RlJj1AIpEYJclxgSvHGUpaVFwXJMnEwlwHNWDKPLsPAHL o+QHyd2gES7+PS2lnfkfCqq7exL6bpkWCMG66ikgfcpHXPqhi5I9KbJSlFhX75tgPb22 xfztTkFpdzzBwkNmNk9uW9wP/6kX5MKtr7t8stjznz37IcSi1LrTAi+2BeUoclUmxrWk ErWP9/AAsJ9LnSvR9eHNysLHhCuDY1U1vT3hIYUAR8Bl66mu1f/pdtoT4E/IekmLbBpf 6+Oung+w2AwKUYbPhNncrFi2L1f1ON+YpWhlz3aerJB5fE7vvsMgjQ/sNl18t0QigET0 F2MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697491212; x=1698096012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AGb7yXJB3ZvQnyH//wy9wbeT/Di2gbuf/AjjBeZ+Ygs=; b=tB0Yuv0ff+dvU95Xj6zWNYAzCQOfBE2an/bc1QL+2g4AiAzZJAhyiVZnWkG/FKTVNL xehXdxwvV+aeUIHRsUedwRX0ZZBYv6wRoHQbQbMZSvkzZmJUc58ZrZ/k5zMCaT1B0ici a477f7LR/LY+DuKqSfxUY/rUpnBO4KPcQ8PMrRGirQK63J1b33aU0z+g6MxboZnct9uS Lo1PiBqxqLy1cBjy5uurNH0Ub1Vxy7GjlBwyPU2NkEuokJLG7xNRDpdj1Ud/Zrdlcq+d 4kwhAzkaWOujIOuAr90m0A7m8r61CfTQ/SuJhQf2IjADag5IJaFWdBFvo/tcfE/n90vW BrrA== X-Gm-Message-State: AOJu0YwbFPSXby27iDZsIYEBHhJYacKKwpIfR0KxIemY7YSJCYME5gKk 2/a86geiZAyb4tWTcgMOm6LCBg== X-Google-Smtp-Source: AGHT+IHP/aX2TNxmFeb/Q37ql6W2P2HOTHJ+FFhyPhCRCFVltmZwzg8+FWQ6BmhgmO9UfSZK082x3w== X-Received: by 2002:a05:6a21:6d9e:b0:15d:d250:d240 with SMTP id wl30-20020a056a216d9e00b0015dd250d240mr247964pzb.50.1697491212091; Mon, 16 Oct 2023 14:20:12 -0700 (PDT) Received: from hermes.local (204-195-126-68.wavecable.com. [204.195.126.68]) by smtp.gmail.com with ESMTPSA id jg1-20020a17090326c100b001c62b9a51c0sm78851plb.103.2023.10.16.14.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 14:20:11 -0700 (PDT) Date: Mon, 16 Oct 2023 14:20:10 -0700 From: Stephen Hemminger To: Joshua Washington Cc: Junfeng Guo , Jeroen de Borst , Rushil Gupta , dev@dpdk.org, Ferruh Yigit Subject: Re: [PATCH] net/gve: Update max_rx_pktlen to be based on MTU Message-ID: <20231016142010.17b1ff52@hermes.local> In-Reply-To: <20231016205948.2252342-1-joshwash@google.com> References: <20231016205948.2252342-1-joshwash@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 On Mon, 16 Oct 2023 13:59:48 -0700 Joshua Washington wrote: > Before this patch, max_rx_pktlen was always set to UINT16_MAX. This, in > conjunction with the MTU fix, causes problems with testpmd, as setting the > packet length with the --max-pkt-len flag causes the MTU to be set > higher than possible due to underflow. > > As an example, setting --max-pkt-len=1460 (the default MTU on Google > Cloud VMs) causes testpmd to set the following: > mtu = 1460 - eth_overhead, > > where eth_overhead = dev->max_rx_pktlen - dev->max_mtu = 65535 - 1460. > > Thus, mtu = 1460 - 65535 + 1460 = 2921 due to underflow. > > Signed-off-by: Joshua Washington This seems wrong and is not what other drivers do. Other drivers give the absolute maximum in the dev_info so that application can size accordingly.