All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Geetha sowjanya <gakula@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
	edumazet@google.com, sgoutham@marvell.com, sbhatta@marvell.com,
	hkelam@marvell.com
Subject: Re: [net-next PATCH v5 09/10] octeontx2-pf: Add representors for sdp MAC
Date: Tue, 18 Jun 2024 09:55:48 +0100	[thread overview]
Message-ID: <20240618085548.GF8447@kernel.org> (raw)
In-Reply-To: <20240611162213.22213-10-gakula@marvell.com>

On Tue, Jun 11, 2024 at 09:52:12PM +0530, Geetha sowjanya wrote:
> Hardware supports different types of MACs eg RPM, SDP, LBK.
> Also, hardware doesn't have an internal switch. LBK is a
> loopback mac which punts egress pkts back to ingress pipeline.
> RPM and SDP MACs support ingress/egress pkt IO on interfaces with
> different set of capabilities like interface modes ranging from
> 10/100/1000BaseX to 100Gbps KR modes.
> 
> At the time of netdev driver registration PF will
> seek MAC related information from Admin function driver
> 'drivers/net/ethernet/marvell/octeontx2/af' and sets up ingress/egress
> queues etc such that pkt IO on the channels of these different MACs is
> possible. This patch add representors for SDP MAC.
> 
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>

...

> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c

...

> @@ -683,6 +684,15 @@ static int otx2vf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  		snprintf(netdev->name, sizeof(netdev->name), "lbk%d", n);
>  	}
>  
> +	if (is_otx2_sdp_rep(vf->pdev)) {
> +		int n;
> +
> +		n = (vf->pcifunc >> RVU_PFVF_FUNC_SHIFT) & RVU_PFVF_FUNC_MASK;

nit: This seems to open-code FIELD_GET

> +		n -= 1;
> +		snprintf(netdev->name, sizeof(netdev->name), "sdp%d-%d",
> +			 pdev->bus->number, n);
> +	}
> +
>  	err = register_netdev(netdev);
>  	if (err) {
>  		dev_err(dev, "Failed to register netdevice\n");
> -- 
> 2.25.1
> 
> 

  reply	other threads:[~2024-06-18  8:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 16:22 [net-next PATCH v5 00/10] Introduce RVU representors Geetha sowjanya
2024-06-11 16:22 ` [net-next PATCH v5 01/10] octeontx2-pf: Refactoring RVU driver Geetha sowjanya
2024-06-15 11:15   ` Markus Elfring
2024-06-18  9:03     ` [EXTERNAL] " Geethasowjanya Akula
2024-06-18  7:40   ` Simon Horman
2024-06-24  9:56     ` Geethasowjanya Akula
2024-06-11 16:22 ` [net-next PATCH v5 02/10] octeontx2-pf: RVU representor driver Geetha sowjanya
2024-06-14  2:02   ` Jakub Kicinski
2024-06-18  9:08     ` [EXTERNAL] " Geethasowjanya Akula
2024-06-15 15:11   ` Markus Elfring
2024-06-17 19:49     ` Simon Horman
2024-06-25 11:58     ` [EXTERNAL] " Geethasowjanya Akula
2024-06-11 16:22 ` [net-next PATCH v5 03/10] octeontx2-pf: Create representor netdev Geetha sowjanya
2024-06-18  8:25   ` Simon Horman
2024-06-24  8:49     ` Geethasowjanya Akula
2024-06-11 16:22 ` [net-next PATCH v5 04/10] octeontx2-pf: Add basic net_device_ops Geetha sowjanya
2024-06-11 16:22 ` [net-next PATCH v5 05/10] octeontx2-af: Add packet path between representor and VF Geetha sowjanya
2024-06-17 20:19   ` Simon Horman
2024-06-18  8:38   ` Simon Horman
2024-06-19 12:16     ` [EXTERNAL] " Geethasowjanya Akula
2024-06-11 16:22 ` [net-next PATCH v5 06/10] octeontx2-pf: Get VF stats via representor Geetha sowjanya
2024-06-20 12:54   ` Simon Horman
2024-06-20 12:56   ` Simon Horman
2024-06-11 16:22 ` [net-next PATCH v5 07/10] octeontx2-pf: Add support to sync link state between representor and VFs Geetha sowjanya
2024-06-20 12:56   ` Simon Horman
2024-06-11 16:22 ` [net-next PATCH v4 08/10] octeontx2-pf: Configure VF mtu via representor Geetha sowjanya
2024-06-20 12:56   ` Simon Horman
2024-06-11 16:22 ` [net-next PATCH v5 09/10] octeontx2-pf: Add representors for sdp MAC Geetha sowjanya
2024-06-18  8:55   ` Simon Horman [this message]
2024-06-11 16:22 ` [net-next PATCH v5 10/10] octeontx2-pf: Add devlink port support Geetha sowjanya
2024-06-20 12:57   ` Simon Horman

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=20240618085548.GF8447@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.