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: <03fa6e84-65a9-4563-b289-bd75508234a2@lunn.ch>
Date: Thu, 19 Dec 2024 09:46:42 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Gur Stavi <gur.stavi@...wei.com>
Cc: andrew+netdev@...n.ch, cai.huoqing@...ux.dev, corbet@....net,
	davem@...emloft.net, edumazet@...gle.com, gongfan1@...wei.com,
	guoxin09@...wei.com, horms@...nel.org, kuba@...nel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	meny.yossefi@...wei.com, netdev@...r.kernel.org, pabeni@...hat.com,
	shenchenyang1@...ilicon.com, shijing34@...wei.com,
	wulike1@...wei.com, zhoushuai28@...wei.com
Subject: Re: [RFC net-next v02 1/3] net: hinic3: module initialization and
 tx/rx logic

> > > +static int hinic3_sw_init(struct net_device *netdev)
> > > +{
> > > +	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> > > +	struct hinic3_hwdev *hwdev = nic_dev->hwdev;
> > > +	int err;
> > > +
> > > +	nic_dev->q_params.sq_depth = HINIC3_SQ_DEPTH;
> > > +	nic_dev->q_params.rq_depth = HINIC3_RQ_DEPTH;
> > > +
> > > +	hinic3_try_to_enable_rss(netdev);
> > > +
> > > +	eth_hw_addr_random(netdev);
> >
> > Is using a random MAC just a temporary thing until more code is added
> > to access an OTP?
> >
> 
> No, using a random MAC is not a temporary solution.
> This device is designed for cloud environments. VFs are expected to be
> used by VMs that may migrate from device to device. Therefore the HW does
> not provide a MAC address to VFs, but rather the VF driver selects a
> random MAC address and configures it into the (current) device.

If you look at MAC drivers in general, this is unusual. So it would be
good to add a comment why this unusual behaviour is used.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ