From patchwork Tue Oct 1 23:52:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Damato X-Patchwork-Id: 13819044 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (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 DB8C81E1A36 for ; Tue, 1 Oct 2024 23:54:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727826847; cv=none; b=EZCcTCM8FnHZPmT8oWuG1u8snRTweI3MECW1Bit+S9/pq/IPe8f3JiGcN8iKcS2BQyn3lFwQ4TeEKyc6wVR1Qd3sjFBQtYAAZ+BDjWL5qOEr4iPL7RtfFCzaizdn1JMQbSFeQdjBX1pvct0LgpK9E44J/SZwQVY+KPv3xzBYAw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727826847; c=relaxed/simple; bh=V1cs8PIynlwOrqpZWUDccPgmCikFp/sP5CKLnXd9jKQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SDeZWen0+/u3SgU7yKaksgFTHk6+qNndEypmRzcijPbyewCCJaM3PEH7dVgUufszm12RZDSBPFT0PZUwbGgZ2dB7ulsVX1xjyuQpcJ5u2gQ7wmGxrk3oUDwjy7XU6b8XeBo8xLkBJXAz5NnwOnQyAtdF4TBx2X8u5FYfEduakYo= 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=EpY8Z0zX; arc=none smtp.client-ip=209.85.216.44 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="EpY8Z0zX" Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2e188185365so237827a91.1 for ; Tue, 01 Oct 2024 16:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1727826845; x=1728431645; 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=aGBwpUl9kCiLHYdWMLl9DJsonbhtGhnaZmowBhBViU8=; b=EpY8Z0zXPyx4D8vghd4Og9TjmOW7gDpPw2BctIZ0EKOI2CwOyGK6Ypqf/h78/VSyW8 PJISXlt5wEkx8bpSNkSSNgY2qtNWuIvZ/wUujvTfeXh1APCzlDLY2JGiRdmFdVojerTq odGryhVp9wz1xmxKWHmWmABLlHdEWs9/flG1w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727826845; x=1728431645; 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=aGBwpUl9kCiLHYdWMLl9DJsonbhtGhnaZmowBhBViU8=; b=hQ+JewgdoPnSXKJ1pIlhJ36HleKNv03rBjoTnYPnI0pXELBnGx7Hy9TwM3eg2CCDVf Y/7A7ZEfZZuvyq22Pvcfk8oZ3Pv2MBZO4TLvaGk9mJ1mXFujslC9HbJVQOxHVH5flmWd QFbG2mUshmr9+gKZ9PaTLy28hWiaQShWvQpUaR3gU2dVPHsgdvbj7GkS1cRT+ASQeWAl wF9m75jOc67fssBxwO3Z2ad0gLwVaxPVmS/5WqlnO5qfu+h9+Za6wtGvP8jmTrlt+kt+ lXFB1oKw4mQyLAMb6VAUMGiyrGMloZK0WUXM19L+gykcyMPc0Xn1lUs1RlWbu/DAgha+ CZ8w== X-Forwarded-Encrypted: i=1; AJvYcCUgxJSFApolJYK+osOK9bSxF9orecWwzLcNGmleaAHFFq9LNJ6oiiawzqhsUGkfeEGHjMcxPbchgV5q@vger.kernel.org X-Gm-Message-State: AOJu0YxYep9fEsfe8D+HaarSHyOEexP6C7j4Kx3pi4333hJEgImm5Rv6 0zpwMdClXCavrm2H6IvmtlOyVhyjvwuDorNsx+tuIFJdoFiUTWnMEo4KQsfuBFg= X-Google-Smtp-Source: AGHT+IHH0M+tYuCS0vhSmHV9gXbNu6UtuY0Q3nfoA1P+p7ZvG4sPDyAAL0B88yi8W5maqglkVlbXeg== X-Received: by 2002:a17:90a:604b:b0:2d3:c638:ec67 with SMTP id 98e67ed59e1d1-2e182ca768fmr1714582a91.0.1727826845207; Tue, 01 Oct 2024 16:54:05 -0700 (PDT) Received: from localhost.localdomain ([2620:11a:c019:0:65e:3115:2f58:c5fd]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e18f89e973sm213130a91.29.2024.10.01.16.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 16:54:04 -0700 (PDT) From: Joe Damato To: netdev@vger.kernel.org Cc: mkarsten@uwaterloo.ca, skhawaja@google.com, sdf@fomichev.me, bjorn@rivosinc.com, amritha.nambiar@intel.com, sridhar.samudrala@intel.com, willemdebruijn.kernel@gmail.com, Joe Damato , Saeed Mahameed , Tariq Toukan , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-rdma@vger.kernel.org (open list:MELLANOX MLX5 core VPI driver), linux-kernel@vger.kernel.org (open list) Subject: [RFC net-next v4 8/9] mlx5: Add support for persistent NAPI config Date: Tue, 1 Oct 2024 23:52:39 +0000 Message-Id: <20241001235302.57609-9-jdamato@fastly.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241001235302.57609-1-jdamato@fastly.com> References: <20241001235302.57609-1-jdamato@fastly.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use netif_napi_add_config to assign persistent per-NAPI config when initializing NAPIs. Signed-off-by: Joe Damato --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index a5659c0c4236..09ab7ac07c29 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -2697,7 +2697,7 @@ static int mlx5e_open_channel(struct mlx5e_priv *priv, int ix, c->aff_mask = irq_get_effective_affinity_mask(irq); c->lag_port = mlx5e_enumerate_lag_port(mdev, ix); - netif_napi_add(netdev, &c->napi, mlx5e_napi_poll); + netif_napi_add_config(netdev, &c->napi, mlx5e_napi_poll, ix); netif_napi_set_irq(&c->napi, irq); err = mlx5e_open_queues(c, params, cparam); From patchwork Tue Oct 1 23:52:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Damato X-Patchwork-Id: 13819045 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (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 8599A1E2030 for ; Tue, 1 Oct 2024 23:54:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727826848; cv=none; b=MFQK/+wM6mxXnZXfG3uC40OVHVbqwCDshCpQwx1VsO2AhxZ3AA0avZVAMpyc9GLq4XEFPAF59o7irQ+2uf4uRQ9ofHKGR39vmqrSaSLF6BthMUKDScCjzfmGmWud6etML/PDM5fX1E5m3mtjJzTyoaw0BKGoGuAj5HRfzCQy0GA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727826848; c=relaxed/simple; bh=acO4k3Tl1873YqlB+9+oRM1/HbYr6wa8DEvdBbXxJoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=N2Op06lxQ6nVw6M34OuhocRnYeFpmptbxUjWKDBqUefaRBTI8yTg6ObZVaso7KGJjH17jTeVn9g/Ep1ClNSMyXgOUDqy6swKAJAQQqc6F233RYaOlQG3XfUw+nbxUVEMZtgx4Tq0JLMJGqDchToRgunrRHFbJoGlyLY6qfRzv7w= 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=I9CuXGuZ; arc=none smtp.client-ip=209.85.216.45 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="I9CuXGuZ" Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2e0be1afa85so4391792a91.1 for ; Tue, 01 Oct 2024 16:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1727826847; x=1728431647; 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=PGtnVysYWBB+XDp/kZF0mQyFvrv7Ut5AwNUz8on3uqI=; b=I9CuXGuZCTP3ykMhvyDAZ3l2VCzD+7AFe15fY10/SC64P7jfCeMu44RPAapDArvRNa +O9ayxq+2/5owICuq02oO5dZ9kAd00aJK+IsJ5aEuNo3NUOH/CRoN6i7UMAagl24I4Q3 aJF29Wq5iOl8V13wSgyVBST713b896eQivgFU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727826847; x=1728431647; 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=PGtnVysYWBB+XDp/kZF0mQyFvrv7Ut5AwNUz8on3uqI=; b=N5tizfcEkSQJPCRLXL+mSkdc1GOSkp4bJ42LsY77UEe2dZnP5vc8Xy/XTR3cqMsBHy L/O1H2RhclZCitIBEUks/T7tHkJVeZpzepJIrF/Vm9/iJXRNNueaSM/zGDHTWMw9Zrej OfCZlKqacYf8ll8QzHwmVPv4HUYpYxPP8/uufXWZGs9DICiwJ42fXeAz0ZznxqNfQdLU eDF+yk4Pba90SkrI68a+1ihWI/pjsAuThMmsiNtnRxg0peE3uGYQNUQC7fLiqK+mzzjd IFeDVO7DTvctd7Z1RS4Q4w+VX45PQljeZaAiV2ehqdl8pdioa8eW1nVkS/jrGEOAwBlj dGwA== X-Forwarded-Encrypted: i=1; AJvYcCVzQTvrTDZNBvtyRkoQB0m5MCBeljugT+yd77NhXBDedaGVbUy9UyDWevZmmb4p5SUWTCKqAIuwS0RF@vger.kernel.org X-Gm-Message-State: AOJu0Yx6Q1pfu1tQCd1GRkdrwG/WJ5AcgEmGopKiugHBsMbeTD3aK5JD GChc3F7kcSXxo3Q+3QbKiVDnRN1rizpwvXjINrPRR3KdId54MHZLFx49ZGG9WfM= X-Google-Smtp-Source: AGHT+IFCgBS+YgTB1iRrCXeD774tHuBkiuRdbbUI5qwujyFtDh9/oA9HeddTZv+rnPbzAgKNnb5EZQ== X-Received: by 2002:a17:90a:bd0c:b0:2d8:aa9c:e386 with SMTP id 98e67ed59e1d1-2e18455c8e2mr1759138a91.14.1727826846920; Tue, 01 Oct 2024 16:54:06 -0700 (PDT) Received: from localhost.localdomain ([2620:11a:c019:0:65e:3115:2f58:c5fd]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e18f89e973sm213130a91.29.2024.10.01.16.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 16:54:06 -0700 (PDT) From: Joe Damato To: netdev@vger.kernel.org Cc: mkarsten@uwaterloo.ca, skhawaja@google.com, sdf@fomichev.me, bjorn@rivosinc.com, amritha.nambiar@intel.com, sridhar.samudrala@intel.com, willemdebruijn.kernel@gmail.com, Joe Damato , Tariq Toukan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , 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 v4 9/9] mlx4: Add support for persistent NAPI config to RX CQs Date: Tue, 1 Oct 2024 23:52:40 +0000 Message-Id: <20241001235302.57609-10-jdamato@fastly.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241001235302.57609-1-jdamato@fastly.com> References: <20241001235302.57609-1-jdamato@fastly.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use netif_napi_add_config to assign persistent per-NAPI config when initializing RX CQ NAPIs. Presently, struct napi_config 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/ethernet/mellanox/mlx4/en_cq.c index 461cc2c79c71..0e92956e84cf 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, struct mlx4_en_cq *cq, break; case RX: cq->mcq.comp = mlx4_en_rx_irq; - netif_napi_add(cq->dev, &cq->napi, mlx4_en_poll_rx_cq); + netif_napi_add_config(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);