History log of /openbmc/libmctp/ (Results 51 – 75 of 328)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
4df106db16-May-2023 Frederic Barrat <fbarrat@linux.ibm.com>

astlpc: Add mctp_astlpc_tx_done() API

Add the mctp_astlpc_tx_done() API to help with packet transfer
performance when using the LPC binding with the Aspeed BMC. The goal
of the API is to tell the ca

astlpc: Add mctp_astlpc_tx_done() API

Add the mctp_astlpc_tx_done() API to help with packet transfer
performance when using the LPC binding with the Aspeed BMC. The goal
of the API is to tell the caller that the Transmit buffer has been
consumed by the remote side, i.e. the Rx_complete command has been
received locally. It can be helpful on the host side because of the
way the Aspeed BMC implements the KCS devices.

The Aspeed BMC's KCS device doesn't provide an interrupt when the ODR
register is read by the remote client/host. To workaround it, the
linux KCS driver for Aspeed arms a timer to periodically check (every
0.5 second in the current implementation) the state of the register
and generate an "Output Buffer Empty" (OBE) event to wake up any
client on the BMC, for example the mctp-demux-daemon.

Typically, the mctp-demux-daemon waits in the poll() system call and
wakes up when it receives a packet. When it's coming from the LPC bus
and KCS device, the remote writes a Tx_begin command in the IDR
register, which does generate an interrupt. To acknowledge the packet,
the mctp-demux-daemon writes a Tx_complete command in the ODR and can
then dispatch the request to the proper recipient (i.e. the PLDM
daemon). When it wants to send a message on the LPC bus, the
mctp-demux-daemon needs to wait till the ODR register has been read by
the remote. Because we don't have an interrupt to know when that
happens, the mctp-demux-daemon waits in poll() and will be awaken when
an OBE event is generated by a background thread processing the timer
interrupt. So when the mctp-demux-daemon enters poll() with something
to send on the LPC bus, if the ODR is not available immediately, it
will only be sent after the timer fires. Which could take up to 0.5s
with the current driver implementation.

So when the host sends a PLDM request, it is therefore crucial, for
good performance, that it reads the Rx_complete command out of the ODR
very quickly when it's sending a MCTP packet as to free it and make
sure the mctp-demux-daemon can send the reply immediately instead of
having to wait in poll(). That's where the new mctp_astlpc_tx_done()
helps: immediately after sending a message, the host can call
repeatedly mctp_astlpc_poll() to read the KCS device status and read
the ODR as fast as possible and with the mctp_astlpc_tx_done() API, it
knows when to stop. Pseudo code looks like this (ignoring that we
should timeout out of the loop after a while):

mctp_message_tx()
while (!mctp_astlpc_tx_done(astlpc)) {
mctp_astlpc_poll(astlpc);
}

Note that the API, while generic, is (so far) only useful when called
from a remote LPC endpoint.

Change-Id: I5e6d62aa142fe97449ccf9c9a2ade3cf45d02bf6
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

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

2608b29430-Mar-2023 Pedro Martelletto <martelletto@google.com>

core: check for __mctp_alloc() failure in mctp_pktbuf_alloc()

Check for allocation failure in mctp_pktbuf_alloc(), as done
elsewhere in the code.

Change-Id: If3b6d84335d87f4d0ddef059910e63edab82a30

core: check for __mctp_alloc() failure in mctp_pktbuf_alloc()

Check for allocation failure in mctp_pktbuf_alloc(), as done
elsewhere in the code.

Change-Id: If3b6d84335d87f4d0ddef059910e63edab82a30e
Signed-off-by: Pedro Martelletto <martelletto@google.com>
Signed-off-by: Moritz Fischer <moritzf@google.com>

show more ...

45d1332809-Aug-2022 Rashmica Gupta <rashmica@linux.ibm.com>

astlpc: Use enums instead of hardcoded numbers

This makes it slightly easier to read the code.

Change-Id: Iab8df93fc330fda4b89d2a77922ca73f7a7ad1a1
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm

astlpc: Use enums instead of hardcoded numbers

This makes it slightly easier to read the code.

Change-Id: Iab8df93fc330fda4b89d2a77922ca73f7a7ad1a1
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>

show more ...

f298897708-Nov-2022 Rashmica Gupta <rashmica@linux.ibm.com>

pcap: Use SLL2 linktype for captures

This means we can use wireshark on our pcaps.

Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
Change-Id: I215af00e064d352e41d0a8eb87d5a30582998676

a68185c408-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

Change-Id: Ibcba1d4dcfc062988d71ea12912b53512fa644ff
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

8f4f161004-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

shellcheck: ignore minor report in bootstrap.sh

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ief2a8bd51010576bec884cb793256c34b00d5547

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

0f05b6cb14-Nov-2022 Andrew Jeffery <andrew@aj.id.au>

astlpc: Refactor redundant assertion and associated logic

The type of the pkt_size member was changed from int to size_t and
therefore the assertion always holds. The assertion was protecting the
su

astlpc: Refactor redundant assertion and associated logic

The type of the pkt_size member was changed from int to size_t and
therefore the assertion always holds. The assertion was protecting the
subsequent cast to uint32_t, so the assertion is deleted and the cast
replaced by ensuring body is of the right type for the comparison.

Fixes: #10
Fixes: e889b19f4b34 ("core: Make pkt_size and pkt_pad size_t")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I6600bb242b66fd8510a150e1a508a7f572beb8d0

show more ...

f447b4f411-Oct-2022 Rashmica Gupta <rashmica@linux.ibm.com>

astlpc: Add check for MCTP hdr version

The only valid version number at this stage is 1.

Change-Id: I2dc82e272047184f62c202e4e0643057290499cd
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>

695deed829-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

ad7bbe7329-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

libmctp-serial: Format with clang-format

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

0af68f2e29-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

libmctp-astlpc: Format with clang-format

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

69eda31b29-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

4d0c428c29-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

utils: mctp-astlpc-daemon: Format with clang-format

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

435670d629-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

utils: mctp-pipe: Format with clang-format

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

2c69ab3129-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

utils: mctp-in: Format with clang-format

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

23496bf229-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

85966c1829-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

container_of: Format with clang-format

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

9497718729-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

utils: capture: Format with clang-format

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

31b01e0d29-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

233e28f029-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

clang-ignore: Remove files that pass formatting

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

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

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

0721f58528-Sep-2022 Andrew Jeffery <andrew@aj.id.au>

core: Define return value behaviours for binding Tx callbacks

Binding Tx callbacks must return 0 upon success or a negative error code
on failure. Some error codes invoke specific error handling beh

core: Define return value behaviours for binding Tx callbacks

Binding Tx callbacks must return 0 upon success or a negative error code
on failure. Some error codes invoke specific error handling behaviours.
If a binding Tx callback returns the following negative error codes:

1. EMSGSIZE: The packet whose transmission failed is dequeued from the
transmit queue and dropped, as it will never be successfully
transmitted

2. EBUSY: The packet whose transmission failed remains queued for a
subsequent attempt.

This prevents Tx queue stalls for bindings such as astlpc where
reinitialisation can renegotiate the Tx buffer size to a lower value
than the size of packets already in the Tx queue. Previously the
implementation in core failed to discard the packet from the binding Tx
queue if transmission of the head packet was not possible.

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

show more ...

12345678910>>...14