Re: [PATCH net-next v2] net: sysfs: Implement is_visible for phys_(port_id, port_name, switch_id)
From: Paolo Abeni
Date: Thu Jun 12 2025 - 05:29:31 EST
On 6/12/25 10:51 AM, Yajun Deng wrote:
> May 27, 2025 at 2:08 PM, "Paolo Abeni" <pabeni@xxxxxxxxxx> wrote:
>> On 5/21/25 4:08 PM, Yajun Deng wrote:
>>> phys_port_id_show, phys_port_name_show and phys_switch_id_show would
>>>
>>> return -EOPNOTSUPP if the netdev didn't implement the corresponding
>>>
>>> method.
>>>
>>>
>>>
>>> There is no point in creating these files if they are unsupported.
>>>
>>>
>>>
>>> Put these attributes in netdev_phys_group and implement the is_visible
>>>
>>> method. make phys_(port_id, port_name, switch_id) invisible if the netdev
>>>
>>> dosen't implement the corresponding method.
>>>
>>>
>>>
>>> Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>
>>>
>>
>> I fear that some orchestration infra depends on the files existence -
>>
>> i.e. scripts don't tolerate the files absence, deal only with I/O errors
>>
>> after open.
>>
>> It feel a bit too dangerous to merge a change that could break
>>
>> user-space this late. Let's defer it to the beginning of the next cycle.
>>
>
> Ping.
I was likely not clear. The above means you should re-submit the patch now.
/P