History log of /openbmc/libmctp/tests/test_core.c (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


# 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 ...


# 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 ...


# 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 ...


# 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


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 ...


# 34d4c96f 16-Jun-2021 Sumanth Bhat <sumanth.bhat@linux.intel.com>

core: Handle exhaution of message contexts

If message contexts are exhausted, there is a possibility of
NULL pointer dereference. Close this attack surface with a
check on the message context creati

core: Handle exhaution of message contexts

If message contexts are exhausted, there is a possibility of
NULL pointer dereference. Close this attack surface with a
check on the message context creation status.

Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com>
Change-Id: I208349b74a27a14b180c976bd78ec81a7991e43f

show more ...


# bc79c24e 16-Jun-2021 Sumanth Bhat <sumanth.bhat@linux.intel.com>

core: Handle arithmetic overflow in adding new fragments

Large fragment sizes can cause arithmetic overflows and can
cause memory corruptions. However, this condition will not be hit
with a fragment

core: Handle arithmetic overflow in adding new fragments

Large fragment sizes can cause arithmetic overflows and can
cause memory corruptions. However, this condition will not be hit
with a fragment size check in place and with a sane memory allocator
in place.

Adding this check to ensure that we have defense in depth.

Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com>
Change-Id: Iaa976ce636c1eb617afa75e852b39c50699ebeb2

show more ...


# 69f545f7 18-May-2021 Sumanth Bhat <sumanth.bhat@linux.intel.com>

core: Handle MCTP fragment sizes

Message assembly can be terminated if case we receive a
middle/end packet of unexpected size. This provision is
provided in DSP0236 v1.3.1 section 8.8 incorrect tran

core: Handle MCTP fragment sizes

Message assembly can be terminated if case we receive a
middle/end packet of unexpected size. This provision is
provided in DSP0236 v1.3.1 section 8.8 incorrect transmission
unit.

Reception of middle packets whose size is not equal to
start packet and end packets whose size is not less than
or equal to the start packet causes message assembly
termination.

Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com>
Change-Id: I6371ab9e22e2c8ece70a9480f224de3f1f2f184e

show more ...