]> git.baikalelectronics.ru Git - kernel.git/commit
mctp: Add SIOCMCTP{ALLOC,DROP}TAG ioctls for tag control
authorMatt Johnston <matt@codeconstruct.com.au>
Wed, 9 Feb 2022 04:05:57 +0000 (12:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 12:00:11 +0000 (12:00 +0000)
commitbf207878432677a4c46fdb7929ba19591d552451
tree6f239012c2653e6f0d89ef1ac483467e2590a339
parent78bb3f6cb7cb88c9523f3b1a8ab8e24c8c41d7f1
mctp: Add SIOCMCTP{ALLOC,DROP}TAG ioctls for tag control

This change adds a couple of new ioctls for mctp sockets:
SIOCMCTPALLOCTAG and SIOCMCTPDROPTAG.  These ioctls provide facilities
for explicit allocation / release of tags, overriding the automatic
allocate-on-send/release-on-reply and timeout behaviours. This allows
userspace more control over messages that may not fit a simple
request/response model.

In order to indicate a pre-allocated tag to the sendmsg() syscall, we
introduce a new flag to the struct sockaddr_mctp.smctp_tag value:
MCTP_TAG_PREALLOC.

Additional changes from Jeremy Kerr <jk@codeconstruct.com.au>.

Contains a fix that was:
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/mctp.rst
include/net/mctp.h
include/trace/events/mctp.h
include/uapi/linux/mctp.h
net/mctp/af_mctp.c
net/mctp/route.c