Skip to contentSkip to conversation

RDMA/mlx5: Impact of mlx5_roce::last_port_state initial value on ibv_async_event port state change notifications

DISCUSSION Галась Сергей 1 participant 1 message Jan 28 InfiniBand

lore
Share & tools
lore
#0 lore raw

Hi everyone,

Kernel version: 5.14.0-570.23.1.el9_6.

Reproducible scenario: Load mlx5_ib module, then execute "ip link set dev <active mlx5 device> down" - the InfiniBand subsystem doesn't send the expected IBV_EVENT_PORT_ERR event. Subsequent "ip link set dev up/down" operations on the same device correctly generate ibv_async_event port state change events.
Investigation revealed that the driver initializes the last_port_state field for all mlx5 devices to IB_PORT_DOWN value. Then, the comparison between last_port_state and actual device status inside mlx5_netdev_event after the first "down" operation concludes that the status hasn't changed, and doesn't generate an event.

So far I haven't found anyone else reporting this issue.

I would like to ask:
1. The last_port_state is used only to prevent sending redundant port state change events. What is the reason for choosing IB_PORT_DOWN as
the initial value? It seems that choosing IB_PORT_NOP would be just as good, but would prevent incorrect interpretation of the first device
state event.
2. Is there any additional acceptable way provided by the InfiniBand subsystem to detect the first mlx5 device down event, in addition to
processing ibv_async_event events?
УВЕДОМЛЕНИЕОКОНФИДЕНЦИАЛЬНОСТИ:Этоэлектронноесообщениеилюбыедокументы,приложенныекнему,содержатконфиденциальнуюинформацию.НастоящимуведомляемВасотом,чтоеслиэтосообщениенепредназначеноВам,использование,копирование,распространениеинформации,содержащейсявнастоящемсообщении,атакжеосуществлениелюбыхдействийнаосновеэтойинформации,строгозапрещено.ЕслиВыполучилиэтосообщениепоошибке,пожалуйста,сообщитеобэтомотправителюпоэлектроннойпочтеиудалитеэтосообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.