1. 12 7月, 2018 3 次提交
  2. 11 7月, 2018 8 次提交
  3. 10 7月, 2018 26 次提交
  4. 05 7月, 2018 3 次提交
    • J
      RDMA/uverbs: Combine MIN_SZ_OR_ZERO with UVERBS_ATTR_STRUCT · 422e3d37
      Jason Gunthorpe 提交于
      After all the rework is done it is now possible to include single flags in
      the type macros. Any user of UVERBS_ATTR_STRUCT needs to zero check data
      past the end of the known struct to be correct, so make this mandatory,
      and get rid of MIN_SZ_OR_ZERO as a user flag.
      
      This changes UVERBS_ATTR_TYPE to refer to a struct of exact size with not
      possibility of extension, convert the few users of UVERBS_ATTR_TYPE and
      MIN_SZ_OR_ZERO to use UVERBS_ATTR_STRUCT.
      
      The one user of UVERBS_ATTR_STRUCT without MIN_SZ_OR_ZERO is just
      confused. There is some padding at the end of that struct, but userspace
      always provides it with the padding. The construction doesn't test if the
      padding is zero, so it is pointless. Just use UVERBS_ATTR_TYPE.
      
      Finally, rename min_sz_or_zero to zero_trailing to better reflect what it
      does and hopefully avoid such mis-uses in the future.
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      422e3d37
    • J
      RDMA/uverbs: Use UVERBS_ATTR_MIN_SIZE correctly and uniformly · 540cd692
      Jason Gunthorpe 提交于
      This newer macro allows specifying a lower bound on the accepted size, and
      has an 'unlimited' upper bound. Due to this it never checks for trailing
      zeroing so it doesn't make any sense to combine it with MIN_SZ_OR_ZERO, so
      drop MIN_SZ_OR_ZERO when they are used together
      
      There were a couple of places that open coded this pattern, switch them to
      use the clearer UVERBS_ATTR_MIN_SIZE for clarity.
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      540cd692
    • J
      RDMA/uverbs: Remove UA_FLAGS · 83bb4442
      Jason Gunthorpe 提交于
      This bit of boilerplate isn't really necessary, we can use bitfields
      instead of a flags enum and the macros can then individually initialize
      them through the __VA_ARGS__ like everything else.
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      83bb4442