diff options
author | David S. Miller <davem@davemloft.net> | 2016-03-04 17:19:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-04 17:19:16 -0500 |
commit | 94f7153e41d834824f4108d832f1935603e73105 (patch) | |
tree | e0937ebd8ae6aa83e492fb3fee753577f5348437 /include | |
parent | 3d1c6df8cb06b999fdf72c17966c30d7a21484d0 (diff) | |
parent | a4373a489e87e2bf8794194bc275b6c05f1af2f7 (diff) | |
download | linux-94f7153e41d834824f4108d832f1935603e73105.tar.bz2 |
Merge tag 'rxrpc-rewrite-20160304' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
David Howells says:
====================
RxRPC: Rewrite part 1
Here's the first set of patches from my RxRPC rewrite, aimed at net-next.
These do some clean ups and bug fixes. Most of the changes are small, but
there are a couple of bigger changes:
(*) Convert call flag numbers and event numbers into enums. Then rename
the event numbers to all have _EV_ in their name to stop confusion.
Fix one instance of an event bit being used instead of a flag bit.
(*) A copy of the Rx protocol header is kept in the sk_buff private data.
Keep this in host byte order rather than network byte order as it
makes more sense. A number of other fields then get converted into
host byte order too.
Conversion between host and network byte order is then done at the
packet reception/generation stage.
This is based on net-next/master
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/rxrpc/packet.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/rxrpc/packet.h b/include/rxrpc/packet.h index 4dce116bfd80..9ebab3a8cf0a 100644 --- a/include/rxrpc/packet.h +++ b/include/rxrpc/packet.h @@ -22,7 +22,7 @@ typedef __be32 rxrpc_serial_net_t; /* on-the-wire Rx message serial number */ * on-the-wire Rx packet header * - all multibyte fields should be in network byte order */ -struct rxrpc_header { +struct rxrpc_wire_header { __be32 epoch; /* client boot timestamp */ __be32 cid; /* connection and channel ID */ @@ -68,10 +68,19 @@ struct rxrpc_header { } __packed; -#define __rxrpc_header_off(X) offsetof(struct rxrpc_header,X) - extern const char *rxrpc_pkts[]; +#define RXRPC_SUPPORTED_PACKET_TYPES ( \ + (1 << RXRPC_PACKET_TYPE_DATA) | \ + (1 << RXRPC_PACKET_TYPE_ACK) | \ + (1 << RXRPC_PACKET_TYPE_BUSY) | \ + (1 << RXRPC_PACKET_TYPE_ABORT) | \ + (1 << RXRPC_PACKET_TYPE_ACKALL) | \ + (1 << RXRPC_PACKET_TYPE_CHALLENGE) | \ + (1 << RXRPC_PACKET_TYPE_RESPONSE) | \ + /*(1 << RXRPC_PACKET_TYPE_DEBUG) | */ \ + (1 << RXRPC_PACKET_TYPE_VERSION)) + /*****************************************************************************/ /* * jumbo packet secondary header |