You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2024/04/06 05:32:37 UTC
[PR] Minor can driver improvement [nuttx]
xiaoxiang781216 opened a new pull request, #12078:
URL: https://github.com/apache/nuttx/pull/12078
## Summary
- can: Remove CANIOC_XXX macro from include/nuttx/can.h
- can: Add g_ prefix to can_dlc_to_len and len_to_can_dlc
- can: Merge cd_error and rx_overflow into rx_error
## Impact
can driver
## Testing
internal test case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041507580
> @xiaoxiang781216 I think include/nuttx/can.h is legacy code, when I created the mcp2515 driver I needed to create a drivers/can and moved can.c to there, but I think this header file was left behind. Maybe we could merge it into include/nuttx/can/can.h
include/nuttx/can/can.h contain morer ioctl than include/nuttx/can.h. This is the reason why I remove ioctl from include/nuttx/can.h.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041544466
> > @xiaoxiang781216 I think include/nuttx/can.h is legacy code, when I created the mcp2515 driver I needed to create a drivers/can and moved can.c to there, but I think this header file was left behind. Maybe we could merge it into include/nuttx/can/can.h
>
> include/nuttx/can/can.h contains more ioctl than include/nuttx/can.h. This is the reason why I remove ioctl from include/nuttx/can.h.
Right, but maybe it makes more sense to have only include/nuttx/can/can.h
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041585108
> > > Your mean merge include/nuttx/can.h into include/nuttx/can/can.h?
> >
> >
> > Yes!
>
> That is not trivial. Having two `can.h` is needed to maintain both CAN char driver and Socket can driver. I've been looking there a while ago and didn't find an easy solution.
Maybe we could separate it in include/nuttx/can/can.h and include/nuttx/can/socketcan.h since technically they are different
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "PetervdPerk-NXP (via GitHub)" <gi...@apache.org>.
PetervdPerk-NXP commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2046945949
I rather keep the Char Device CAN and SocketCAN separate, they're both fundamentally different subsystems with their own API's.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "PetervdPerk-NXP (via GitHub)" <gi...@apache.org>.
PetervdPerk-NXP commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2047850816
That would incur a lot of overhead (Zephyr is doing it and their SocketCAN performance isn't that great due to it) It isn't hard to support both back-ends for a can driver I did it for the LPC17XX.
https://github.com/apache/nuttx/blob/master/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041839146
`include/nuttx/can.h` follow linux style(`include/uapi/linux/can.h`). Linux remove the support of CAN char driver, so it isn't a problem to short SocketCAN to CAN.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041577146
> > Your mean merge include/nuttx/can.h into include/nuttx/can/can.h?
>
> Yes!
That is not trivial. Having two `can.h` is needed to maintain both CAN char driver and Socket can driver. I've been looking there a while ago and didn't find an easy solution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2042518593
> `include/nuttx/can.h` follow linux style(`include/uapi/linux/can.h`). Linux remove the support of CAN char driver, so it isn't a problem to short SocketCAN to CAN.
Right, but for NuttX it is important to keep support for CAN char driver because some boards don't have enough memory to support SocketCAN.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041106795
@xiaoxiang781216 could you please share your internal test? We need to confirm this modification will not break existing applications using CAN
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2047793399
Yes, I would suggest that we write a general net driver on top of can driver, so the user just need write char driver and expose char or socketcan interface in defconfig.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2047575308
> I rather keep the Char Device CAN and SocketCAN separate, they're both fundamentally different subsystems with their own API's.
Agree!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041477839
@xiaoxiang781216 I think include/nuttx/can.h is legacy code, when I created the mcp2515 driver I needed to create a drivers/can and moved can.c to there, but I think this header file was left behind. Maybe we could merge it into include/nuttx/can/can.h
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041571344
Your mean merge include/nuttx/can.h into include/nuttx/can/can.h?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor can driver improvement [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12078:
URL: https://github.com/apache/nuttx/pull/12078#issuecomment-2041574514
> Your mean merge include/nuttx/can.h into include/nuttx/can/can.h?
Yes!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org