Netdev List
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<donald.hunter@gmail.com>, <edumazet@google.com>,
	<horms@kernel.org>, <jiri@resnulli.us>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <sgoutham@marvell.com>
Subject: Re: [PATCH v19 net-next 1/9] octeontx2-af: Enforce single RVU AF probe
Date: Fri, 5 Jun 2026 13:17:55 +0530	[thread overview]
Message-ID: <aiJ_K-Z7bV1Syyde@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <20260605035030.3195141-2-rkannoth@marvell.com>

On 2026-06-05 at 09:20:21, Ratheesh Kannoth (rkannoth@marvell.com) wrote:
> There is only one admin-function PCI device per system.
> Reject any additional AF probe with -EBUSY so the driver model matches
> hardware and automated reviewers can rely on a single bound instance.
>
> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>

Apologies. Mavell SMTP server had many issues which resulted delaying,requeing, resending
emails. Sorry for the noise. Please abandon this set as another patch (same patch) is
active.
pw-bot: changes-requested

> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
> index 3cf131508ecf..1f0c962e10f4 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
> @@ -3542,12 +3542,19 @@ static void rvu_update_module_params(struct rvu *rvu)
>  		kpu_profile ? kpu_profile : default_pfl_name, KPU_NAME_LEN);
>  }
>
> +static atomic_t device_bound = ATOMIC_INIT(0);
> +
>  static int rvu_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct rvu *rvu;
>  	int    err;
>
> +	if (atomic_cmpxchg(&device_bound, 0, 1) != 0) {
> +		dev_warn(dev, "Only one af device is supported.\n");
> +		return -EBUSY;
> +	}
> +
>  	rvu = devm_kzalloc(dev, sizeof(*rvu), GFP_KERNEL);
>  	if (!rvu)
>  		return -ENOMEM;
> --
> 2.43.0
>

  reply	other threads:[~2026-06-05  7:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05  3:50 [PATCH v19 net-next 0/9] octeontx2-af: npc: Enhancements Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 1/9] octeontx2-af: Enforce single RVU AF probe Ratheesh Kannoth
2026-06-05  7:47   ` Ratheesh Kannoth [this message]
2026-06-05  3:50 ` [PATCH v19 net-next 2/9] octeontx2-af: npc: cn20k: debugfs enhancements Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 3/9] devlink: heap-allocate param fill buffers in devlink_nl_param_fill Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 4/9] devlink: Implement devlink param multi attribute nested data values Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 5/9] octeontx2-af: npc: cn20k: add subbank search order control Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 6/9] octeontx2: cn20k: Coordinate default rules with NIX LF lifecycle Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 7/9] octeontx2-af: npc: Support for custom KPU profile from filesystem Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 8/9] octeontx2: cn20k: Respect NPC MCAM X2/X4 profile in flows and DFT alloc Ratheesh Kannoth
2026-06-05  3:50 ` [PATCH v19 net-next 9/9] octeontx2-af: npc: cn20k: Allocate npc_priv and dstats dynamically Ratheesh Kannoth
2026-06-05  5:01 ` [PATCH v19 net-next 0/9] octeontx2-af: npc: Enhancements Ratheesh Kannoth
2026-06-05  5:54 ` Ratheesh Kannoth
2026-06-05  7:38 ` Ratheesh Kannoth
  -- strict thread matches above, loose matches on Subject: below --
2026-06-05  6:32 Ratheesh Kannoth
2026-06-05  6:32 ` [PATCH v19 net-next 1/9] octeontx2-af: Enforce single RVU AF probe Ratheesh Kannoth
2026-06-08  2:17   ` Ratheesh Kannoth
2026-06-08  2:25   ` Ratheesh Kannoth
2026-06-08 22:40   ` Jakub Kicinski
2026-06-09  1:43     ` Ratheesh Kannoth
2026-06-09  2:02       ` Jakub Kicinski
2026-06-09  2:26         ` Ratheesh Kannoth
2026-06-09  2:41           ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiJ_K-Z7bV1Syyde@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox