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 12EA346187 for ; Tue, 4 Feb 2025 03:43:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D66D040289; Tue, 4 Feb 2025 03:43:34 +0100 (CET) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id 3D5144003C for ; Tue, 4 Feb 2025 03:43:33 +0100 (CET) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2ef70c7efa5so6879905a91.2 for ; Mon, 03 Feb 2025 18:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1738637012; x=1739241812; 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=fKsmoB4Ous+tC8TdoMiwDRgk126mJEF3m+XKLTEGUlc=; b=YNRHzdCobbk1uTGEhX3+vlbTJsrqeMFsRQuQXhB4vdRbrQUoreAaxzhEye1MFETchi Zq62Y9D2etnucav7B93eo1x2hOp86IItSMEwujnf2RcyXTPpaBosN86UwdP2O2dm8HGb WU2p5QUC60t/LPiuEKJ6CsMiP9k/pHSV/SnOxqfYvT7eRb3l4mrM3u/gyudPLSqQGoMg XxxrcqMQ2JOc77Gd5SyjW5zdK2tcID7dJrdafVFe81IyMqDCpTPc34BkrkELah6e1bAd 0iUU0jTAVNPUPjgs5Q+xOOOC9krZyPSvg61bSsI0BeY7Wc31vr75TUZwNXkZCR6ZE46Z 0ccA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738637012; x=1739241812; 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=fKsmoB4Ous+tC8TdoMiwDRgk126mJEF3m+XKLTEGUlc=; b=fN4qvACsFDeo9E5mwVq9sWWllvg5yYwXnBhbkqRnbkDliI4dilrQpm+PGT1Lnr3Ss7 pvhoTu7gqjsi2fa7ZQbwmLHAJX9O1KEqWat+AYkBuXliZp6QM/lg3ZJncVmwsr3AhknR vHZuAMn3cd9z5/dDBOXJbVYKzsPPA3EtCyXH51+tOKjaaKXgYQP/w/mJ/ZgtkNrOXbPp gJ4sxlORdNKEAfJLgpedHW0rp3ilCWJ+pkD4mU2Z2on6fB+n7xeHpDaumeNlWKTN6XFf ZDGVluv1eyZdwatWHMgoBHgj3rz7hxnbama1s5VyWzU0d43v2MQOLz0zyKFKZ8mqQ+fQ k6hA== X-Gm-Message-State: AOJu0YzOUicFwawErExhuS6SOgSoHuQNNElLH+X39SqdyxFS2AU/16p9 CO1lEe0kcLQacia/PLVPLA7/85GYXpaf84Bg533I6poRyIbyfwCNGz3UB4bBV/4= X-Gm-Gg: ASbGnctH4SD+nDnBTCd/Pn+03aC6uxB9djTBM1dMNQJY8XvWZ8dQ1azdmZnTTrBR/w0 v+nPG7wdNKxv3iZiPHVzTKI4WbEAw1wmuUV28ZAkNjHHg/uHmsPLtcyiFyU8METdkECFCmkDfqX DntshYJX3GBToD/18IKwHrD6aatlbTKbn1WkPKCr5U04flfFKztb0KDL665VfB+YhAGKUQPANkL I7u+g3ZKFrXdZy3la00/iM+gNj3SOjKP7bG4flTCNZ3WW2dCdimOjTxZJkvsLDk/L3xgCTGBMlM voG4Wd7PF5VgL8yDTyzJfMVx5fpnmm375eWk7VX9+v+NrpyWUjgZ3r5jJwQsVJakiAHl X-Google-Smtp-Source: AGHT+IHXNDZbv2025Rig1XFAWTlBBOmOzyFSblXPQmP8S8TtAcFk28Zo5Zjsv146wRboR8GUjfZEIg== X-Received: by 2002:a17:90b:548e:b0:2f4:4500:bb4d with SMTP id 98e67ed59e1d1-2f83ac0a3d9mr34923512a91.20.1738637012138; Mon, 03 Feb 2025 18:43:32 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f8489b01besm10014145a91.19.2025.02.03.18.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 18:43:31 -0800 (PST) Date: Mon, 3 Feb 2025 18:43:29 -0800 From: Stephen Hemminger To: Ofer Dagan Cc: users@dpdk.org Subject: Re: [EXTERNAL] Re: Support jumbo packets with XDP Message-ID: <20250203184329.1387df78@hermes.local> In-Reply-To: References: <20250202093255.19da8189@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Mon, 3 Feb 2025 09:16:58 +0200 Ofer Dagan wrote: > Hi Stephan, >=20 > Thanks for your response. I'm building DPDK 24.11 on kernel version > 5.15.0-130-generic. It does seem to work with the MTU you suggested, but > how can I support even larger packets (up to 9000)? > Are there any workarounds for such cases? I don't mind a performance > penalty as these use cases are expected to support less traffic then the > ones using dpdk drivers. >=20 > On Sun, Feb 2, 2025 at 7:33=E2=80=AFPM Stephen Hemminger > wrote: >=20 > > On Sun, 2 Feb 2025 08: 53: 42 +0200 Ofer Dagan > > wrote: > Hi all, > > We are trying to start using AF_XDP instead of lib= pcap > > (for use cases where > dpdk drivers aren't a good fit for us). When usi= ng > > XDP, we > > ZjQcmQRYFpfptBannerStart > > ------------------------------ > > WARNING:External E-Mail - Use caution with links and attachments > > > > ZjQcmQRYFpfptBannerEnd > > > > On Sun, 2 Feb 2025 08:53:42 +0200 > > Ofer Dagan wrote: > > =20 > > > Hi all, > > > > > > We are trying to start using AF_XDP instead of libpcap (for use cases= where > > > dpdk drivers aren't a good fit for us). When using XDP, we can't set = high > > > MTU. How to still support jumbo packets in our application? > > > > > > Thanks, > > > Ofer =20 > > > > What error are you seeing? > > What version of DPDK, and what version of kernel are you building for. > > > > The current version of AF_XDP Poll mode driver supports larger mtu size= s. > > It is constrained because the receive buffer has to fit on a single page > > and there is overhead for the various headers. > > > > > > dev_info->min_mtu =3D RTE_ETHER_MIN_MTU; > > #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG) > > dev_info->max_rx_pktlen =3D getpagesize() - > > sizeof(struct rte_mempool_objhdr) - > > sizeof(struct rte_mbuf) - > > RTE_PKTMBUF_HEADROOM - XDP_PACKET_HEADROOM; > > #else > > dev_info->max_rx_pktlen =3D ETH_AF_XDP_FRAME_SIZE - XDP_PACKET_HEADROO= M; > > #endif > > dev_info->max_mtu =3D dev_info->max_rx_pktlen - ETH_AF_XDP_ETH_OVERHEA= D; > > > > If you have a relatively recent kernel the UNALIGNED_CHUNK_FLAG should = be set. > > Stepping through the maths for that > > max_rx_pktlen =3D 4096 - 24 - 128 - 128 - 256 =3D 3560 > > max_mtu =3D max_rx_pktlen - 14 - 4 =3D 3542 The limitation is in the kernel (not DPDK). The kernel XDP uses BPF and to = optimize with zero copies only supports up to one page. You might talk to the kernel= XDP maintainers about if they support scatter/gather.