lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9Z_BC4GBTiFsONJ@mini-arch>
Date: Sun, 16 Mar 2025 00:34:28 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: David Ahern <dsahern@...nel.org>
Cc: Leon Romanovsky <leon@...nel.org>, Jason Gunthorpe <jgg@...dia.com>,
	Saeed Mahameed <saeed@...nel.org>, Jiri Pirko <jiri@...nulli.us>,
	Jakub Kicinski <kuba@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andy Gospodarek <andrew.gospodarek@...adcom.com>,
	Aron Silverton <aron.silverton@...cle.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Dave Jiang <dave.jiang@...el.com>,
	Christoph Hellwig <hch@...radead.org>,
	Itay Avraham <itayavr@...dia.com>, Jiri Pirko <jiri@...dia.com>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Leonid Bloch <lbloch@...dia.com>, linux-cxl@...r.kernel.org,
	linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
	Saeed Mahameed <saeedm@...dia.com>,
	"Nelson, Shannon" <shannon.nelson@....com>
Subject: Re: [PATCH v5 0/8] Introduce fwctl subystem

On 03/14, David Ahern wrote:
> On 3/12/25 11:34 AM, Stanislav Fomichev wrote:
> >> More specifically, I do not see netdev APIs ever recognizing RDMA
> >> concepts like domains and memory regions. For us, everything is relative
> >> to a domain and a region - e.g., whether a queue is created for a netdev
> >> device or an IB QP both use the same common internal APIs.  I would
> >> prefer not to use fwctl for something so basic.
> > 
> > What specifically do you mean here by 'memory regions'? Ne
> 
> netdev queues and flows are a subset of RDMA operations, so I mean MRs
> as in:
> 
> IBV_REG_MR(3)  Libibverbs Programmer's Manual
> 
> 
> NAME
>        ibv_reg_mr, ibv_reg_mr_iova, ibv_reg_dmabuf_mr, ibv_dereg_mr -
> register or deregister a memory region (MR)
> 
> SYNOPSIS
>        #include <infiniband/verbs.h>
> 
>        struct ibv_mr *ibv_reg_mr(struct ibv_pd *pd, void *addr,
>                                  size_t length, int access);
> 
>        struct ibv_mr *ibv_reg_mr_iova(struct ibv_pd *pd, void *addr,
>                                       size_t length, uint64_t hca_va,
>                                       int access);
> 
>        struct ibv_mr *ibv_reg_dmabuf_mr(struct ibv_pd *pd, uint64_t offset,
>                                         size_t length, uint64_t iova,
>                                         int fd, int access);
> 
>        int ibv_dereg_mr(struct ibv_mr *mr);
> 
> DESCRIPTION
>        ibv_reg_mr() registers a memory region (MR) associated with the
> protection domain pd.  The MR's starting address is addr and its size is
> length.  The argument access describes the desired mem‐
>        ory protection attributes; it is either 0 or the bitwise OR of
> one or more of the following flags:
> 
> ...

Sure, and netdev has:

    -
      name: bind-rx
      doc: Bind dmabuf to netdev
      attribute-set: dmabuf
      flags: [ admin-perm ]
      do:
        request:
          attributes:
            - ifindex
            - fd
            - queues
        reply:
          attributes:
            - id

Which accepts dmabuf fd. Looks very similar to ibv_reg_dmabuf_mr to me.
And I think we can safely ignore ibv_reg_mr_iova which needs things
like proprietary nvidia-peermem to function.

My point is: I don't think netdev is as opposed to memory regions as
you think it is. As long as you come up with sensible new UAPI and
as long as everything is in the open, it's up for discussion.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ