History log of /openbmc/libmctp/alloc.c (Results 1 – 9 of 9)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# bbfcc6e1 17-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

build/core: Add MCTP_CUSTOM_ALLOC option

This avoids storing the allocator function pointers in mutable memory,
which is a problem when building on platforms with memory protection.
Instead the appl

build/core: Add MCTP_CUSTOM_ALLOC option

This avoids storing the allocator function pointers in mutable memory,
which is a problem when building on platforms with memory protection.
Instead the application/platform defines custom functions that are
linked with libmctp.

Change-Id: Icaf88968b50c88bbd2305d325f9530658465e21f
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 ...


# 23496bf2 29-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

alloc: Format with clang-format

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I5b7e807c3afc55fe625646d0d6c311a7fe597b38


Revision tags: v0.11, v0.10
# 5e56cd8a 10-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

alloc: Resolve control reaching the end of a non-void function

Resolves:

alloc.c: In function ‘__mctp_alloc’:
alloc.c:32:1: error: control reaches end of non-void function [-Werror=return-t

alloc: Resolve control reaching the end of a non-void function

Resolves:

alloc.c: In function ‘__mctp_alloc’:
alloc.c:32:1: error: control reaches end of non-void function [-Werror=return-type]
32 | }
| ^
alloc.c: In function ‘__mctp_realloc’:
alloc.c:49:1: error: control reaches end of non-void function [-Werror=return-type]
49 | }
| ^
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: If720f43561585ea6b2dcdae59ac70b997b79469f

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


# c7e764a2 28-May-2019 Jeremy Kerr <jk@ozlabs.org>

Rework conditional feature usage

Currently, the infrastructure that we have to enable a flexible
compilation environment has a few issues:

- the allocator configuration is performed at run-time, w

Rework conditional feature usage

Currently, the infrastructure that we have to enable a flexible
compilation environment has a few issues:

- the allocator configuration is performed at run-time, while the log
configuration is performed at compile-time

- for a standard compile (ie, standard userspace, using
autoconf+automake to build), we need a few pre-defined configuration
options.

This change adds a bit of runtime selection to the logging
infrastructure, to match the allocator setup. We also unify the
compile-time defines into config.h, using MCTP_-prefixed macro names,
allowing integration into other build systems.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

show more ...


# 3a666ce0 05-Mar-2019 Jeremy Kerr <jk@ozlabs.org>

alloc: portability fixes

Some environments have allocation functions defined as macros, so use
non-overlapping struct member names.

Also, we need libmctp.h for the API definition of mctp_set_alloc_

alloc: portability fixes

Some environments have allocation functions defined as macros, so use
non-overlapping struct member names.

Also, we need libmctp.h for the API definition of mctp_set_alloc_ops.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

show more ...


# 3cb4eee4 05-Mar-2019 Jeremy Kerr <jk@ozlabs.org>

API: Add MCTP_NO_DEFAULT_ALLOC facility

For platforms that don't have malloc/alloc/free available, we do not
want to use them as defaults.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>


# 4cdc200f 07-Feb-2019 Jeremy Kerr <jk@ozlabs.org>

Initial MCTP core code

Just a skeleton of the MCTP library at present.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>