Re: [PATCH net-next 10/10] wwan: core: add WWAN common private data for netdev

From
Sergey Ryazanov <ryazanov.s.a@gmail.com>
Date
2021-06-20 14:49:24
Reply to
Johannes Berg, 2021-06-15
Hello Johannes,

On Tue, Jun 15, 2021 at 10:31 AM Johannes Berg
[off-list ref] wrote:
On Tue, 2021-06-15 at 03:30 +0300, Sergey Ryazanov wrote:
quoted
The WWAN core not only multiplex the netdev configuration data, but
process it too, and needs some space to store its private data
associated with the netdev. Add a structure to keep common WWAN core
data. The structure will be stored inside the netdev private data before
WWAN driver private data and have a field to make it easier to access
the driver data. Also add a helper function that simplifies drivers
access to their data.

At the moment we use the common WWAN private data to store the WWAN data
link (channel) id at the time the link is created, and report it back to
user using the .fill_info() RTNL callback. This should help the user to
be aware which network interface is binded to which WWAN device data
Nit: "binded" -> "bound".
Oh. Will fix it in V2.
quoted
+static size_t wwan_rtnl_get_size(const struct net_device *dev)
+{
+     return
+             nla_total_size(4) +     /* IFLA_WWAN_LINK_ID */
+             0;
+}
Not sure I like that code style, but I guess I don't care much either :)
Yeah. I am not happy with that code style either. But this is the only
git-blame friendly style known to me that allows us to add new lines
without touching existing ones :(

-- 
Sergey
Thread (29 messages) 29 messages, 4 authors, last reply 2021-06-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