#
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 ...
|
#
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
|
#
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 ...
|
Revision tags: v0.11 |
|
#
f39c3857 |
| 10-Jan-2022 |
Sumanth Bhat <sumanth.bhat@linux.intel.com> |
core: Add TX/RX API that exposes message tag and tag owner
MCTP received packets can carry a message tag and tag owner bit which is set by a remote MCTP endpoint. This can be used by the remote MCTP
core: Add TX/RX API that exposes message tag and tag owner
MCTP received packets can carry a message tag and tag owner bit which is set by a remote MCTP endpoint. This can be used by the remote MCTP endpoint to track the responses. Thus, libmctp should provide a mechanism for the upper layer MCTP applications to respond with the same message tag.
This patchset extends TX and RX API with message tag and tag owner bits.
Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com> Change-Id: I6d07eafa86c653abdd4313ab7cc77e5a93124477
show more ...
|
#
5ab78259 |
| 17-Feb-2022 |
Andrew Jeffery <andrew@aj.id.au> |
libmctp: Introduce compiler.h
Define __unused here and include compiler.h in all the places we can make use of it. Clean up some header ordering and include styles while we're at it.
Signed-off-by:
libmctp: Introduce compiler.h
Define __unused here and include compiler.h in all the places we can make use of it. Clean up some header ordering and include styles while we're at it.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I33ddbdacbddbbf557dc02e42d8dde71a16e1cabe
show more ...
|
Revision tags: v0.10 |
|
#
b93b6112 |
| 04-Jun-2020 |
Andrew Jeffery <andrew@aj.id.au> |
bootstrap: Ratchet up compiler strictness
Replace the specific warning flags with -Wall -Wextra and turn on -Werror.
Covered by -Wall:
* -Wformat * -Warray-bounds * -Wimplicit-function-declaration
bootstrap: Ratchet up compiler strictness
Replace the specific warning flags with -Wall -Wextra and turn on -Werror.
Covered by -Wall:
* -Wformat * -Warray-bounds * -Wimplicit-function-declaration
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iab21e67026d2453648aa6ebe4c299e1162fc5ebf
show more ...
|
#
f0315a3e |
| 10-Mar-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_serial: Clean up after test case
Free all allocated memory to avoid false-positives from leak sanitizers. Resolves:
==15807==ERROR: LeakSanitizer: detected memory leaks
Indirect leak
test_serial: Clean up after test case
Free all allocated memory to avoid false-positives from leak sanitizers. Resolves:
==15807==ERROR: LeakSanitizer: detected memory leaks
Indirect leak of 4096 byte(s) in 1 object(s) allocated from: #0 0x7fb35b934f1e in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10df1e) #1 0x7fb35b7f3065 in __mctp_realloc /home/andrew/src/openbmc/libmctp/alloc.c:48 #2 0x7fb35b7ed979 in mctp_msg_ctx_add_pkt /home/andrew/src/openbmc/libmctp/core.c:213 #3 0x7fb35b7f0a09 in mctp_bus_rx /home/andrew/src/openbmc/libmctp/core.c:383 #4 0x7fb35b7f467d in mctp_serial_finish_packet /home/andrew/src/openbmc/libmctp/serial.c:169 #5 0x7fb35b7f6071 in mctp_rx_consume_one /home/andrew/src/openbmc/libmctp/serial.c:254 #6 0x7fb35b7f6409 in mctp_rx_consume /home/andrew/src/openbmc/libmctp/serial.c:271 #7 0x7fb35b7f668a in mctp_serial_read /home/andrew/src/openbmc/libmctp/serial.c:288 #8 0x559680986cc7 in main tests/test_serial.c:113 #9 0x7fb35ac9e1e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)
Indirect leak of 1384 byte(s) in 1 object(s) allocated from: #0 0x7fb35b934ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8) #1 0x7fb35b7f2cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28 #2 0x7fb35b7f6cad in mctp_serial_init /home/andrew/src/openbmc/libmctp/serial.c:343 #3 0x559680986553 in main tests/test_serial.c:99 #4 0x7fb35ac9e1e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)
Indirect leak of 552 byte(s) in 1 object(s) allocated from: #0 0x7fb35b934ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8) #1 0x7fb35b7f2cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28 #2 0x7fb35b7ededc in mctp_init /home/andrew/src/openbmc/libmctp/core.c:234 #3 0x559680986485 in main tests/test_serial.c:96 #4 0x7fb35ac9e1e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)
Indirect leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7fb35b934ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8) #1 0x7fb35b7f2cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28 #2 0x7fb35b7ee55f in mctp_register_bus /home/andrew/src/openbmc/libmctp/core.c:277 #3 0x559680986b64 in main tests/test_serial.c:105 #4 0x7fb35ac9e1e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I9f95104545cc6f633ee134fffc90cb0ea2c46eeb
show more ...
|
#
89a2b8e0 |
| 07-Feb-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_serial: Resolve control reaching end of non-void function
mctp-binding_serial_pipe_tx() was missing a return:
tests/test_serial.c: In function ‘mctp_binding_serial_pipe_tx’: tests/test
test_serial: Resolve control reaching end of non-void function
mctp-binding_serial_pipe_tx() was missing a return:
tests/test_serial.c: In function ‘mctp_binding_serial_pipe_tx’: tests/test_serial.c:34:1: error: control reaches end of non-void function [-Werror=return-type] 34 | } | ^ cc1: all warnings being treated as errors
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ia15a13fe4e283b76bfb4a856ea188a46ac5cf12c
show more ...
|
#
2cda40fa |
| 27-Feb-2020 |
Andrew Jeffery <andrew@aj.id.au> |
cmake: Add new tests to test suite
Bring functionality of the cmake build system up to autotools.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I2231b51cfd52460fb525b5af6893b0474508859b
|
#
b633b3f5 |
| 24-Feb-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_serial: Fix assert triggered in core.c
$ ./tests/test_serial test_serial: core.c:252: mctp_register_bus: Assertion `mctp->n_busses == 0' failed. Aborted (core dumped)
I'm not sure
test_serial: Fix assert triggered in core.c
$ ./tests/test_serial test_serial: core.c:252: mctp_register_bus: Assertion `mctp->n_busses == 0' failed. Aborted (core dumped)
I'm not sure how this slipped through the cracks, and CI didn't catch it either. However, the scenario wasn't correctly modelled, so do the proper thing and instantiate two mctp contexts and assign a binding instance to each, connected by the pipes.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib5382a45cd0042c840fdb01b2038e9a531bf2384
show more ...
|
#
25de0934 |
| 05-Feb-2020 |
Andrew Jeffery <andrew@aj.id.au> |
tests: Add test_serial
Uses pipes to connect two instances (A and B) of the serial binding and passes a message exceeding the BTU from A to B.
Increases test converage for libmctp as a whole from ~
tests: Add test_serial
Uses pipes to connect two instances (A and B) of the serial binding and passes a message exceeding the BTU from A to B.
Increases test converage for libmctp as a whole from ~60% (lines and functions) to ~75% (lines and functions).
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iaad6f265528799148c23db9365ebf9fa748e50ee
show more ...
|