lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdXVbBciPriF6wWBUE0FHs3ZfEHAodFOsACiaMCEbLKpeg@mail.gmail.com>
Date: Thu, 22 May 2025 09:33:42 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Oliver Hartkopp <socketcan@...tkopp.net>, Jonathan Corbet <corbet@....net>, 
	Wolfgang Grandegger <wg@...ndegger.com>, "David S . Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Simon Horman <horms@...nel.org>, linux-can@...r.kernel.org, netdev@...r.kernel.org, 
	linux-doc@...r.kernel.org
Subject: Re: [PATCH] documentation: networking: can: Document alloc_candev_mqs()

Hi Marc,

On Wed, 21 May 2025 at 12:07, Marc Kleine-Budde <mkl@...gutronix.de> wrote:
> On 21.05.2025 11:51:21, Geert Uytterhoeven wrote:
> > Since the introduction of alloc_candev_mqs() and friends, there is no
> > longer a need to allocate a generic network device and perform explicit
> > CAN-specific setup.  Remove the code showing this setup, and document
> > alloc_candev_mqs() instead.
>
> Makes sense.
>
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> > ---
> > Dunno if this deserves
> > Fixes: 39549eef3587f1c1 ("can: CAN Network device driver and Netlink interface")
> >
> >  Documentation/networking/can.rst | 9 +++------
> >  1 file changed, 3 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/networking/can.rst b/Documentation/networking/can.rst
> > index b018ce346392652b..784dbd19b140d262 100644
> > --- a/Documentation/networking/can.rst
> > +++ b/Documentation/networking/can.rst
> > @@ -1106,13 +1106,10 @@ General Settings
> >
> >  .. code-block:: C
>
> This breaks the rst rendering. I think you should remove the "..
> code-block:: C"...

Doh, how did I miss that? Will fix...

>
> >
> > -    dev->type  = ARPHRD_CAN; /* the netdevice hardware type */
> > -    dev->flags = IFF_NOARP;  /* CAN has no arp */
> > +CAN network device drivers can use alloc_candev_mqs() and friends instead of
> > +alloc_netdev_mqs(), to automatically take care of CAN-specific setup:
>
> and add a second ":" after "setup:"
>
> >
> > -    dev->mtu = CAN_MTU; /* sizeof(struct can_frame) -> Classical CAN interface */
> > -
> > -    or alternative, when the controller supports CAN with flexible data rate:
> > -    dev->mtu = CANFD_MTU; /* sizeof(struct canfd_frame) -> CAN FD interface */
> > +    dev = alloc_candev_mqs(...);
> >
> >  The struct can_frame or struct canfd_frame is the payload of each socket
> >  buffer (skbuff) in the protocol family PF_CAN.
=
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ