#
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 ...
|
#
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 ...
|
#
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>
|
#
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
|
Revision tags: v0.11 |
|
#
39da3d03 |
| 12-Mar-2021 |
Andrew Jeffery <andrew@aj.id.au> |
libmctp: Split padding in pktbuf into header and trailer
The astlpc binding will shortly make use of a medium-specific trailer to implement a CRC-32 integrity check over packet data. Allow for mediu
libmctp: Split padding in pktbuf into header and trailer
The astlpc binding will shortly make use of a medium-specific trailer to implement a CRC-32 integrity check over packet data. Allow for medium-specific trailer data in the pktbuf in order to remove the need for a bounce-buffer. The binding will trim the pktbuf to the payload length before passing the instance up the stack.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib215a552ff218b007f7f119c5235fbc75d9ca6cb
show more ...
|
Revision tags: v0.10 |
|
#
5c5673b5 |
| 10-Mar-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test-utils: Add mctp_binding_test_destroy()
Provide an abstraction to clean up memory to avoid false-positives with leak sanitizers.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id62f
test-utils: Add mctp_binding_test_destroy()
Provide an abstraction to clean up memory to avoid false-positives with leak sanitizers.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id62f0552f40cb2215be4b5fe9e87eb4048832ef0
show more ...
|
#
225c46dc |
| 10-Mar-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test-utils: Avoid undefined behaviour on indirect call
The start method pointer value of the test binding object wasn't well defined due to the missing memset(). Later conditionals concluded that th
test-utils: Avoid undefined behaviour on indirect call
The start method pointer value of the test binding object wasn't well defined due to the missing memset(). Later conditionals concluded that the pointer was valid and tried to call through it leading to a crash of the test binary.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I0e60d1108267f8823f653ae935003a027a13affd
show more ...
|
#
a501a580 |
| 10-Mar-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test-utils: Resolve control reaching the end of a non-void function
Resolves:
tests/test-utils.c: In function ‘mctp_binding_test_tx’: tests/test-utils.c:20:1: error: no return statement in
test-utils: Resolve control reaching the end of a non-void function
Resolves:
tests/test-utils.c: In function ‘mctp_binding_test_tx’: tests/test-utils.c:20:1: error: no return statement in function returning non-void [-Werror=return-type] 20 | } | ^ cc1: all warnings being treated as errors
Functions terminating in an assert() won't always have the assert() present to terminate them.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ieb4338c994675e50b020962d22cff338e598e43a
show more ...
|
#
73c268e4 |
| 29-Jan-2020 |
Andrew Jeffery <andrew@aj.id.au> |
libmctp: Clarify BTU-related symbols
DSP0236 defines a Baseline Transmission Unit (BTU), which dictates the minimum supported packet payload size. The packet size is the BTU + the packet header. The
libmctp: Clarify BTU-related symbols
DSP0236 defines a Baseline Transmission Unit (BTU), which dictates the minimum supported packet payload size. The packet size is the BTU + the packet header. The maximum (payload) transport unit size for a given binding may be larger than the BTU.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I2c4013531efd572d95c5a61e4d59309490505a8f
show more ...
|
#
df15f7e9 |
| 05-Aug-2019 |
Jeremy Kerr <jk@ozlabs.org> |
core,bindings: Allow bindings to specify packet size
Currently, we fix all packet sizes to the baseline MTU size. However, bindings may support larger packet sizes.
This change makes the packet all
core,bindings: Allow bindings to specify packet size
Currently, we fix all packet sizes to the baseline MTU size. However, bindings may support larger packet sizes.
This change makes the packet allocator use binding-specific parameters to suit the binding itself, and uses the max packet size in the packetisation path.
Since packet sizes may now exceed 255, we change the size and offset types from uint8_t to size_t.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Change-Id: Ica932479f251dc33c67ea19e9e3e5a193cbe0b32
show more ...
|
#
c1693af4 |
| 05-Aug-2019 |
Jeremy Kerr <jk@ozlabs.org> |
core: Free packet in mctp_bus_rx
Change mctp_bus_rx to take ownership of a received packet, freeing it after use.
This prevents potential leaks in binding implementations.
Signed-off-by: Jeremy Ke
core: Free packet in mctp_bus_rx
Change mctp_bus_rx to take ownership of a received packet, freeing it after use.
This prevents potential leaks in binding implementations.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Change-Id: I76c427df7ffa5172e77eccad682325c1376c424f
show more ...
|
#
3d36ee2e |
| 29-May-2019 |
Jeremy Kerr <jk@ozlabs.org> |
LICENSE: add GPLv2 license option.
As per the MCTP design document (https://github.com/openbmc/docs/blob/master/designs/mctp.md), a dual-licence (GPLv2+ and Apache-2.0) gives us flexibility with inc
LICENSE: add GPLv2 license option.
As per the MCTP design document (https://github.com/openbmc/docs/blob/master/designs/mctp.md), a dual-licence (GPLv2+ and Apache-2.0) gives us flexibility with including libcmtp code into various firmware environments.
This change adds GPLv2+ as a license option. All current contributors have agreed to this change.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
show more ...
|
#
18925116 |
| 13-Mar-2019 |
Jeremy Kerr <jk@ozlabs.org> |
tests: Add simple test infrastructure
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|