You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "ThePassionate (via GitHub)" <gi...@apache.org> on 2026/01/20 03:35:01 UTC
[PR] crypto/cryptodev: optimize driver [nuttx]
ThePassionate opened a new pull request, #18029:
URL: https://github.com/apache/nuttx/pull/18029
## Summary
This PR includes four improvements to the NuttX crypto subsystem:
1. **Add olen field for virtio mode support** - Add `olen` field to `crypt_op` structure and `crp_olen` to `cryptop` structure to support output length tracking in virtio crypto mode.
2. **Export ivlen to support different cipher algorithms** - Add `ivlen` field to `crypt_op` and `crp_ivlen` to `cryptop` structure to support cipher algorithms with different IV lengths.
3. **Optimize cryptodev without dynamic memory** - Replace dynamic memory allocation with stack-based variables in `cryptodev_op()`. This eliminates `kmm_malloc`/`kmm_free` overhead and simplifies error handling by removing the need for goto bail cleanup paths.
4. **Determine the order of crypto drivers** - After adding the cross-core crypto driver, there are now three encryption modes:
- Hardware driver in local core
- Crypto driver in remote core
- Software encryption in local core
This prioritizes local hardware driver first, then remote driver (typically hardware), and finally local software encryption as a fallback.
## Impact
These changes improve crypto subsystem flexibility, performance, and support for virtio-based crypto operations.
## Testing
Build and runtime tested on NuttX with software crypto drivers.
--
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] crypto/cryptodev: optimize driver [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #18029:
URL: https://github.com/apache/nuttx/pull/18029#issuecomment-3771111004
@ThePassionate please fix the break as soon as possible.
--
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] crypto/cryptodev: optimize driver [nuttx]
Posted by "wangchdo (via GitHub)" <gi...@apache.org>.
wangchdo commented on PR #18029:
URL: https://github.com/apache/nuttx/pull/18029#issuecomment-3771069415
This CI error seems to be occurring in every PR:
```
Configuration/Tool: qemu-armv8a/rpproxy
2026-01-20 04:31:48
------------------------------------------------------------------------------------
Cleaning...
/github/workspace/sources/apps/Application.mk:238: target 'signest.c.github.workspace.sources.apps.testing.ostest.o' given more than once in the same rule
/github/workspace/sources/apps/Application.mk:238: target 'signest.c.github.workspace.sources.apps.testing.ostest.o' given more than once in the same rule
Configuring...
Building NuttX...
cu_main.c: In function 'sigint':
Error: cu_main.c:128:33: error: 'siginfo' undeclared (first use in this function)
128 | FAR struct cu_globals_s *cu = siginfo->si_user;
| ^~~~~~~
cu_main.c:128:33: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/github/workspace/sources/apps/Application.mk:330: cu_main.c.github.workspace.sources.apps.system.cu.o] Error 1
make[2]: Target 'all' not remade because of errors.
make[1]: *** [Makefile:54: /github/workspace/sources/apps/system/cu_all] Error 2
make[1]: Target 'all' not remade because of errors.
make: *** [tools/LibTargets.mk:248: /github/workspace/sources/apps/libapps.a] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
```
--
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] crypto/cryptodev: optimize driver [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #18029:
URL: https://github.com/apache/nuttx/pull/18029
--
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] crypto/cryptodev: optimize driver [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #18029:
URL: https://github.com/apache/nuttx/pull/18029#issuecomment-3771141212
> This CI error seems to be occurring in every PR:
>
> ```
> Configuration/Tool: qemu-armv8a/rpproxy
> 2026-01-20 04:31:48
> ------------------------------------------------------------------------------------
> Cleaning...
> /github/workspace/sources/apps/Application.mk:238: target 'signest.c.github.workspace.sources.apps.testing.ostest.o' given more than once in the same rule
> /github/workspace/sources/apps/Application.mk:238: target 'signest.c.github.workspace.sources.apps.testing.ostest.o' given more than once in the same rule
> Configuring...
> Building NuttX...
> cu_main.c: In function 'sigint':
> Error: cu_main.c:128:33: error: 'siginfo' undeclared (first use in this function)
> 128 | FAR struct cu_globals_s *cu = siginfo->si_user;
> | ^~~~~~~
> cu_main.c:128:33: note: each undeclared identifier is reported only once for each function it appears in
> make[2]: *** [/github/workspace/sources/apps/Application.mk:330: cu_main.c.github.workspace.sources.apps.system.cu.o] Error 1
> make[2]: Target 'all' not remade because of errors.
> make[1]: *** [Makefile:54: /github/workspace/sources/apps/system/cu_all] Error 2
> make[1]: Target 'all' not remade because of errors.
> make: *** [tools/LibTargets.mk:248: /github/workspace/sources/apps/libapps.a] Error 2
> make: Target 'all' not remade because of errors.
> /github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
> ```
it's strange why https://github.com/apache/nuttx-apps/pull/3314 pass ci.
--
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