Re: [PATCH for-next v3 2/2] RDMA/rxe: Call rxe_set_mtu after rxe_register_device
From: Zhijian Li (Fujitsu)
Date: Wed Sep 20 2023 - 06:24:43 EST
On 19/09/2023 16:19, Leon Romanovsky wrote:
> On Tue, Sep 19, 2023 at 03:25:00AM +0000, Zhijian Li (Fujitsu) wrote:
>>
>>
>> On 19/09/2023 09:11, Zhu Yanjun wrote:
>>> On Tue, Sep 19, 2023 at 8:57 AM Zhijian Li (Fujitsu)
>>> <lizhijian@xxxxxxxxxxx> wrote:
>>>>
>>>>
>>>>
>>>> On 18/09/2023 20:37, Leon Romanovsky wrote:
>>>>> On Mon, Sep 18, 2023 at 10:05:43AM +0800, Li Zhijian wrote:
>>>>>> rxe_set_mtu() will call rxe_info_dev() to print message, and
>>>>>> rxe_info_dev() expects dev_name(rxe->ib_dev->dev) has been assigned.
>>>>>>
>>>>>> Previously since dev_name() is not set, when a new rxe link is being
>>>>>> added, 'null' will be used as the dev_name like:
>>>>>>
>>>>>> "(null): rxe_set_mtu: Set mtu to 1024"
>>>>>>
>>>>>> Move rxe_register_device() earlier to assign the correct dev_name
>>>>>> so that it can be read by rxe_set_mtu() later.
>>>>>
>>>>> I would expect removal of that print line instead of moving
>>>>> rxe_register_device().
>>>>
>>>>
>>>> I also struggled with this point. The last option is keep it as it is.
>>>> Once rxe is registered, this print will work fine.
>>>
>>> I delved into the source code. About moving rxe_register_device, I
>>> could not find any harm to the driver.
>>
>> The point i'm struggling was that, it's strange/opaque to move rxe_register_device().
>> There is no doubt that the original order was more clear.
>>
>> In terms of the message content, is it valuable to print(pr_info) this message
>
> I doubt if that print has any value in day-to-day use of RXE.
Bob,
As you are one of the active RXE users, any comments about this print content.
Thanks
>
> Thanks