Re: [PATCH net-next v2] net: sysfs: Implement is_visible for phys_(port_id, port_name, switch_id)
From: Paolo Abeni
Date: Tue May 27 2025 - 02:09:10 EST
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.
Paolo