From nobody Sat Nov 30 06:51:10 2024 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 718EB1A3AB4 for ; Thu, 12 Sep 2024 10:08:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726135719; cv=none; b=kaLzEFnuHZVUitPCvqB01ANxRGn9j53ojLgsy6qIW9Uw+N/TRm4I5kNqx4wJvx7si7pULbmNXwFEC5nUY9A2eQcl/bn/SKSvPJYLflLBj8mXR6hsS55EwoQv58QYjCybtD1UZItRmREWkXEUcaUEn6n1kp94yXjmwIjSmA6Wyw8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726135719; c=relaxed/simple; bh=s/eB0UYTC1AYEEH3VudRQLi/msdkh7jY0S2zgb5pk80=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q9sXN/CrqPaZCOSXH98Xv/P65wOF+2n6OmmCqefCgTCvWeK6CEQmPtMEkf+sjz4BH1PbTftRz8Rfk4I3biyc4IGuqCNgGTRRGAMCWkZkICLSPZ8chY4qWOJGhrWljYf6K9Q6Nb7YqUiypFoiaWW5O8qvhBzDNKWdEwNrhZou+G4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com; spf=pass smtp.mailfrom=fastly.com; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b=ESZemDJh; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastly.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b="ESZemDJh" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-20696938f86so6371505ad.3 for ; Thu, 12 Sep 2024 03:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1726135718; x=1726740518; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6mXBwSKozkxlqlprwr3kG9JlKq4geePGoujrr2DPc0I=; b=ESZemDJh6wcHZ24cPeu6kffi6G91KixdQD9FFfPtRLjr4n2lZYtJWO1/jb5y6q1XeR aCIPD1RWZ0OmqDGfP1UO8nOvrK/pKUpqj4QAzrmquTF8/ckZP2pSsqVjWxOQZ2jUSdsN 9sXRbxrVwnOTUuEeD8xdET4hxh10fkAD8hnWw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726135718; x=1726740518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6mXBwSKozkxlqlprwr3kG9JlKq4geePGoujrr2DPc0I=; b=vdVafzgfqu7H4STqccBpys8ON/GGu76YqRMaM5sSYZki1qzF5hlw54AK3Oc6A2Bnc7 HeDpGD+PXzcZcL6OQLF9XiZTCzqPr5i1TpjVfL32I4dSTmIi7UARQM2+7D5UYwqTLl9w 26Yit5bzVO1nYj+D6tAaJbIzgOr2o5RNOOz7wWOApIxuhOZSvM3I1glc1GOJZOtV2Pf4 u9w39nDsEqxOoC8g6JmZa9Mt06zpHCjCTGA25RIdJLsEth9ykj/fouCurr1TDd4oaiqR 6tkpCZElaVc1vpsk8S9x3xsW88aZ3fNysAzhuB62QBTLaE2uIcpPoRDwmRiH3OnHEgoT C6uw== X-Forwarded-Encrypted: i=1; AJvYcCVXb6S8D+Y8o/2Y78JNFNV4GULqIc+rkmsMi9JdAiklhnn0YeYGBnwfcDrdyVCQ7mN5nuJC7v5omC6cJ5o=@vger.kernel.org X-Gm-Message-State: AOJu0YwkUEWULSec0rKse6fT4WTFy/RUwi0RXOKwTPm3u1EPkYiIHgVA L3i9zSMgf0arUmLlMfw73gbFCfp+KDjAzPB7iXmuHx73J7BQFZTJ7x0saH8AhyI= X-Google-Smtp-Source: AGHT+IFSoMMNdhMqFLlbog9Rk12cky6TPNTKRafsz+QCYUczoZ8xRY18wAqCAs4kv3WrpdOHoCl8Fg== X-Received: by 2002:a17:903:4484:b0:202:5af:47fc with SMTP id d9443c01a7336-2076e347ef2mr23829015ad.13.1726135717792; Thu, 12 Sep 2024 03:08:37 -0700 (PDT) Received: from localhost.localdomain ([2620:11a:c019:0:65e:3115:2f58:c5fd]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2076afe9da3sm11583795ad.239.2024.09.12.03.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 03:08:37 -0700 (PDT) From: Joe Damato To: netdev@vger.kernel.org Cc: mkarsten@uwaterloo.ca, kuba@kernel.org, skhawaja@google.com, sdf@fomichev.me, bjorn@rivosinc.com, amritha.nambiar@intel.com, sridhar.samudrala@intel.com, Joe Damato , Tariq Toukan , "David S. Miller" , Eric Dumazet , Paolo Abeni , linux-rdma@vger.kernel.org (open list:MELLANOX MLX4 core VPI driver), linux-kernel@vger.kernel.org (open list) Subject: [RFC net-next v3 9/9] mlx4: Add support for napi storage to RX CQs Date: Thu, 12 Sep 2024 10:07:17 +0000 Message-Id: <20240912100738.16567-10-jdamato@fastly.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240912100738.16567-1-jdamato@fastly.com> References: <20240912100738.16567-1-jdamato@fastly.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use netif_napi_add_storage to assign per-NAPI storage when initializing RX CQ NAPIs. Presently, struct napi_storage only has support for two fields used for RX, so there is no need to support them with TX CQs, yet. Signed-off-by: Joe Damato --- drivers/net/ethernet/mellanox/mlx4/en_cq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ether= net/mellanox/mlx4/en_cq.c index 461cc2c79c71..6943268e8256 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c @@ -156,7 +156,8 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, stru= ct mlx4_en_cq *cq, break; case RX: cq->mcq.comp =3D mlx4_en_rx_irq; - netif_napi_add(cq->dev, &cq->napi, mlx4_en_poll_rx_cq); + netif_napi_add_storage(cq->dev, &cq->napi, mlx4_en_poll_rx_cq, + cq_idx); netif_napi_set_irq(&cq->napi, irq); napi_enable(&cq->napi); netif_queue_set_napi(cq->dev, cq_idx, NETDEV_QUEUE_TYPE_RX, &cq->napi); --=20 2.25.1