[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a162951-7f62-499e-98b4-cb0410cd9b1e@kernel.org>
Date: Mon, 11 Dec 2023 14:14:13 +0200
From: Roger Quadros <rogerq@...nel.org>
To: Vladimir Oltean <vladimir.oltean@....com>
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 11/12/2023 14:12, Vladimir Oltean wrote:
> 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.
Yes, I realized it eventually. Better to define it and return -EOPNOTSUPP if
CONFIG_TI_AM65_CPSW_TAS is not enabled.
--
cheers,
-roger
Powered by blists - more mailing lists