Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1350446 > unrolled thread
| Started by | David Howells <dhowells@redhat.com> |
|---|---|
| First post | 2016-03-04 17:40 +0100 |
| Last post | 2016-03-05 00:30 +0100 |
| Articles | 8 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 00/13] RxRPC: Rewrite part 1 David Howells <dhowells@redhat.com> - 2016-03-04 17:40 +0100
[PATCH 02/13] rxrpc: Convert call flag and event numbers into enums David Howells <dhowells@redhat.com> - 2016-03-04 17:40 +0100
[PATCH 10/13] rxrpc: rxkad: The version number in the response should be net byte order David Howells <dhowells@redhat.com> - 2016-03-04 17:40 +0100
[PATCH 06/13] rxrpc: Fix defined range for /proc/sys/net/rxrpc/rx_mtu David Howells <dhowells@redhat.com> - 2016-03-04 17:50 +0100
[PATCH 08/13] rxrpc: Adjust some whitespace and comments David Howells <dhowells@redhat.com> - 2016-03-04 17:50 +0100
Re: [PATCH 00/13] RxRPC: Rewrite part 1 David Miller <davem@davemloft.net> - 2016-03-04 23:30 +0100
Re: [PATCH 00/13] RxRPC: Rewrite part 1 David Howells <dhowells@redhat.com> - 2016-03-04 23:40 +0100
Re: [PATCH 00/13] RxRPC: Rewrite part 1 David Miller <davem@davemloft.net> - 2016-03-05 00:30 +0100
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-03-04 17:40 +0100 |
| Subject | [PATCH 00/13] RxRPC: Rewrite part 1 |
| Message-ID | <r90VH-14h-7@gated-at.bofh.it> |
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.
The patches can be found here also:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-rewrite
Tagged thusly:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
rxrpc-rewrite-20160304
This is based on net-next/master
David
---
David Howells (13):
rxrpc: Fix a case where a call event bit is being used as a flag bit
rxrpc: Convert call flag and event numbers into enums
rxrpc: Rename call events to begin RXRPC_CALL_EV_
rxrpc: Keep the skb private record of the Rx header in host byte order
rxrpc: The protocol family should be set to PF_RXRPC not PF_UNIX
rxrpc: Fix defined range for /proc/sys/net/rxrpc/rx_mtu
rxrpc: Be more selective about the types of received packets we accept
rxrpc: Adjust some whitespace and comments
rxrpc: Use ACCESS_ONCE() when accessing circular buffer pointers
rxrpc: rxkad: The version number in the response should be net byte order
rxrpc: rxkad: Casts are needed when comparing be32 values
rxrpc: Clear the unused part of a sockaddr_rxrpc for memcmp() use
rxrpc: Don't try to map ICMP to error as the lower layer already did that
include/rxrpc/packet.h | 15 +++
net/rxrpc/af_rxrpc.c | 39 +++-----
net/rxrpc/ar-accept.c | 56 +++++++-----
net/rxrpc/ar-ack.c | 213 ++++++++++++++++++++++-----------------------
net/rxrpc/ar-call.c | 84 ++++++++----------
net/rxrpc/ar-connection.c | 83 ++++++++----------
net/rxrpc/ar-connevent.c | 79 ++++++++---------
net/rxrpc/ar-error.c | 13 ---
net/rxrpc/ar-input.c | 118 ++++++++++++++-----------
net/rxrpc/ar-internal.h | 196 ++++++++++++++++++++++++-----------------
net/rxrpc/ar-local.c | 29 ++++--
net/rxrpc/ar-output.c | 73 ++++++++++-----
net/rxrpc/ar-peer.c | 2
net/rxrpc/ar-proc.c | 10 +-
net/rxrpc/ar-recvmsg.c | 20 ++--
net/rxrpc/ar-security.c | 6 +
net/rxrpc/ar-skbuff.c | 7 +
net/rxrpc/ar-transport.c | 1
net/rxrpc/rxkad.c | 165 ++++++++++++++++++-----------------
net/rxrpc/sysctl.c | 2
20 files changed, 639 insertions(+), 572 deletions(-)
[toc] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-03-04 17:40 +0100 |
| Subject | [PATCH 02/13] rxrpc: Convert call flag and event numbers into enums |
| Message-ID | <r90VI-14h-37@gated-at.bofh.it> |
| In reply to | #1350446 |
Convert call flag and event numbers into enums and move their definitions
outside of the struct.
Also move the call state enum outside of the struct and add an extra
element to count the number of states.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/ar-ack.c | 3 +
net/rxrpc/ar-call.c | 2 -
net/rxrpc/ar-internal.h | 107 +++++++++++++++++++++++++++--------------------
3 files changed, 65 insertions(+), 47 deletions(-)
diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c
index adc555e0323d..7cb7e45c8bad 100644
--- a/net/rxrpc/ar-ack.c
+++ b/net/rxrpc/ar-ack.c
@@ -886,10 +886,11 @@ void rxrpc_process_call(struct work_struct *work)
struct rxrpc_header hdr;
struct msghdr msg;
struct kvec iov[5];
+ enum rxrpc_call_event genbit;
unsigned long bits;
__be32 data, pad;
size_t len;
- int genbit, loop, nbit, ioc, ret, mtu;
+ int loop, nbit, ioc, ret, mtu;
u32 abort_code = RX_PROTOCOL_ERROR;
u8 *acks = NULL;
diff --git a/net/rxrpc/ar-call.c b/net/rxrpc/ar-call.c
index a9e05db0f5d5..d9a8eeb9290a 100644
--- a/net/rxrpc/ar-call.c
+++ b/net/rxrpc/ar-call.c
@@ -28,7 +28,7 @@ unsigned rxrpc_max_call_lifetime = 60 * HZ;
*/
unsigned rxrpc_dead_call_expiry = 2 * HZ;
-const char *const rxrpc_call_states[] = {
+const char *const rxrpc_call_states[NR__RXRPC_CALL_STATES] = {
[RXRPC_CALL_CLIENT_SEND_REQUEST] = "ClSndReq",
[RXRPC_CALL_CLIENT_AWAIT_REPLY] = "ClAwtRpl",
[RXRPC_CALL_CLIENT_RECV_REPLY] = "ClRcvRpl",
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 2934a73a5981..3aea424a88e4 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -293,6 +293,67 @@ struct rxrpc_connection {
};
/*
+ * Flags in call->flags.
+ */
+enum rxrpc_call_flag {
+ RXRPC_CALL_RELEASED, /* call has been released - no more message to userspace */
+ RXRPC_CALL_TERMINAL_MSG, /* call has given the socket its final message */
+ RXRPC_CALL_RCVD_LAST, /* all packets received */
+ RXRPC_CALL_RUN_RTIMER, /* Tx resend timer started */
+ RXRPC_CALL_TX_SOFT_ACK, /* sent some soft ACKs */
+ RXRPC_CALL_PROC_BUSY, /* the processor is busy */
+ RXRPC_CALL_INIT_ACCEPT, /* acceptance was initiated */
+ RXRPC_CALL_HAS_USERID, /* has a user ID attached */
+ RXRPC_CALL_EXPECT_OOS, /* expect out of sequence packets */
+};
+
+/*
+ * Events that can be raised on a call.
+ */
+enum rxrpc_call_event {
+ RXRPC_CALL_RCVD_ACKALL, /* ACKALL or reply received */
+ RXRPC_CALL_RCVD_BUSY, /* busy packet received */
+ RXRPC_CALL_RCVD_ABORT, /* abort packet received */
+ RXRPC_CALL_RCVD_ERROR, /* network error received */
+ RXRPC_CALL_ACK_FINAL, /* need to generate final ACK (and release call) */
+ RXRPC_CALL_ACK, /* need to generate ACK */
+ RXRPC_CALL_REJECT_BUSY, /* need to generate busy message */
+ RXRPC_CALL_ABORT, /* need to generate abort */
+ RXRPC_CALL_CONN_ABORT, /* local connection abort generated */
+ RXRPC_CALL_RESEND_TIMER, /* Tx resend timer expired */
+ RXRPC_CALL_RESEND, /* Tx resend required */
+ RXRPC_CALL_DRAIN_RX_OOS, /* drain the Rx out of sequence queue */
+ RXRPC_CALL_LIFE_TIMER, /* call's lifetimer ran out */
+ RXRPC_CALL_ACCEPTED, /* incoming call accepted by userspace app */
+ RXRPC_CALL_SECURED, /* incoming call's connection is now secure */
+ RXRPC_CALL_POST_ACCEPT, /* need to post an "accept?" message to the app */
+ RXRPC_CALL_RELEASE, /* need to release the call's resources */
+};
+
+/*
+ * The states that a call can be in.
+ */
+enum rxrpc_call_state {
+ RXRPC_CALL_CLIENT_SEND_REQUEST, /* - client sending request phase */
+ RXRPC_CALL_CLIENT_AWAIT_REPLY, /* - client awaiting reply */
+ RXRPC_CALL_CLIENT_RECV_REPLY, /* - client receiving reply phase */
+ RXRPC_CALL_CLIENT_FINAL_ACK, /* - client sending final ACK phase */
+ RXRPC_CALL_SERVER_SECURING, /* - server securing request connection */
+ RXRPC_CALL_SERVER_ACCEPTING, /* - server accepting request */
+ RXRPC_CALL_SERVER_RECV_REQUEST, /* - server receiving request */
+ RXRPC_CALL_SERVER_ACK_REQUEST, /* - server pending ACK of request */
+ RXRPC_CALL_SERVER_SEND_REPLY, /* - server sending reply */
+ RXRPC_CALL_SERVER_AWAIT_ACK, /* - server awaiting final ACK */
+ RXRPC_CALL_COMPLETE, /* - call completed */
+ RXRPC_CALL_SERVER_BUSY, /* - call rejected by busy server */
+ RXRPC_CALL_REMOTELY_ABORTED, /* - call aborted by peer */
+ RXRPC_CALL_LOCALLY_ABORTED, /* - call aborted locally on error or close */
+ RXRPC_CALL_NETWORK_ERROR, /* - call terminated by network error */
+ RXRPC_CALL_DEAD, /* - call is dead */
+ NR__RXRPC_CALL_STATES
+};
+
+/*
* RxRPC call definition
* - matched by { connection, call_id }
*/
@@ -317,57 +378,13 @@ struct rxrpc_call {
unsigned long user_call_ID; /* user-defined call ID */
unsigned long creation_jif; /* time of call creation */
unsigned long flags;
-#define RXRPC_CALL_RELEASED 0 /* call has been released - no more message to userspace */
-#define RXRPC_CALL_TERMINAL_MSG 1 /* call has given the socket its final message */
-#define RXRPC_CALL_RCVD_LAST 2 /* all packets received */
-#define RXRPC_CALL_RUN_RTIMER 3 /* Tx resend timer started */
-#define RXRPC_CALL_TX_SOFT_ACK 4 /* sent some soft ACKs */
-#define RXRPC_CALL_PROC_BUSY 5 /* the processor is busy */
-#define RXRPC_CALL_INIT_ACCEPT 6 /* acceptance was initiated */
-#define RXRPC_CALL_HAS_USERID 7 /* has a user ID attached */
-#define RXRPC_CALL_EXPECT_OOS 8 /* expect out of sequence packets */
unsigned long events;
-#define RXRPC_CALL_RCVD_ACKALL 0 /* ACKALL or reply received */
-#define RXRPC_CALL_RCVD_BUSY 1 /* busy packet received */
-#define RXRPC_CALL_RCVD_ABORT 2 /* abort packet received */
-#define RXRPC_CALL_RCVD_ERROR 3 /* network error received */
-#define RXRPC_CALL_ACK_FINAL 4 /* need to generate final ACK (and release call) */
-#define RXRPC_CALL_ACK 5 /* need to generate ACK */
-#define RXRPC_CALL_REJECT_BUSY 6 /* need to generate busy message */
-#define RXRPC_CALL_ABORT 7 /* need to generate abort */
-#define RXRPC_CALL_CONN_ABORT 8 /* local connection abort generated */
-#define RXRPC_CALL_RESEND_TIMER 9 /* Tx resend timer expired */
-#define RXRPC_CALL_RESEND 10 /* Tx resend required */
-#define RXRPC_CALL_DRAIN_RX_OOS 11 /* drain the Rx out of sequence queue */
-#define RXRPC_CALL_LIFE_TIMER 12 /* call's lifetimer ran out */
-#define RXRPC_CALL_ACCEPTED 13 /* incoming call accepted by userspace app */
-#define RXRPC_CALL_SECURED 14 /* incoming call's connection is now secure */
-#define RXRPC_CALL_POST_ACCEPT 15 /* need to post an "accept?" message to the app */
-#define RXRPC_CALL_RELEASE 16 /* need to release the call's resources */
-
spinlock_t lock;
rwlock_t state_lock; /* lock for state transition */
atomic_t usage;
atomic_t sequence; /* Tx data packet sequence counter */
u32 abort_code; /* local/remote abort code */
- enum { /* current state of call */
- RXRPC_CALL_CLIENT_SEND_REQUEST, /* - client sending request phase */
- RXRPC_CALL_CLIENT_AWAIT_REPLY, /* - client awaiting reply */
- RXRPC_CALL_CLIENT_RECV_REPLY, /* - client receiving reply phase */
- RXRPC_CALL_CLIENT_FINAL_ACK, /* - client sending final ACK phase */
- RXRPC_CALL_SERVER_SECURING, /* - server securing request connection */
- RXRPC_CALL_SERVER_ACCEPTING, /* - server accepting request */
- RXRPC_CALL_SERVER_RECV_REQUEST, /* - server receiving request */
- RXRPC_CALL_SERVER_ACK_REQUEST, /* - server pending ACK of request */
- RXRPC_CALL_SERVER_SEND_REPLY, /* - server sending reply */
- RXRPC_CALL_SERVER_AWAIT_ACK, /* - server awaiting final ACK */
- RXRPC_CALL_COMPLETE, /* - call completed */
- RXRPC_CALL_SERVER_BUSY, /* - call rejected by busy server */
- RXRPC_CALL_REMOTELY_ABORTED, /* - call aborted by peer */
- RXRPC_CALL_LOCALLY_ABORTED, /* - call aborted locally on error or close */
- RXRPC_CALL_NETWORK_ERROR, /* - call terminated by network error */
- RXRPC_CALL_DEAD, /* - call is dead */
- } state;
+ enum rxrpc_call_state state : 8; /* current state of call */
int debug_id; /* debug ID for printks */
u8 channel; /* connection channel occupied by this call */
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-03-04 17:40 +0100 |
| Subject | [PATCH 10/13] rxrpc: rxkad: The version number in the response should be net byte order |
| Message-ID | <r90VI-14h-39@gated-at.bofh.it> |
| In reply to | #1350446 |
The version number rxkad places in the response should be network byte order. Whilst we're at it, rearrange the code to be more readable. Signed-off-by: David Howells <dhowells@redhat.com> --- net/rxrpc/rxkad.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 0f27524536bd..ca746f382517 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @@ -787,10 +787,15 @@ static int rxkad_respond_to_challenge(struct rxrpc_connection *conn, /* build the response packet */ memset(&resp, 0, sizeof(resp)); - resp.version = RXKAD_VERSION; - resp.encrypted.epoch = htonl(conn->epoch); - resp.encrypted.cid = htonl(conn->cid); - resp.encrypted.securityIndex = htonl(conn->security_ix); + resp.version = htonl(RXKAD_VERSION); + resp.encrypted.epoch = htonl(conn->epoch); + resp.encrypted.cid = htonl(conn->cid); + resp.encrypted.securityIndex = htonl(conn->security_ix); + resp.encrypted.inc_nonce = htonl(nonce + 1); + resp.encrypted.level = htonl(conn->security_level); + resp.kvno = htonl(token->kad->kvno); + resp.ticket_len = htonl(token->kad->ticket_len); + resp.encrypted.call_id[0] = htonl(conn->channels[0] ? conn->channels[0]->call_id : 0); resp.encrypted.call_id[1] = @@ -799,10 +804,6 @@ static int rxkad_respond_to_challenge(struct rxrpc_connection *conn, htonl(conn->channels[2] ? conn->channels[2]->call_id : 0); resp.encrypted.call_id[3] = htonl(conn->channels[3] ? conn->channels[3]->call_id : 0); - resp.encrypted.inc_nonce = htonl(nonce + 1); - resp.encrypted.level = htonl(conn->security_level); - resp.kvno = htonl(token->kad->kvno); - resp.ticket_len = htonl(token->kad->ticket_len); /* calculate the response checksum and then do the encryption */ rxkad_calc_response_checksum(&resp);
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-03-04 17:50 +0100 |
| Subject | [PATCH 06/13] rxrpc: Fix defined range for /proc/sys/net/rxrpc/rx_mtu |
| Message-ID | <r915o-19q-5@gated-at.bofh.it> |
| In reply to | #1350446 |
The upper bound of the defined range for rx_mtu is being set in the same
member as the lower bound (extra1) rather than the correct place (extra2).
I'm not entirely sure why this compiles.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rxrpc/sysctl.c b/net/rxrpc/sysctl.c
index 50a98a910eb1..093547ac2bcd 100644
--- a/net/rxrpc/sysctl.c
+++ b/net/rxrpc/sysctl.c
@@ -115,7 +115,7 @@ static struct ctl_table rxrpc_sysctl_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.extra1 = (void *)&one,
- .extra1 = (void *)&n_65535,
+ .extra2 = (void *)&n_65535,
},
{
.procname = "rx_jumbo_max",
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-03-04 17:50 +0100 |
| Subject | [PATCH 08/13] rxrpc: Adjust some whitespace and comments |
| Message-ID | <r915o-19q-19@gated-at.bofh.it> |
| In reply to | #1350446 |
Remove some excess whitespace, insert some missing spaces and adjust a
couple of comments.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/af_rxrpc.c | 9 +++------
net/rxrpc/ar-accept.c | 4 +---
net/rxrpc/ar-error.c | 1 -
net/rxrpc/ar-internal.h | 22 +++++++++++-----------
net/rxrpc/ar-security.c | 2 +-
net/rxrpc/ar-skbuff.c | 1 -
net/rxrpc/rxkad.c | 12 ++++++------
7 files changed, 22 insertions(+), 29 deletions(-)
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 5e810b83269f..b46f7742d336 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -121,7 +121,7 @@ static int rxrpc_validate_address(struct rxrpc_sock *rx,
*/
static int rxrpc_bind(struct socket *sock, struct sockaddr *saddr, int len)
{
- struct sockaddr_rxrpc *srx = (struct sockaddr_rxrpc *) saddr;
+ struct sockaddr_rxrpc *srx = (struct sockaddr_rxrpc *)saddr;
struct sock *sk = sock->sk;
struct rxrpc_local *local;
struct rxrpc_sock *rx = rxrpc_sk(sk), *prx;
@@ -142,7 +142,7 @@ static int rxrpc_bind(struct socket *sock, struct sockaddr *saddr, int len)
memcpy(&rx->srx, srx, sizeof(rx->srx));
- /* find a local transport endpoint if we don't have one already */
+ /* Find or create a local transport endpoint to use */
local = rxrpc_lookup_local(&rx->srx);
if (IS_ERR(local)) {
ret = PTR_ERR(local);
@@ -297,7 +297,6 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock,
if (!srx)
srx = &rx->srx;
-
if (!key)
key = rx->key;
if (key && !key->payload.data[0])
@@ -319,7 +318,6 @@ out_notrans:
_leave(" = %p", call);
return call;
}
-
EXPORT_SYMBOL(rxrpc_kernel_begin_call);
/**
@@ -335,7 +333,6 @@ void rxrpc_kernel_end_call(struct rxrpc_call *call)
rxrpc_remove_user_ID(call->socket, call);
rxrpc_put_call(call);
}
-
EXPORT_SYMBOL(rxrpc_kernel_end_call);
/**
@@ -616,7 +613,7 @@ static int rxrpc_create(struct net *net, struct socket *sock, int protocol,
if (!net_eq(net, &init_net))
return -EAFNOSUPPORT;
- /* we support transport protocol UDP only */
+ /* we support transport protocol UDP/UDP6 only */
if (protocol != PF_INET)
return -EPROTONOSUPPORT;
diff --git a/net/rxrpc/ar-accept.c b/net/rxrpc/ar-accept.c
index 73c905416271..277731a5e67a 100644
--- a/net/rxrpc/ar-accept.c
+++ b/net/rxrpc/ar-accept.c
@@ -415,7 +415,7 @@ out:
}
/*
- * handle rejectance of a call by userspace
+ * Handle rejection of a call by userspace
* - reject the call at the front of the queue
*/
int rxrpc_reject_call(struct rxrpc_sock *rx)
@@ -495,7 +495,6 @@ struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *sock,
_leave(" = %p", call);
return call;
}
-
EXPORT_SYMBOL(rxrpc_kernel_accept_call);
/**
@@ -514,5 +513,4 @@ int rxrpc_kernel_reject_call(struct socket *sock)
_leave(" = %d", ret);
return ret;
}
-
EXPORT_SYMBOL(rxrpc_kernel_reject_call);
diff --git a/net/rxrpc/ar-error.c b/net/rxrpc/ar-error.c
index 3c47441c472b..5948191bf4eb 100644
--- a/net/rxrpc/ar-error.c
+++ b/net/rxrpc/ar-error.c
@@ -115,7 +115,6 @@ void rxrpc_UDP_error_report(struct sock *sk)
/* pass the transport ref to error_handler to release */
skb_queue_tail(&trans->error_queue, skb);
rxrpc_queue_work(&trans->error_handler);
-
_leave("");
}
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 06bf5abd920d..8b495aed517d 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -16,7 +16,7 @@
BUG_ON(atomic_read((X)) >> (sizeof(atomic_t) - 2) == \
(POISON_FREE << 8 | POISON_FREE))
#else
-#define CHECK_SLAB_OKAY(X) do {} while(0)
+#define CHECK_SLAB_OKAY(X) do {} while (0)
#endif
#define FCRYPT_BSIZE 8
@@ -726,7 +726,7 @@ do { \
printk(KERN_ERR "RxRPC: Assertion failed\n"); \
BUG(); \
} \
-} while(0)
+} while (0)
#define ASSERTCMP(X, OP, Y) \
do { \
@@ -739,7 +739,7 @@ do { \
(unsigned long)(X), (unsigned long)(Y)); \
BUG(); \
} \
-} while(0)
+} while (0)
#define ASSERTIF(C, X) \
do { \
@@ -748,7 +748,7 @@ do { \
printk(KERN_ERR "RxRPC: Assertion failed\n"); \
BUG(); \
} \
-} while(0)
+} while (0)
#define ASSERTIFCMP(C, X, OP, Y) \
do { \
@@ -761,25 +761,25 @@ do { \
(unsigned long)(X), (unsigned long)(Y)); \
BUG(); \
} \
-} while(0)
+} while (0)
#else
#define ASSERT(X) \
do { \
-} while(0)
+} while (0)
#define ASSERTCMP(X, OP, Y) \
do { \
-} while(0)
+} while (0)
#define ASSERTIF(C, X) \
do { \
-} while(0)
+} while (0)
#define ASSERTIFCMP(C, X, OP, Y) \
do { \
-} while(0)
+} while (0)
#endif /* __KDEBUGALL */
@@ -836,9 +836,9 @@ do { \
CHECK_SLAB_OKAY(&(CALL)->usage); \
if (atomic_inc_return(&(CALL)->usage) == 1) \
BUG(); \
-} while(0)
+} while (0)
#define rxrpc_put_call(CALL) \
do { \
__rxrpc_put_call(CALL); \
-} while(0)
+} while (0)
diff --git a/net/rxrpc/ar-security.c b/net/rxrpc/ar-security.c
index e2f4c49a9246..ceff6394a65f 100644
--- a/net/rxrpc/ar-security.c
+++ b/net/rxrpc/ar-security.c
@@ -167,7 +167,7 @@ int rxrpc_init_server_conn_security(struct rxrpc_connection *conn)
struct rxrpc_sock *rx;
struct key *key;
key_ref_t kref;
- char kdesc[5+1+3+1];
+ char kdesc[5 + 1 + 3 + 1];
_enter("");
diff --git a/net/rxrpc/ar-skbuff.c b/net/rxrpc/ar-skbuff.c
index ae9f93f94ed2..62a267472fce 100644
--- a/net/rxrpc/ar-skbuff.c
+++ b/net/rxrpc/ar-skbuff.c
@@ -133,5 +133,4 @@ void rxrpc_kernel_free_skb(struct sk_buff *skb)
{
rxrpc_free_skb(skb);
}
-
EXPORT_SYMBOL(rxrpc_kernel_free_skb);
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index 160480221224..0f27524536bd 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -195,9 +195,9 @@ static int rxkad_secure_packet_auth(const struct rxrpc_call *call,
* wholly encrypt a packet (level 2 security)
*/
static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
- struct sk_buff *skb,
- u32 data_size,
- void *sechdr)
+ struct sk_buff *skb,
+ u32 data_size,
+ void *sechdr)
{
const struct rxrpc_key_token *token;
struct rxkad_level2_hdr rxkhdr
@@ -251,9 +251,9 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
* checksum an RxRPC packet header
*/
static int rxkad_secure_packet(const struct rxrpc_call *call,
- struct sk_buff *skb,
- size_t data_size,
- void *sechdr)
+ struct sk_buff *skb,
+ size_t data_size,
+ void *sechdr)
{
struct rxrpc_skb_priv *sp;
struct blkcipher_desc desc;
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-03-04 23:30 +0100 |
| Message-ID | <r96op-5cc-7@gated-at.bofh.it> |
| In reply to | #1350446 |
From: David Howells <dhowells@redhat.com> Date: Fri, 04 Mar 2016 16:37:05 +0000 > 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. > > The patches can be found here also: > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-rewrite > > Tagged thusly: > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > rxrpc-rewrite-20160304 > > This is based on net-next/master This looks really nice, pulled, thanks a lot David. Can you go through and use "unsigned int" instead of just plain "unsigned" in the RxRPC code? Thanks.
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-03-04 23:40 +0100 |
| Message-ID | <r96y7-5hB-27@gated-at.bofh.it> |
| In reply to | #1350644 |
David Miller <davem@davemloft.net> wrote: > Can you go through and use "unsigned int" instead of just plain > "unsigned" in the RxRPC code? Do you mind if I leave it to after the rewrite? I don't particularly want to have to rejig all the patches I have. David
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-03-05 00:30 +0100 |
| Message-ID | <r97ku-5P5-7@gated-at.bofh.it> |
| In reply to | #1350651 |
From: David Howells <dhowells@redhat.com> Date: Fri, 04 Mar 2016 22:33:38 +0000 > David Miller <davem@davemloft.net> wrote: > >> Can you go through and use "unsigned int" instead of just plain >> "unsigned" in the RxRPC code? > > Do you mind if I leave it to after the rewrite? I don't particularly want to > have to rejig all the patches I have. Sure.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web