Re: [RFC] can: Introducing CANFD for af_can & can-raw
From: Wolfgang Grandegger <hidden>
Date: 2012-03-22 11:01:03
On 03/22/2012 11:35 AM, Kurt Van Dijck wrote:
Hey Wolfgang, On Thu, Mar 22, 2012 at 11:06:44AM +0100, Wolfgang Grandegger wrote:quoted
Hi Kurt, On 03/22/2012 10:57 AM, Kurt Van Dijck wrote:quoted
On Wed, Mar 21, 2012 at 04:05:28PM +0100, Oliver Hartkopp wrote:quoted
On 21.03.2012 15:56, Wolfgang Grandegger wrote:quoted
quoted
quoted
I think it's much more tricky to find a proper solution here.As I mentioned before, I just use CAN_RAW with this. Actually, I just ran a real CAN program that I wrote years ago. It still operates!Would you program still run if the payload is bigger than 8 bytes? I agree with Oliver.The other side would have noticed at design time that it cannot send >8 bytes :-) Did I miss something here? Is there a reason why existing programs may or should not work on a CANFD bus? I wanted to incorporate CANFD functionality _without_ putting an alternative API next to the current one, so to be able to use existing binaries on a future CANFD bus _without_ recompile (and thus not using the extras possibilities for that program).I believe that 99% of the existing apps, including candump, do work with a (hard-coded) maximum length of 8 bytes instead of a variable length.I agree with that (99% may even be a bit low :-) ) I did manage to let such applications still function as expected. The remaining 1% may or may not work. In case of proper coded programs, I'm sure they work. In other cases, I'm not sure. Thus the question is: Does the remaining 1% that we don't know, justify an alternate approach?
Well, I do not yet know. I first would like to see the data sheet of a CANFD controller to understand better the possible use cases. And without real use case, we will not add any CANFD support to the mainline kernel anyway. There is still some time to think and discuss.
My initial patch mainly illustrates that this may be a reasonable question. As ethernet user, on a socket level, I also do not care about low-level technology (100Mbit, 1GBit, UTP, ...).
But that's because we use higher-level protocols like UDP and TCP which do not care about the hardware frame size. Wolfgang.