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 0337C45B6A; Fri, 18 Oct 2024 19:37:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4F7040267; Fri, 18 Oct 2024 19:37:20 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 26EF84025C for ; Fri, 18 Oct 2024 19:37:19 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7d4f85766f0so1812475a12.2 for ; Fri, 18 Oct 2024 10:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729273038; x=1729877838; 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=akJ4PQAlF6/y+hQ6lYLX1sOOYzbo0vybF7iE80PiBb8=; b=DRrhhX65WncvOVYRBmBKsoVlpYZtEIsSKPRmZxWWgfpWlLIK+M7p5/dRG95ilJjJOS ydFukVFVG8DMeUjwbZflNzHKiIJgaz7CZz2ljXyt/BBIXVXHGWDJ5ZZxu+tTOSWDPcPH chIYrtSbqZbHicD6JnANqIU9Bmf5C5O/oQE/tekazDjxHmVA6Dad9Vg+JSdWaoTwJtwH +qPRscvnKawaf962PcA3CHMYo7grbdmKCBQHGBR4jwQiu9jH3jMXE8dH1AlAom4TZd9+ aP3h9hJmqcceR6/nmn8fzIlrb5mszwULXuVnbrj09CvyCX0v3folNB+a+6qaixMi2Iv3 a2iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729273038; x=1729877838; 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=akJ4PQAlF6/y+hQ6lYLX1sOOYzbo0vybF7iE80PiBb8=; b=OFIxN++z4PidVikP5EbkGoIzgLPXNOtkFzDU7it+zpL52ML4XKcErkHtdBaATF7Zds JpNvzbfuNjVJoNK62fWWNpkuCtx3ZDWC5mm/Hmj3sOE9rPm54xSw5fZjxz03Dv63ydWR 7gN9OFyisG6w/DI8aEBWdAkzHfuk3icT2pwwpo6yeetg91D4jllSrP88o5t55L0J5v9R aVdfcptR8yV0jD8ml0il+wFPe0A+dXBq07rnjzHF8LnDnFrBUSVQH0xtKHKNT+jzpu2N Y4eQMBk7gMAClwiyRkyqyXvF1loL5gwT9U+zeRO8MPWZvyLrlPlHg2TFz0/gq4iQGcZy T8bA== X-Gm-Message-State: AOJu0YyQI5WetHmT7bn9OYA5LNTiZN6Qrx1IDoJiMYql2hTBu2gZCG04 iNKYlFkIqQUd3niicYWUkEwfPwx19cfxvfj68YGYQNdx5A5PlqytWoBC0NE0Yp0= X-Google-Smtp-Source: AGHT+IGbRuonx5BEBZs+5ypJ2rlllgVXvnI/BjxGFTgB8fcNDM9mrgKzZylPO2zkQWmllanpcFF3cw== X-Received: by 2002:a05:6a21:2d88:b0:1d9:d8d:d0a4 with SMTP id adf61e73a8af0-1d92c49b012mr4340773637.9.1729273038336; Fri, 18 Oct 2024 10:37:18 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ea334c26bsm1730713b3a.87.2024.10.18.10.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 10:37:18 -0700 (PDT) Date: Fri, 18 Oct 2024 10:37:16 -0700 From: Stephen Hemminger To: Rajasekhar Pulluru Cc: dev@dpdk.org Subject: Re: Restrict max packet size on rx Message-ID: <20241018103716.46b23a63@hermes.local> In-Reply-To: References: <20241018094348.4e91b6e5@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 22:19:35 +0530 Rajasekhar Pulluru wrote: > Thanks Stephen. >=20 > On Fri, Oct 18, 2024 at 10:13=E2=80=AFPM Stephen Hemminger < > stephen@networkplumber.org> wrote: =20 >=20 > > On Fri, 18 Oct 2024 22:05:24 +0530 > > Rajasekhar Pulluru wrote: > > =20 > > > Team, > > > Does setting mtu using rte_eth_dev_set_mtu limit the maximum size of = the > > > packet received on the dpdk port to the configured mtu size? > > > > > > On an intel machine with ixgbe port, with mtu set to 1500, no rx-offl= oads > > > enabled, ixgbe dpdk port is able to receive packets greater than 1500= =20 > > size =20 > > > and even jumbo frames of size 9000, even though the peer is sending t= hem > > > fragmented with mtu of 1500. > > > > > > How do I restrict the port not to receive any frame greater than mtu = =20 > > size? =20 > > > > > > Appreciate any help, > > > Thanks. > > > Rajasekhar =20 > > > > > > In networking, MTU and MRU are overlapping concepts. > > The MTU value is used as a hint to the driver as to what size buffer to > > allocate > > but it can use larger if it wants. If you have restrictions, then the > > application > > needs to enforce them. > > =20 There are some drivers like ixgbe that need to round up the receive buffer = to a power of 2. So it is possible to get 2K frames even with standard 1500 by= te MTU.