Re: [PATCH net-next v5 1/4] net: devlink: let the core report the driver name instead of the drivers

From
Jiri Pirko <jiri@resnulli.us>
Date
2022-11-29 08:25:09
Also in
intel-wired-lan, linux-crypto, linux-rdma, lkml
Reply to
Vincent Mailhol, 2022-11-29
Tue, Nov 29, 2022 at 01:05:47AM CET, mailhol.vincent@wanadoo.fr wrote:
The driver name is available in device_driver::name. Right now,
drivers still have to report this piece of information themselves in
their devlink_ops::info_get callback function.

In order to factorize code, make devlink_nl_info_fill() add the driver
name attribute.

nla_put() does not check if an attribute already exists and
unconditionally reserves new space [1]. To avoid attribute
duplication, clean-up all the drivers which are currently reporting
the driver name in their callback.
This para with the link below should be removed, no need for it.

Otherwise, code looks fine.

Reviewed-by: Jiri Pirko <redacted>
Thread (17 messages) 17 messages, 5 authors, last reply 2022-11-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help