Re: [PATCH rdma-next v2 0/8] RDMA ioctl() improvements

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

 



On Mon, Mar 19, 2018 at 03:02:32PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> 
> >From Matan:
> 
> Changes from V1:
>   - Simplify the check if the unknown part of an attribute is cleared
>   - Make the IS_UVERBS_COPY_ERR more robust to errors
>   - Don't rely on the caller to zero the variable when calling uverbs_copy_from_or_zero
> Changes from V0:
>   - Each object has its own file.
>   - Add macros that helps the provider drivers to easily add
>     attributes to existing common methods.
>   - Fix a bug in extending inline PTR_IN attributes by size.
>   - Use the same DECLARE_UVERBS_NAMED_ macros both in the common and
>     provider drivers code.
> 
> -----------------------------------------------------------------------
> This series contains improvements to RDMA ioctl() infrastructure.
> Later patches will use this extensively.
> 
> The first patch moves to a new consistent naming. We link different
> methods and handlers by using DECLARE_UVERBS_NAMED_METHOD and
> UVERBS_HANDLER macros (similarly for objects). This makes it easier to
> find how objects, methods and handlers
> are linked together.
> 
> This patch also contains a major change towards sharing uapi headers
> between user-space and kernel. The new files are named as follows:
> [subsystem]_user_ioctl_[cmds/verbs].
> [subsystem] =  rdma, ib, provider drivers.
>                rdma contains standard ioctl() infrastructure definitions.
>                ib contains the verbs definitions.
>                Different provider drivers contain their own uapi structs
>                and definitions.
> [cmds/verbs] = The goal here to share as much between applications and
>                kernel, thus avoid unnecessary copies. Therefore,
>                sometimes we need to export an attribute struct that will
>                be given straight from the user-space. In order to achieve
>                that, we split the definitions into to: _verbs.h include
>                structs and enums that should be used straight from the
>                application, while _cmds.h file includes the rest (mainly,
>                definitions that are only used by the communicating
>                library).
> 
> The second patch adds a driver_id to the uverbs_hdr. Since this uapi is
> still experimental. We're enhancing it before turning it on by default.
> This could be later use for having a smart strace (that decodes commands
> successfully).
> 
> The third patch adds a compact representation of attribute
> specifications. Since we plan to have a lot of attributes from different
> types, we want to minimize our memory footprint. This makes sure that adding
> enum attributes (will be added in a next series) doesn't affect our memory
> footprint too much.
> 
> The fourth patch adds a way to safely extend attributes. The spec
> language is enhanced to contain more than the sizeof(type). We state the
> minimal acceptable size and the known kernel size. The parser checks
> that it was given at least the minimal size and that all the unknown
> size is zeroed. This is used by the new UVERBS_ATTR_SPEC_F_MIN_SZ_OR_ZERO
> flag which replaces the old UVERBS_ATTR_SPEC_F_MIN_SZ one. Unbounded size
> is given as minimum zero and USHRT_MAX known size.
> 
> The fifth patch exposes the uverbs standard parsing tree. Previously,
> when the uverbs client registered, it registered the standard parsing
> tree (if the driver hasn't registered one of its own). Up until now, no
> driver had a custom parsing tree, but since we're going to add a driver
> that uses both the standard parsing tree and adds some additions to it,
> we want to expose the custom tree for being used in the provider
> drivers.
> 
> The sixth patch moves all related cq definitions into its own file. This
> is done in order to prevent bogging up uverbs_std_types.c.
> 
> The seventh patch enhances the macro language for (common) cases where
> the provider driver wants to enhance an existing method with some new
> attributes. Instead of defining the whole hierarchy, the provider driver
> could just use ADD_UVERBS_ATTRIBUTES and add these new attributes
> easily.
> 
> The eighth patch enables the ioctl() infrastructure by default. Only
> verbs which exist both in the write() and ioctl() path are placed under
> an experimental #ifdef.
> 
> Thanks
> 
> Matan Barak (8):
>   IB/uverbs: Move to new headers and make naming consistent
>   IB/uverbs: Extend uverbs_ioctl header with driver_id
>   IB/uverbs: Enable compact representation of uverbs_attr_spec
>   IB/uverbs: Safely extend existing attributes
>   IB/uverbs: Expose parsing tree of all common objects to providers
>   IB/uverbs: Move ioctl path of create_cq and destroy_cq to a new file
>   IB/uverbs: Add macros to simplify adding driver specific attributes
>   IB/uverbs: Enable ioctl() uAPI by default for new verbs

Series applied to for-next, thanks

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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