• David Howells's avatar
    rxrpc: Keep the skb private record of the Rx header in host byte order · 0d12f8a4
    David Howells authored
    Currently, a copy of the Rx packet header is copied into the the sk_buff
    private data so that we can advance the pointer into the buffer,
    potentially discarding the original.  At the moment, this copy is held in
    network byte order, but this means we're doing a lot of unnecessary
    translations.
    
    The reasons it was done this way are that we need the values in network
    byte order occasionally and we can use the copy, slightly modified, as part
    of an iov array when sending an ack or an abort packet.
    
    However, it seems more reasonable on review that it would be better kept in
    host byte order and that we make up a new header when we want to send
    another packet.
    
    To this end, rename the original header struct to rxrpc_wire_header (with
    BE fields) and institute a variant called rxrpc_host_header that has host
    order fields.  Change the struct in the sk_buff private data into an
    rxrpc_host_header and translate the values when filling it in.
    
    This further allows us to keep values kept in various structures in host
    byte order rather than network byte order and allows removal of some fields
    that are byteswapped duplicates.
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    0d12f8a4
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...