[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMDZJNWWYhdCUvo1FJoAOJ-=43aK6PppNas6st4bGPXUbVuDAA@mail.gmail.com>
Date: Thu, 25 Nov 2021 15:29:33 +0800
From: Tonghao Zhang <xiangxia.m.yue@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next 1/2] ifb: support ethtools driver info
On Thu, Nov 25, 2021 at 10:19 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 25 Nov 2021 10:01:54 +0800 xiangxia.m.yue@...il.com wrote:
> > +#define DRV_NAME "ifb"
> > +#define DRV_VERSION "1.0"
>
> Let's not invent meaningless driver versions.
Ok
> > +#define TX_Q_LIMIT 32
> > +
> > struct ifb_q_private {
> > struct net_device *dev;
> > struct tasklet_struct ifb_tasklet;
> > @@ -181,6 +185,12 @@ static int ifb_dev_init(struct net_device *dev)
> > return 0;
> > }
> >
> > +static void ifb_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
> > +{
> > + strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
>
> Can we make core fill in driver name from rtnl_link_ops so we don't
> need to do it in each driver?
Good idea! v2 is sent out, please review.
https://patchwork.kernel.org/project/netdevbpf/patch/20211125072544.32578-1-xiangxia.m.yue@gmail.com/
> > + strlcpy(info->version, DRV_VERSION, sizeof(info->version));
>
> Leave this field as is, core should fill it with the kernel release.
Ok
> > +}
--
Best regards, Tonghao
Powered by blists - more mailing lists