| 2da0a8f4 | 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Id040b283a88667ca68aeff3d06269c3b1713ebe9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 5cc20932 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I7a634219b8f2de45f106049e57b40b8212032abb Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 060c71ed | 08-Jan-2025 |
Matt Johnston <matt@codeconstruct.com.au> |
fuzz: Add fuzzing for core and i2c
Add fuzzing infrastructure and a fuzz target handling mctp-i2c packets. After running for a few days with honggfuzz this achieves close to complete line coverage o
fuzz: Add fuzzing for core and i2c
Add fuzzing infrastructure and a fuzz target handling mctp-i2c packets. After running for a few days with honggfuzz this achieves close to complete line coverage of core.c
Change-Id: I6cd7361e6f600831a319f06fb7c7c0d2186fd7de Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| a3830d25 | 13-Jan-2025 |
Matt Johnston <matt@codeconstruct.com.au> |
Fix test-i2c leak, and mctp_pktbuf storage alignment
- Ensure mctp_pktbuf storage is correctly aligned - Deallocate mctp and i2c instances to avoid failure with asan.
These previously succeeded in
Fix test-i2c leak, and mctp_pktbuf storage alignment
- Ensure mctp_pktbuf storage is correctly aligned - Deallocate mctp and i2c instances to avoid failure with asan.
These previously succeeded in CI so are both fixed in this commit.
Fixes: e5b941d9d764 ("i2c: Add binding for MCTP over I2C transport") Fixes: 4a09e1dc4883 ("core: Reuse buffers for tx, allow message pools") Change-Id: I747bfff6faf3a5b0a982ae266bcef02ecbc4ee8a Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| e5b941d9 | 17-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
i2c: Add binding for MCTP over I2C transport
Implements DSP0237. This has a fixed neighbor table (currently 4 entries), with neighbors learned on reception, or set with mctp_i2c_set_neighbour().
Ch
i2c: Add binding for MCTP over I2C transport
Implements DSP0237. This has a fixed neighbor table (currently 4 entries), with neighbors learned on reception, or set with mctp_i2c_set_neighbour().
Change-Id: I9b1e2c3673149cd0b9fee0d8113f3cac0e336bc7 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| 61c95992 | 16-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Add mctp_message_tx_request() function
This allocates a tag for messages sent with TO bit set.
Change-Id: Ia8403a06aa449e0218a30edf5ad69781c70d7c52 Signed-off-by: Matt Johnston <matt@codecons
core: Add mctp_message_tx_request() function
This allocates a tag for messages sent with TO bit set.
Change-Id: Ia8403a06aa449e0218a30edf5ad69781c70d7c52 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| 0a96544a | 16-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
tests: Allow tx packets in mctp_binding_test
This requires setting src==dest for routing.
Change-Id: I098b67071b111e328cbcc8bb20656638d7baca39 Signed-off-by: Matt Johnston <matt@codeconstruct.com.a
tests: Allow tx packets in mctp_binding_test
This requires setting src==dest for routing.
Change-Id: I098b67071b111e328cbcc8bb20656638d7baca39 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| 4a09e1dc | 13-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Reuse buffers for tx, allow message pools
Use new m_msg_alloc/m_msg_free operations for whole-message MCTP buffers. m_realloc is no longer used, instead the maximum sized buffer is allocated f
core: Reuse buffers for tx, allow message pools
Use new m_msg_alloc/m_msg_free operations for whole-message MCTP buffers. m_realloc is no longer used, instead the maximum sized buffer is allocated for each reassembly. This allows applications to keep a pool of MCTP message buffers.
Don't create a queue of packets to transmit, instead reuse a single binding-provided tx_storage buffer for each transmitted packet, which can be static for bindings that have a known maximum packet size.
Asynchronous users/bindings can no longer rely on the core for queueing TX packets, instead they should test mctp_is_tx_ready() prior to calling mctp_message_tx(). The stack will return -EBUSY from mctp_message_tx() if there is already a message pending to send.
Bindings must be updated to add the tx_storage member, and the core will no longer free packets passed to mctp_bus_rx().
Change-Id: I2598bb91026ccef01b268c52b06c0f8e20bebb1e Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| ba5f7477 | 11-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
tests: astlpc: Change high-to-low MTU test for txq
The test relies on internal packet queue state, which is going to change in a future commit (packets generated as required). Instead test that upda
tests: astlpc: Change high-to-low MTU test for txq
The test relies on internal packet queue state, which is going to change in a future commit (packets generated as required). Instead test that updating a host from high to low MTU works correctly, without relying on specific buffering.
Change-Id: Id33c1d0e5bb0b8cc0ac2a8cc964e3c694643ac02 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| 6586fc10 | 10-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
build: Add meson build
This replicates most of the current autotools build.
Code coverage is omitted, it should be possible to use built-in Meson functionality.
Valgrind for tests has not been add
build: Add meson build
This replicates most of the current autotools build.
Code coverage is omitted, it should be possible to use built-in Meson functionality.
Valgrind for tests has not been added, instead it can run as meson test --wrap='valgrind --leak-check=full --error-exitcode=1'
Change-Id: I5566a6c30630c486d22390e126899dbe4a6331ce Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| 3ef47785 | 11-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
Fix warnings reported by -Wpedantic
Previously CI hasn't been running with -Wpedantic (using autoconf), so these haven't been reported previously.
- replace BUILD_ASSERT with static_assert() - don'
Fix warnings reported by -Wpedantic
Previously CI hasn't been running with -Wpedantic (using autoconf), so these haven't been reported previously.
- replace BUILD_ASSERT with static_assert() - don't use %m GNU extension for printf - don't use arithmetic on void* - remove unused variables
Change-Id: I97d1acc908f06773b8b1ee95bfee80760fdc7a63 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
| b3de343e | 18-Apr-2024 |
John Chung <john.chung@arm.com> |
serial: Support Frame Check Sequence
According to DSP0253, implementing frame check sequence via crc-16-ccitt calculation. crc-16-ccitt implementation refer to RFC1662 Appendix C.
Tested: Verified
serial: Support Frame Check Sequence
According to DSP0253, implementing frame check sequence via crc-16-ccitt calculation. crc-16-ccitt implementation refer to RFC1662 Appendix C.
Tested: Verified on sending/receiving mctp packets with mctp-serial kernel driver.
Change-Id: I8417d521589e9f40a0ca68596cdcfd061fd919cc Signed-off-by: John Chung <john.chung@arm.com>
show more ...
|
| 133df7ab | 14-May-2024 |
John Chung <john.chung@arm.com> |
core: Allow to handle destination null and broadcast endpoint id
mctp daemon might query endpoint (i.e., get endpoint id command) by physical addressed requests and set destination eid as 0.
Curren
core: Allow to handle destination null and broadcast endpoint id
mctp daemon might query endpoint (i.e., get endpoint id command) by physical addressed requests and set destination eid as 0.
Current implementation will block handling destination null and broadcast endpoint id for MCTP control message type.
Change-Id: Ie17035f88a80649e848fab93159a23172de0a33a Signed-off-by: John Chung <john.chung@arm.com>
show more ...
|
| e915aad4 | 10-Aug-2022 |
Rashmica Gupta <rashmica@linux.ibm.com> |
tests: undef NDEBUG in tests
So we can run tests even when compiled with -DNDEBUG
Change-Id: Iebb8399409e2b0a5172529e08bcac188956fd925 Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> |
| ca85ad86 | 10-Aug-2022 |
Rashmica Gupta <rashmica@linux.ibm.com> |
tests: bridge: Use unique names for bindings
This makes debugging easier.
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> Change-Id: I43d225434e0724244fef3faaf5ab95b7094cca84 |
| 7f7fdc1d | 12-May-2023 |
Andrew Jeffery <andrew@aj.id.au> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic5b4c8584fafe5ebe3d01c1f685cab271dd9690b
show more ...
|
| a721c2d8 | 04-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
format: reformat with clang-format
Reformat everything with clang-format and remove .clang-ignore and custom code formatter.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I93dfca67
format: reformat with clang-format
Reformat everything with clang-format and remove .clang-ignore and custom code formatter.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I93dfca67948d3fbcc0f05ece4ae3e4dd9495ab57
show more ...
|
| 695deed8 | 29-Sep-2022 |
Andrew Jeffery <andrew@aj.id.au> |
tests: serial: Format with clang-format
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id67222b31bf66d2df3d55b417b3a9f22666249f6 |
| 69eda31b | 29-Sep-2022 |
Andrew Jeffery <andrew@aj.id.au> |
tests: test-utils: Format with clang-format
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I79dbb915a3f4b69a915efaea98a5de6732880875 |
| 31b01e0d | 29-Sep-2022 |
Andrew Jeffery <andrew@aj.id.au> |
tests: core: Format with clang-format
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ie0d61ad150b617e8f682a1421cd5eaccbb60a2ce |
| c9ac4fc5 | 29-Sep-2022 |
Andrew Jeffery <andrew@aj.id.au> |
tests: astlpc: MTU renegotiation with populated Tx queue
Capture the behaviour that lead to a complete stall now that we've fixed the bug.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id:
tests: astlpc: MTU renegotiation with populated Tx queue
Capture the behaviour that lead to a complete stall now that we've fixed the bug.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I9883a4f4040a282de417cf0e4293ecd1ad45419a
show more ...
|
| e64c5163 | 29-Sep-2022 |
Andrew Jeffery <andrew@aj.id.au> |
tests: astlpc: Rename the message Rx handler
The implementation of the handler is strictly associated with `struct astlpc_test`, so make this clear through the name.
Signed-off-by: Andrew Jeffery <
tests: astlpc: Rename the message Rx handler
The implementation of the handler is strictly associated with `struct astlpc_test`, so make this clear through the name.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I5746c0306ef96faed5f778e20c6f4cccf173bb0e
show more ...
|
| 89a28781 | 28-Sep-2022 |
Andrew Jeffery <andrew@aj.id.au> |
serial: Give write callbacks a consistent behaviour
Require that the write callbacks return either the number of bytes written or a negative error code. From there, ensure the return value behaviour
serial: Give write callbacks a consistent behaviour
Require that the write callbacks return either the number of bytes written or a negative error code. From there, ensure the return value behaviour is the same for the fd and custom handler paths.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id9b90cf4e5c5815dc6385c3d493e2bbbd8e47616
show more ...
|
| fe763e98 | 05-Aug-2022 |
Andrew Jeffery <andrew@aj.id.au> |
astlpc: Implement async support via buffer state tracking
To remove the unbounded loop in mctp_astlpc_kcs_send() we need the capability to retry sending the pending command once the data value has b
astlpc: Implement async support via buffer state tracking
To remove the unbounded loop in mctp_astlpc_kcs_send() we need the capability to retry sending the pending command once the data value has been consumed. However, the link is duplex and we may enter the state where we have multiple pending commands.
Rather than explicitly track the set of pending commands, track the buffer state in order to derive both the pollfd state needed by the caller _and_ the pending buffer synchronisation commands.
Unfortunately due to the structure of the code the integration of the state tracking is a little messy, but is capable of correctly booting a P10 system.
I've put up a less constrained and perhaps aspirational implementation of how the state tracking could be implemented if we feel the need to rework things going forward:
https://github.com/amboar/libmctp-shmb/
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I693946dae5336aa5d0f07bcd66c36f1ccd391054
show more ...
|
| fcb65abb | 06-Jul-2022 |
Younghyun Park <younghyunpark@google.com> |
tests/test_seq.c: Avoid duplicate definition of ARRAY_SIZE
Avoid duplicate definition of "ARRAY_SIZE" macro in environments that already define the macro
Signed-off-by: Younghyun Park <younghyunpar
tests/test_seq.c: Avoid duplicate definition of ARRAY_SIZE
Avoid duplicate definition of "ARRAY_SIZE" macro in environments that already define the macro
Signed-off-by: Younghyun Park <younghyunpark@google.com> Change-Id: I8fa5ddd0d0279cbcda160fcb232c9c481594b0f0
show more ...
|