Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* Re: Move the definitions for rxe_av.network_type to uAPI
@ 2020-10-16 20:20 Bob Pearson
  2020-10-16 20:31 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Pearson @ 2020-10-16 20:20 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma

Jason,

Your recent commit:

	commit e0d696d201dd5d31813787d9b61a42fc459eee89
	Author: Jason Gunthorpe <jgg@ziepe.ca>
	Date:   Thu Oct 15 20:42:18 2020 -0300

	RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI

has some problems and so far I am having trouble making it work sensibly.

What you have done is to make the network_type field in rxe_av be private,
(i.e. RXE_NETWORK_TYPE_XXX instead of RDMA_NETWORK_XXX). You then defined these
private enums in rdma_uverbs_rxe.h. The problem is that there are more than one
source of AVs those:

	passed in user space send WQEs for UD traffic
	passed from kernel ULPs for UD traffic
	stored in the primary AV in QPs

The AVs created in the kernel get set by calling rdma_gid_attr_network_type()
which returns RDMA_NETWORK_XXX not RXE_NETWORK_TYPE_XXX. This can be fixed by
again making them the same, which you didn't do, but that means they really aren't
private. Or, we can explicitly translate between them in the AV init code.

No rush but I still think the right answer is to let user space only have to deal
with AHs and not AVs.

There was also a confusion between V6 and V4. I will submit a small patch that
fixes that and makes the enums the same again which is more efficient than transocding
them.

Bob

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Move the definitions for rxe_av.network_type to uAPI
  2020-10-16 20:20 Move the definitions for rxe_av.network_type to uAPI Bob Pearson
@ 2020-10-16 20:31 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-10-16 20:31 UTC (permalink / raw)
  To: Bob Pearson; +Cc: linux-rdma

On Fri, Oct 16, 2020 at 03:20:50PM -0500, Bob Pearson wrote:
> Jason,
> 
> Your recent commit:
> 
> 	commit e0d696d201dd5d31813787d9b61a42fc459eee89
> 	Author: Jason Gunthorpe <jgg@ziepe.ca>
> 	Date:   Thu Oct 15 20:42:18 2020 -0300
> 
> 	RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI
> 
> has some problems and so far I am having trouble making it work sensibly.
> 
> What you have done is to make the network_type field in rxe_av be private,
> (i.e. RXE_NETWORK_TYPE_XXX instead of RDMA_NETWORK_XXX). You then defined these
> private enums in rdma_uverbs_rxe.h. The problem is that there are more than one
> source of AVs those:

Bah, I missed rxe_av_fill_ip_info(), still it should just transcode
for now.

> There was also a confusion between V6 and V4. I will submit a small patch that
> fixes that and makes the enums the same again which is more efficient than transocding
> them.

Bah again. People need to check the stuff I write at 9pm :P

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 20:20 Move the definitions for rxe_av.network_type to uAPI Bob Pearson
2020-10-16 20:31 ` Jason Gunthorpe

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git