facebook / OpenBIC

BICs (Bridge IC) are standalone devices deployed within a Data Center that enable monitoring a multi-host system using a single BMC device.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IPMB RX polling delay and TX sleep time

Yi-Shum opened this issue · comments

Hi @rainlinWW,

When we run ASD cscript on BMC, it takes more time than YV3, because IPMB TX and RX will sleep 10 milliseconds after sending and receiving a packet.
If we reduce the sleep time, it will improve.

What is the reason for waiting 10 milliseconds on IPMB TX and RX?

Thanks,
Eason

Hi @Yi-Shum ,

For Rx thread, we suggest to keep the sleep time in that it sets the I2C mqueue polling interval, or there will be frequently context switch impacting performance for all other threads, especially on SKU with both 1ou and 2ou expansion card present.

And for Tx thread, the sleep time is only set to yield the CPU source to other threads, you may try to tune the sleep time for better performance or try replacing the sleep with kernel yield API.

Thanks,
Rain

Hi Rain,

Thanks for your answer.
There is another question about IPMB RX, the function ipmb_slave_read() get the latest IPMB packet instead of the oldest.
Is there any reason why ipmb_slave driver uses LIFO?

Thanks,
Eason

Hi Yi-Shum,

Currently the slave read function only support sending one packet at a time and we don't expect there will be a newer or older packet.

Thanks,
Rain

Hi Rain,

Thanks for your answer, but my question is:
If BIC receives two IPMB packets, the first is A and the second is B, the driver will temporarily store these packets in a buffer.
When we call ipmb_slave_read() to get a packet from the driver buffer, we will get B (the newer one).
Is this the expected action(LIFO)?

Thanks,
Eason

Hi Yi-Shum,

About API ipmb_slave_read(), it's provided from Aspeed and we are not so sure about the implement.
We will check the code behavior with Aspeed.
Also, could you provide the way you reproduce the issue?

Thanks,
Rain

Hi Rain,

We found this issue using ast1030 evb and the following commands.

uart:~$ i2c slave_attach IPMB_SLAVE_0
uart:~$ i2c write I2C_1 50 0 01
uart:~$ i2c write I2C_1 50 0 02
uart:~$ i2c write I2C_1 50 0 03
uart:~$ i2c slave_ipmb_read IPMB_SLAVE_0
ipmb length : 3
00000000: a0 00 03                                         |...              |
uart:~$ i2c slave_ipmb_read IPMB_SLAVE_0
ipmb length : 3
00000000: a0 00 02                                         |...              |
uart:~$ i2c slave_ipmb_read IPMB_SLAVE_0
ipmb length : 3
00000000: a0 00 01                                         |...              |

Thanks,
Eason

Hi Yi-Shum,

Aspeed helped to push commit to modify IPMB slave read to FIFO.
You can try if the issue solved.
AspeedTech-BMC/zephyr@8fcd674

Thanks,
Rain

Hi Rain,

Okay, thanks for your reply.

Thanks,
Eason