public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* of alloc_canxl_skb
@ 2024-09-13 14:03 Dr. David Alan Gilbert
  2024-09-13 19:51 ` Oliver Hartkopp
  0 siblings, 1 reply; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2024-09-13 14:03 UTC (permalink / raw)
  To: socketcan, mkl; +Cc: linux-can, linux-kernel

Hi Oliver, Marc,
  I'm doing some deadcode hunting and noticed that

  alloc_canxl_skb in drivers/net/can/dev/skb.c

looks unused in the main kernel tree; is that expected?
I see it was added back in 2022 by
  fb08cba12b52 ("can: canxl: update CAN infrastructure for CAN XL frames")

I know almost exactly nothing about CAN, so I thought it best
to ask!

Dave

-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: of alloc_canxl_skb
  2024-09-13 14:03 of alloc_canxl_skb Dr. David Alan Gilbert
@ 2024-09-13 19:51 ` Oliver Hartkopp
  2024-09-13 20:05   ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Hartkopp @ 2024-09-13 19:51 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, mkl; +Cc: linux-can, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]

Hi David,

On 13.09.24 16:03, Dr. David Alan Gilbert wrote:

>    I'm doing some deadcode hunting and noticed that
> 
>    alloc_canxl_skb in drivers/net/can/dev/skb.c
> 
> looks unused in the main kernel tree; is that expected?
> I see it was added back in 2022 by
>    fb08cba12b52 ("can: canxl: update CAN infrastructure for CAN XL frames")
> 
> I know almost exactly nothing about CAN, so I thought it best
> to ask!

I created some slides so that you can get an introduction to the 
different CAN protocols CAN CC (aka Classical CAN), CAN FD and CAN XL:

https://github.com/linux-can/can-doc/tree/master/presentations

The introduction of the CAN XL support lead to some clean up and rework 
also for the former alloc_can_skb() and alloc_canfd_skb() helpers.

The function is currently not in use in net/can/raw.c as it is only 
needed when a CAN XL frame is received from read hardware. But the patch 
also contains the definition of ETH_P_CANXL to already handle CAN XL 
frames properly inside the Linux kernel and e.g. for WireShark 4.4.

There are currently some CAN XL IP cores in development (see attached 
picture with an FPGA based IP core) and I am working on the kernel 
infrastructure (e.g. bitrate configuration enhancements) on this board. 
So alloc_canxl_skb() is already in use on my desk and there will be some 
more stuff showing up soon ;-)

Best regards,
Oliver

[-- Attachment #2: DE1_SoC_FPGA_working_setup.jpg --]
[-- Type: image/jpeg, Size: 236146 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: of alloc_canxl_skb
  2024-09-13 19:51 ` Oliver Hartkopp
@ 2024-09-13 20:05   ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2024-09-13 20:05 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: mkl, linux-can, linux-kernel

* Oliver Hartkopp (socketcan@hartkopp.net) wrote:
> Hi David,

Hi Oliver,

> On 13.09.24 16:03, Dr. David Alan Gilbert wrote:
> 
> >    I'm doing some deadcode hunting and noticed that
> > 
> >    alloc_canxl_skb in drivers/net/can/dev/skb.c
> > 
> > looks unused in the main kernel tree; is that expected?
> > I see it was added back in 2022 by
> >    fb08cba12b52 ("can: canxl: update CAN infrastructure for CAN XL frames")
> > 
> > I know almost exactly nothing about CAN, so I thought it best
> > to ask!
> 
> I created some slides so that you can get an introduction to the different
> CAN protocols CAN CC (aka Classical CAN), CAN FD and CAN XL:
> 
> https://github.com/linux-can/can-doc/tree/master/presentations

Thanks!

> The introduction of the CAN XL support lead to some clean up and rework also
> for the former alloc_can_skb() and alloc_canfd_skb() helpers.
> 
> The function is currently not in use in net/can/raw.c as it is only needed
> when a CAN XL frame is received from read hardware. But the patch also
> contains the definition of ETH_P_CANXL to already handle CAN XL frames
> properly inside the Linux kernel and e.g. for WireShark 4.4.
> 
> There are currently some CAN XL IP cores in development (see attached
> picture with an FPGA based IP core) and I am working on the kernel
> infrastructure (e.g. bitrate configuration enhancements) on this board. So
> alloc_canxl_skb() is already in use on my desk and there will be some more
> stuff showing up soon ;-)

OK, great - I won't try and deadcode it then!

Thanks again for the reply,

Dave


> Best regards,
> Oliver


-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-13 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13 14:03 of alloc_canxl_skb Dr. David Alan Gilbert
2024-09-13 19:51 ` Oliver Hartkopp
2024-09-13 20:05   ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox