| 73c61845 | 29-Sep-2021 |
Jeremy Kerr <jk@codeconstruct.com.au> |
mctp: locking, lifetime and validity changes for sk_keys
We will want to invalidate sk_keys in a future change, which will require a boolean flag to mark invalidated items in the socket & net namesp
mctp: locking, lifetime and validity changes for sk_keys
We will want to invalidate sk_keys in a future change, which will require a boolean flag to mark invalidated items in the socket & net namespace lists. We'll also need to take a reference to keys, held over non-atomic contexts, so we need a refcount on keys also.
This change adds a validity flag (currently always true) and refcount to struct mctp_sk_key. With a refcount on the keys, using RCU no longer makes much sense; we have exact indications on the lifetime of keys. So, we also change the RCU list traversal to a locked implementation.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 1f6c77ac | 29-Sep-2021 |
Jeremy Kerr <jk@codeconstruct.com.au> |
mctp: Allow local delivery to the null EID
We may need to receive packets addressed to the null EID (==0), but addressed to us at the physical layer.
This change adds a lookup for local routes when
mctp: Allow local delivery to the null EID
We may need to receive packets addressed to the null EID (==0), but addressed to us at the physical layer.
This change adds a lookup for local routes when we see a packet addressed to EID 0, and a local phys address.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 03f2bbc4 | 29-Jul-2021 |
Matt Johnston <matt@codeconstruct.com.au> |
mctp: Allow per-netns default networks
Currently we have a compile-time default network (MCTP_INITIAL_DEFAULT_NET). This change introduces a default_net field on the net namespace, allowing future c
mctp: Allow per-netns default networks
Currently we have a compile-time default network (MCTP_INITIAL_DEFAULT_NET). This change introduces a default_net field on the net namespace, allowing future configuration for new interfaces.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 26ab3fca | 29-Jul-2021 |
Matt Johnston <matt@codeconstruct.com.au> |
mctp: Add dest neighbour lladdr to route output
Now that we have a neighbour implementation, hook it up to the output path to set the dest hardware address for outgoing packets.
Signed-off-by: Matt
mctp: Add dest neighbour lladdr to route output
Now that we have a neighbour implementation, hook it up to the output path to set the dest hardware address for outgoing packets.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 4a992bbd | 29-Jul-2021 |
Jeremy Kerr <jk@codeconstruct.com.au> |
mctp: Implement message fragmentation & reassembly
This change implements MCTP fragmentation (based on route & device MTU), and corresponding reassembly.
The MCTP specification only allows for frag
mctp: Implement message fragmentation & reassembly
This change implements MCTP fragmentation (based on route & device MTU), and corresponding reassembly.
The MCTP specification only allows for fragmentation on the originating message endpoint, and reassembly on the destination endpoint - intermediate nodes do not need to reassemble/refragment. Consequently, we only fragment in the local transmit path, and reassemble locally-bound packets. Messages are required to be in-order, so we simply cancel reassembly on out-of-order or missing packets.
In the fragmentation path, we just break up the message into MTU-sized fragments; the skb structure is a simple copy for now, which we can later improve with a shared data implementation.
For reassembly, we keep track of incoming message fragments using the existing tag infrastructure, allocating a key on the (src,dest,tag) tuple, and reassembles matching fragments into a skb->frag_list.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 833ef3b9 | 29-Jul-2021 |
Jeremy Kerr <jk@codeconstruct.com.au> |
mctp: Populate socket implementation
Start filling-out the socket syscalls: bind, sendmsg & recvmsg.
This requires an input route implementation, so we add to mctp_route_input, allowing lookups on
mctp: Populate socket implementation
Start filling-out the socket syscalls: bind, sendmsg & recvmsg.
This requires an input route implementation, so we add to mctp_route_input, allowing lookups on binds & message tags. This just handles single-packet messages at present, we will add fragmentation in a future change.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 831119f8 | 29-Jul-2021 |
Matt Johnston <matt@codeconstruct.com.au> |
mctp: Add neighbour netlink interface
This change adds the netlink interfaces for manipulating the MCTP neighbour table.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: Davi
mctp: Add neighbour netlink interface
This change adds the netlink interfaces for manipulating the MCTP neighbour table.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 4d8b9319 | 29-Jul-2021 |
Matt Johnston <matt@codeconstruct.com.au> |
mctp: Add neighbour implementation
Add an initial neighbour table implementation, to be used in the route output path.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David
mctp: Add neighbour implementation
Add an initial neighbour table implementation, to be used in the route output path.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 06d2f4c5 | 29-Jul-2021 |
Matt Johnston <matt@codeconstruct.com.au> |
mctp: Add netlink route management
This change adds RTM_GETROUTE, RTM_NEWROUTE & RTM_DELROUTE handlers, allowing management of the MCTP route table.
Includes changes from Jeremy Kerr <jk@codeconstr
mctp: Add netlink route management
This change adds RTM_GETROUTE, RTM_NEWROUTE & RTM_DELROUTE handlers, allowing management of the MCTP route table.
Includes changes from Jeremy Kerr <jk@codeconstruct.com.au>.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 889b7da2 | 29-Jul-2021 |
Jeremy Kerr <jk@codeconstruct.com.au> |
mctp: Add initial routing framework
Add a simple routing table, and a couple of route output handlers, and the mctp packet_type & handler.
Includes changes from Matt Johnston <matt@codeconstruct.co
mctp: Add initial routing framework
Add a simple routing table, and a couple of route output handlers, and the mctp packet_type & handler.
Includes changes from Matt Johnston <matt@codeconstruct.com.au>.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| 8f601a1e | 29-Jul-2021 |
Jeremy Kerr <jk@codeconstruct.com.au> |
mctp: Add base socket/protocol definitions
Add an empty socket implementation, plus initialisation/destruction handlers.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S.
mctp: Add base socket/protocol definitions
Add an empty socket implementation, plus initialisation/destruction handlers.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|