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: <20231211121240.ooufyapz6rswyrbn@skbuf>
Date: Mon, 11 Dec 2023 14:12:40 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: Roger Quadros <rogerq@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, s-vadapalli@...com, r-gunasekaran@...com,
	vigneshr@...com, srk@...com, horms@...nel.org, p-varis@...com,
	netdev@...r.kernel.org
Subject: Re: [PATCH v7 net-next 6/8] net: ethernet: ti: am65-cpsw-qos: Add
 Frame Preemption MAC Merge support

On Fri, Dec 08, 2023 at 02:33:00PM +0200, Roger Quadros wrote:
> But,
> 
> bool __ethtool_dev_mm_supported(struct net_device *dev)
> {
> 	const struct ethtool_ops *ops = dev->ethtool_ops;
> 	struct ethtool_mm_state state = {};
> 	int ret = -EOPNOTSUPP;
> 
> 	if (ops && ops->get_mm)
> 		ret = ops->get_mm(dev, &state);
> 
> 	return !ret;
> }
> 
> So looks like it is better to not define get_mm/set_mm if CONFIG_TI_AM65_CPSW_TAS is disabled.

Why not? __ethtool_dev_mm_supported() returns true if os->get_mm() is
implemented and returns 0. You return -EOPNOTSUPP, and that's different
from 0.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ