lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240618085548.GF8447@kernel.org>
Date: Tue, 18 Jun 2024 09:55:48 +0100
From: Simon Horman <horms@...nel.org>
To: Geetha sowjanya <gakula@...vell.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, kuba@...nel.org,
	davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
	sgoutham@...vell.com, sbhatta@...vell.com, hkelam@...vell.com
Subject: Re: [net-next PATCH v5 09/10] octeontx2-pf: Add representors for sdp
 MAC

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@...vell.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
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ