Re: [PATCH] RDMA/rxe: No need to check IPV6 in rxe_find_route

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/23/22 12:33 AM, William Kucharski wrote:
Rather than remove the #if guard here, shouldn't it instead be expanded
to cover the entire

     else if (av->network_type == RXE_NETWORK_TYPE_IPV6) {

clause?

There is no need to check for RXE_NETWORK_TYPE_IPV6, make assignments
to the stack-allocated pointers or call rxe_find_route6() unless
CONFIG_IPV6 is true.

In fact, if CONFIG_IPV6 is false, as rxe_find_route6 would also return
NULL, the else clause to the RXE_NETWORK_TYPE_IPV4 check could instead
become a simple

     return NULL;

Thanks for the suggestion! And it could also resolve the issue reported by
LKP too.

Thanks,
Guoqing



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux