On 5/18/22 07:49, Leon Romanovsky wrote: > On Sun, May 15, 2022 at 10:36:07AM +0300, Mark Bloch wrote: >> >> >> On 5/14/2022 08:09, Leon Romanovsky wrote: >>> On Fri, May 13, 2022 at 05:46:16PM +0000, Rohit Sajan Kumar wrote: >>>> Hey, >>>> >>>> Sending this as a gentle reminder to review the patch sent earlier this week which can be found in this email chain. >>> >>> Patches that sent in HTML format, to wrong addresses and not visible >>> in patchworks/ML, without target net-next/rdma-next/e.t.c., with wrong >>> title are generally ignored. >>> >>> Why vhca_id that returned from MLX5_IB_METHOD_QUERY_PORT is not enough? >> >> The driver returns that only when in switchdev mode. >> I don't see why that can't be changed but that's the state today. > > My guess is that it is not needed outside of switchdev mode. This is why > I would like to know why current solution is not enough. > The commit message says this API will be used inside a guest. So they have a PCI function inside a VM (could be VF/PF etc.) and they would like to get the vhca_id of said function. The current info is filled only when in switchdev mode and only when run on the eswitch manager. If they want to run it on a VF it doesn't matter if the eswitch manager is in switchdev mode or not, as the VF doesn't know what mode is used. The query port method was added as there is info (like metadata c0 value and more) that is filled by the kernel and DEVX can't help with that. As vhca_id can be retrieved via DEVX and requires no userspace/kernel changes it seems like the best option. > Thanks > Mark