Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp44349lqc; Thu, 7 Mar 2024 09:49:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU2pDyPIE0/fsNX+/f5zljD4QGY0ZmWwkW5B1U6U8O8rF4Cm3pYa6vxH+8iKzWNIf02ebDaB2hB/liGrrXd8wHxf1qnd1s2N+ZtvM0bqg== X-Google-Smtp-Source: AGHT+IGRJxTGjiYibh8M6DTFdu2QQ8ZwsVN86y0u3FCAjISPDLSKDFsjNbVZ5VjGkOIgS+/x5uI5 X-Received: by 2002:a2e:a229:0:b0:2d2:d6a0:6f3e with SMTP id i9-20020a2ea229000000b002d2d6a06f3emr1817624ljm.13.1709833755166; Thu, 07 Mar 2024 09:49:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709833755; cv=pass; d=google.com; s=arc-20160816; b=Fy/aLWNzFYhcrvNQlXR3KwoP4pIbkYH/HcViwijLqphfjI0ZGYU8CSX43MKBxuOBpB o9tp2+VaXT1lp33UsFvMFZGYY6UCusv8VYiDICS65eLVKKh30mnHUmJcZvLFSsuym7/T FvvJunkf/k6tbt1CF7FQ5I5qVF8tTrRQmCEGz8UByjC8Ag2aKt4sEdNooSKiZKPyF1TP k1js6aypU6j2auTVJqAnbFQWqYfnf77h1Ktex+CiBKm44ab46noFTVkCbIx39Qnu9sh7 DMwOgeVL2NTojdEOoyewmjCHYSiCyOvTn9dsnpmFfdebhbpSqR2kb+dp6QLA0wY6g6rP tzOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=3azFskcK1Kr594pn4cAjp31V8LFrQG4+hgU7A9RDIXk=; fh=WDh2MmMZF0/hlxpNm8LSRqPJTJBho+OPKzlqqC3IhBc=; b=tZdrRGWjCw+R8JEWy2I9xsg3+MDTT0/SSLW2fbljmVVranjf8Wr0GUgbZatMdl1Q4x MOb8a8hlyNNWjXwhTIcBmJvmi7Ysvf4RDsfFrKBjp/IBRS5qBqFWnnFHToyap7boi6Td 3b5GvaRxKq+qNGhgPwDldISTATW39OXT/MrU33+rreFCln44Bxp+bToSFfaO8fVeJBsK THk3RSlfGnsIJlX+2z116O0BL5SDxJ06hRI4JHQRkHNeGtYOoWWUDvbyUMPHdwfp+J+a +Cocj+LHodkYk1vj3p4Ob1mRfjvoIv/McMCQ3E4iubO6GHxqBaS2vi2B49R3iEb6OjdS WJ7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L9eY9P8G; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-95971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95971-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f25-20020a170906049900b00a45c94a21fasi929045eja.826.2024.03.07.09.49.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 09:49:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L9eY9P8G; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-95971-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95971-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C43591F216DA for ; Thu, 7 Mar 2024 17:49:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70027131750; Thu, 7 Mar 2024 17:49:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="L9eY9P8G" Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F5DB12FB2B; Thu, 7 Mar 2024 17:49:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709833743; cv=none; b=QlUPijXGlEAuY8A1xdq7h5pvGNMrOjxQuSRAwZBF4r3Nno8fWJAmHOzFKFzCIkkxCxPcvpPOk/+8JcesXM7TedJs+tjlko5uR7oy6j0F3cYWNj1zJjVtmIPrTQW608ZUQjizrhMOpFl5uu2TFP+bUtWPJLreZWL+NkO0gKRzzno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709833743; c=relaxed/simple; bh=SWaaB0XQCIhzAS6EmdUMQf+lLQWEmTzrwTE2/ASS73A=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AbUPgOgRq8h8XoeitHtziEpt2PIMU7lJdmLHyB1OIcsCJO3T9WJuUsbBJ2hxyiCekXw6wi8yhbO+im0qDh5gBN+Gfhp9kwBgrYJKGABW0uPZbGTk8kfnjT1UEESmQ+MerDOLhC0cU2F22E0x/AFq3cLozCNeMkaY1sLmsZ9XCTs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=L9eY9P8G; arc=none smtp.client-ip=209.85.160.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-42ee7fa077bso5066731cf.3; Thu, 07 Mar 2024 09:49:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709833741; x=1710438541; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3azFskcK1Kr594pn4cAjp31V8LFrQG4+hgU7A9RDIXk=; b=L9eY9P8GPvIGZ/1AOuhnZEwuBhpYq56SeoWY1rLiw87s+jgS3BBHoi7yJvP1jgb++y s8vK3J4LizPptbc+OgZ/o0E+xHvH9rcCNXde+hMRqFjdtj4DGF+ep+iMSkxkbXXEFxrv AeqYtGINbZrwyeExt2bzwDETTVUsYViEI7umLKHjQgX7HjdwSPLgVBDpT7vTFOp6s//T GdlGxEwbma+TjI5bN+Lk+5kVfM+bSO//fP77Deq8RLZGaUulVp1PQX8r3amZ5r7hKNza vzDYa/aRVSrgDwq5/nE7sWvgswRUcqiHnUzisfEnKRUgGN+aSoS60hafHd3GBrmkVK5O Ju5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709833741; x=1710438541; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3azFskcK1Kr594pn4cAjp31V8LFrQG4+hgU7A9RDIXk=; b=EhxOCExzdQjIEW+Qq6EiHvdRQgACrBDPsGyaSNEsr63ZoHkzjFWvTqK5bqvoQfF1sQ L3aLA60Td+5iPW6lzWk/dGWEb89fUbv9OvHN4izFRTkXtLKfyxZjgkTVtyu7A509tTD1 8A9jzC8kePe/p7kmMxm0CRNl0YrD8mP+Lhf44bUyA0jacMMerpwYLUg0MmRqBZqDBlft rW8/2M3pcFAKFGcf7+VbEwuxD2qlyeQT9WVM/GAqAO08aEeYphQtPOcfW/71LiSvUuo2 bmfGCMXwfx+e3vZ88NcPdyMO1uvq2hUHEIST94xZ+i1UrmS1OpiohIOo3Mu1EMPtrjwk Y1Xw== X-Forwarded-Encrypted: i=1; AJvYcCVrXTwBU+83xKFF1EzF8veIrgJ/zYBqEbjN0csQXidimZay5WRidUowZ3mI/VEEEq4fv5l7+fuf7L7CAsOFnoMrCUMY/dpCwbbu8fuSGywDGHxVwNly91p4AiYjleNHThsUD370jkmqTrX/U1w3b52MHyM9mBKoPpAp X-Gm-Message-State: AOJu0YxMIw2eZhgdYm9nZ+2rZKeKYMmuXVr+linQ4Rit+DfOhKSMqs63 BIrikzMJeF2hyZ4qSXFVxxM52MVmeNAVJe2pNiOfnpGN6U16GYeb4QN7GWWI17lrWawSg+2Z9Zu xOYlXzemiM/WbeoPzaYjTQ8SkPKksMU1OLV3fGw== X-Received: by 2002:a05:622a:15d6:b0:42e:da48:fbb3 with SMTP id d22-20020a05622a15d600b0042eda48fbb3mr8812751qty.41.1709833740937; Thu, 07 Mar 2024 09:49:00 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240307142402.906681-1-dgouarin@gmail.com> In-Reply-To: From: david gouarin Date: Thu, 7 Mar 2024 18:48:50 +0100 Message-ID: Subject: Re: [PATCH net v2] dpaa_eth: fix XDP queue index To: Maciej Fijalkowski Cc: david.gouarin@thalesgroup.com, Madalin Bucur , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Camelia Groza , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le jeu. 7 mars 2024 =C3=A0 16:51, Maciej Fijalkowski a =C3=A9crit : > > On Thu, Mar 07, 2024 at 03:24:02PM +0100, David Gouarin wrote: > > Make it possible to bind a XDP socket to a queue id. > > The DPAA FQ Id was passed to the XDP program in the XDP packet metadata > > which made it unusable with bpf_map_redirect. > > I think that referring to a member from xdp_rxq_info struct as 'packet > metadata' is confusing. I was trying to find a place where you are > actually storing this id at xdp_buff::data_meta. This is not happening > AFAICT. Thing is that xsk_rcv_check() picks xdp->rxq->queue_index which > holds fqid which is not related to queue number, right? Correct. I have used the term xdp metadata because that is the terminology used in the xdp program (struct xdp_md). I should have said instead : The DPAA FQ Id was passed to the XDP program in the xdp_rxq_info->queue_ind= ex instead of the queue number [...] Maciej please forgive me for the double send and formatting mistakes, kernel mailing lists are new to me. > > > Instead of the DPAA FQ Id, initialise the XDP rx queue with the channel= id. > > > > Fixes: d57e57d0cd04 ("dpaa_eth: add XDP_TX support") > > > > Signed-off-by: David Gouarin > > --- > > v2: add Fixes: in description > > --- > > drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/n= et/ethernet/freescale/dpaa/dpaa_eth.c > > index dcbc598b11c6..988dc9237368 100644 > > --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c > > +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c > > @@ -1154,7 +1154,7 @@ static int dpaa_fq_init(struct dpaa_fq *dpaa_fq, = bool td_enable) > > if (dpaa_fq->fq_type =3D=3D FQ_TYPE_RX_DEFAULT || > > dpaa_fq->fq_type =3D=3D FQ_TYPE_RX_PCD) { > > err =3D xdp_rxq_info_reg(&dpaa_fq->xdp_rxq, dpaa_fq->net_= dev, > > - dpaa_fq->fqid, 0); > > + dpaa_fq->channel, 0); > > if (err) { > > dev_err(dev, "xdp_rxq_info_reg() =3D %d\n", err); > > return err; > > -- > > 2.34.1 > >