You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/17 15:42:03 UTC
[GitHub] [incubator-nuttx] ptka commented on a change in pull request #5249: Fix aligment issue: pktbuf needs to be 16bit aligned
ptka commented on a change in pull request #5249:
URL: https://github.com/apache/incubator-nuttx/pull/5249#discussion_r786120096
##########
File path: drivers/usbdev/cdcecm.c
##########
@@ -120,7 +120,7 @@ struct cdcecm_driver_s
FAR struct usbdev_ep_s *epbulkout; /* Bulk OUT endpoint */
uint8_t config; /* Selected configuration number */
- uint8_t pktbuf[CONFIG_NET_ETH_PKTSIZE +
+ aligned_data(2) uint8_t pktbuf[CONFIG_NET_ETH_PKTSIZE +
Review comment:
Than the calculation of the pktbuf size would need a modification (16bit alignment would be enough):
pktbuf[CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE];
-->
pktbuf[(CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE + 1) / 2];
Is the dependency to compiler.h less well supported on the different architecures?
--
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