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 C4BB545B69; Fri, 18 Oct 2024 17:59:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00A374025F; Fri, 18 Oct 2024 17:59:08 +0200 (CEST) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 732764025C for ; Fri, 18 Oct 2024 17:59:08 +0200 (CEST) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-7ea8de14848so1717227a12.2 for ; Fri, 18 Oct 2024 08:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729267147; x=1729871947; 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=m9FUydP1sakJ6CX1TVeIADLEIgZm8WF7vA5CLT1ugJ0=; b=LC43AH6sJWqtLiRtymGm4kMBY5a2k4JubETJn+uxtO1UY+dB6HrY3TaH0Zp1RBWL4/ 5CDUVPcypRsivC3LiEJJ4AEhQ0amGoWWVzs7xAZ+fqmcJa93nIkM/QQ2n2l4iIVwx0Lm kqBy5OdUN0DGQC6CYrJp0KOX4JIsbk524M+4fBjgRa/QqfWY8JtF48HiOnHywhO/F3RG 8qXJAP0fNtTIgNtnQT6ucT4Fwc81YYJEcQTOj1Rg9CyIGdQX7T4QMpjK9+eUV/oL/Umg Zj9+RCX1ubyJ26iiKwOQuKeMe4543h3R0pD7z9lMPbApU9TAss414IFOEMO0HqFm7fKZ I4Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729267147; x=1729871947; 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=m9FUydP1sakJ6CX1TVeIADLEIgZm8WF7vA5CLT1ugJ0=; b=kP2bHB0qLx/Ew7/AFxlhFUeSGTP9gKHATi5DXnlWRpFXm5l+MbC/YfVwu2VtSOSlTE FZ/1KRrOX53Wr5glNQKplkYtTvo25pNzihLaFiSSw6TNxOiB0hfCLEGp1Wvkfuae6pNM sil8KHOIZvTGMdUcFY6fwgIEMrFmO+8PxFpm6avxwZEI5Ax0PMy/hdbNxrU0PVGY4ksG 4K+78J9me1xwoW4zjrh/iiBHu6cu1TRw/bNxFiOMJR0alTxAeiOtJTB+wnwPqH2vFklL 1zG/T8hSlrjFxygaUcXe1RXXZP8kr4gyPFMFIqKl1ifWLcGiaoRo7RDA4TULKjgv96ic h2fg== X-Gm-Message-State: AOJu0YwWoT5pML7GHGkZLolnwZlw5pDK6bTNgh3iuFaTrcS2s3WPc79i BEgLZSeEdb/hGAib3T/ywJRq2xwRddK+3o00OQrmNsnM4nz7Uq3OATN8YKYsKFo= X-Google-Smtp-Source: AGHT+IEyEElDsSm/3aF87gNqkGWKCWQJMWXMuyJS9ZMoFy9ozFM12K3VI4wSytAoiEqScNHztRqukQ== X-Received: by 2002:a05:6a21:6711:b0:1d9:9a9:7dcf with SMTP id adf61e73a8af0-1d92c4a30f0mr3567694637.4.1729267147379; Fri, 18 Oct 2024 08:59:07 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ea345a864sm1613229b3a.164.2024.10.18.08.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 08:59:07 -0700 (PDT) Date: Fri, 18 Oct 2024 08:59:05 -0700 From: Stephen Hemminger To: Chaoyong He Cc: "dev@dpdk.org" , oss-drivers , Long Wu , Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [PATCH v2] examples/l3fwd: support setting the data size of mbuf Message-ID: <20241018085905.1e610ebf@hermes.local> In-Reply-To: References: <20241016082232.4005800-1-chaoyong.he@corigine.com> <20241018024253.4075609-1-chaoyong.he@corigine.com> <20241017195916.656dacc6@hermes.local> <20241017204206.2dc20546@hermes.local> 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 Fri, 18 Oct 2024 05:50:20 +0000 Chaoyong He wrote: > > On Fri, 18 Oct 2024 03:21:28 +0000 > > Chaoyong He wrote: > > > > > > RTE_PKTMBUF_HEADROOM); } > > > > > + > > > > > > > > Not sure why this is needed? What is the problem with the original code? > > > > Are you trying to force packets to be segmented? > > > > > > Actually, we are trying to force packets *not* segmented by making the > > mbuf size large enough to hold the packets. > > > > > > In our user case, we start l3fwd app with parameter '--max-pkt-len 4000', > > and obviously the original logic with RTE_MBUF_DEFAULT_DATAROOM mbuf > > size will cause the packets to be segmented. > > > Which is not what we want, so we add this new '--mbuf-size=4096' > > parameter, the mbuf size will large enough to hold even the largest packet. > > > > > > Do you think this make sense? > > > > Maybe query the driver, and use the max_rx_pkt_len as input to deciding the > > right mbuf size. > > Sorry, I am not quite understanding here. > I can't find 'max_rx_pkt_len' in l3fwd app, instead it's exist testpmd app. > Could you please explain a little more about the advice? In rte_eth_dev_info, I meant the field max_rx_bufsize and there is also max_rx_pktlen. > > > If max-pkt-len was 4000 and driver can only take 2K buffers, then use 2K mbuf > > size. > > If max-pkt-len was 1500 then use mtu + headroom and round up