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 97CE5461AF for ; Thu, 6 Feb 2025 22:42:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 785B1402BC; Thu, 6 Feb 2025 22:42:49 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id E82EE402BC for ; Thu, 6 Feb 2025 22:42:48 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-21f2cfd821eso26249475ad.3 for ; Thu, 06 Feb 2025 13:42:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1738878168; x=1739482968; 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=o33Muht/DwEhftmXABDYXIeCSdwYG/QWNul/FYJI1e8=; b=WNj3nhA9IB+ytCaeJyp/8UoO8hkagEBOte1xSf0OA58XRPIOMKmbrS6B4/VCQ3nOdg M8se7d1LSEAvV9BS+AkfaK1r8q0f4TL4icqM7tESVkRoG74IyeBe60Y9S1Q9oqGUafSS rsmEOWxsoHohsS/Gk7nklM0irgTTgj72LQGZY37wnntAgT37nMbjkbPNwAhBA8GrSsRx SY9O9fOeXPOBTOXHfjzr+oKF3HUZ057SHC/6xawmMA0uAvAZmsk9DauFSNLdkslZoSFR oK29x+V4be2IF6+SATBLpiuei4HtIgdXefHEIK+ukOxg97sL13Ogd9MW1K8HzBxpoD5e bcRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738878168; x=1739482968; 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=o33Muht/DwEhftmXABDYXIeCSdwYG/QWNul/FYJI1e8=; b=k3zDwKkYdQ3+4mBJ9KfBVre30MSgZFIVJxXjMLLCdYBKICb4/43jMn+UPzNiqhlrjc /XT8hFdp6nPLExECY351M0NKJLXZYok1PKYpO6h5w2wPjVm92tOrgKcawxeM08v4/jB2 CpEAR1Bx4qiQZ6omicg86kGM21iNbfQFiIy6ghWyIZZB/hLTrPBb9oXobpgzJdaj6wZ2 UzQr6TlPE5M4uZ4DKUepPO1n2glOKf+OnE+Sf/xDUv+dpD79lzV73d1qryofDKvUI2xF 5A9lKNkERxfYvIaQ+fUZmp7bIBCv5vHR8GGpnuXmCMU/HEH8tZspnPvU6nXD4BKUSd8r b+ew== X-Forwarded-Encrypted: i=1; AJvYcCU8UTSD/BLPjtoyzXLKgjOcgA/lO7/zoDv8u7rwnTr4xIVYRHskEEouHH7qjVcG7prDky445ro=@dpdk.org X-Gm-Message-State: AOJu0Yzs1jQezTy4CbfC+0sv9b+PAIdsPCjdAJMpQfwECZf0rZzYF0iE NvzwMHdGTqEL7kI6ph1gccj9WckA6PjR9mo7Q/DMdS15/uqbgO3gZOsFVuvUmwI= X-Gm-Gg: ASbGnctKGEqd+RmbWkbVZETr+b00J9lCryv1oz5XxfX6K5riQjsNZUtywgzeOtIob8e ttv2bH5kGiO8RSVfbouTZgely74vnysnGR99qRlz8CkqSBme9dfUbSO47xKfjnGj/7kT99yeVc+ bVDo4Wu/fz/IhCXzQXQGE78ygPX3CmR4BoOjCLQjqRTrb14VBDna6X3oAjJshfk6shWLtmIQeCs k9jGv9VSw7tuN0XVWyMjrc9u6N14tsfeX9W4hrAE901oyvoDZQy8etlXnUop15NXsfLuoqjJSJp NAw7LIMquZlz6lwa3+rJHsQG5YjUIzbnf5OCtOlyHpTegfEo0dz3w/WaOjzwyHaPXNhx X-Google-Smtp-Source: AGHT+IEWxpHWDvpbhOvn19pWZ6hivmCB3EhgBJwlD2lP3t/4mGHLw5Pe2rb2Xb50upRhUUDqmo7JAQ== X-Received: by 2002:a17:902:da90:b0:21e:ff31:531 with SMTP id d9443c01a7336-21f4e6e8d6amr13399375ad.22.1738878167826; Thu, 06 Feb 2025 13:42:47 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21f363df2b4sm17711685ad.0.2025.02.06.13.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2025 13:42:47 -0800 (PST) Date: Thu, 6 Feb 2025 13:42:45 -0800 From: Stephen Hemminger To: Ariel Otilibili Cc: dev@dpdk.org, stable@dpdk.org, Thomas Monjalon , David Marchand , Maryam Tahhan , Ciara Loftus Subject: Re: [PATCH v8 2/2] net/af_xdp: Refactor af_xdp_tx_zc Message-ID: <20250206134245.0989988f@hermes.local> In-Reply-To: <20250206204645.1564535-3-ariel.otilibili@6wind.com> References: <20250116195640.68885-1-ariel.otilibili@6wind.com> <20250206204645.1564535-1-ariel.otilibili@6wind.com> <20250206204645.1564535-3-ariel.otilibili@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 6 Feb 2025 21:46:45 +0100 Ariel Otilibili wrote: > > +static inline struct xdp_desc * > +reserve_and_fill(struct pkt_tx_queue *txq, struct rte_mbuf *mbuf, > + struct xsk_umem_info *umem, void **pkt_ptr) > +{ > + struct xdp_desc *desc = NULL; > + uint64_t addr, offset; > + uint32_t idx_tx; > + > + if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) > + goto out; > + > + desc = xsk_ring_prod__tx_desc(&txq->tx, idx_tx); > + desc->len = mbuf->pkt_len; > + > + addr = (uint64_t)mbuf - (uint64_t)umem->buffer > + - umem->mb_pool->header_size; addr (and the cast of mbuf) should probably be uintptr_t since the intent is to do calculations with pointers.