Skip to content

Commit

Permalink
rxrpc: Implement an in-kernel rxperf server for testing purposes
Browse files Browse the repository at this point in the history
Implement an in-kernel rxperf server to allow kernel-based rxrpc services
to be tested directly, unlike with AFS where they're accessed by the
fileserver when the latter decides it wants to.

This is implemented as a module that, if loaded, opens UDP port 7009
(afs3-rmtsys) and listens on it for incoming calls.  Calls can be generated
using the rxperf command shipped with OpenAFS, for example.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
dhowells committed Nov 4, 2022
1 parent 52cef3a commit ae32660
Show file tree
Hide file tree
Showing 5 changed files with 619 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/net/af_rxrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *);
u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *);
bool rxrpc_kernel_call_is_complete(struct rxrpc_call *);
void rxrpc_kernel_set_max_life(struct socket *, struct rxrpc_call *,
unsigned long);

Expand Down
5 changes: 5 additions & 0 deletions include/trace/events/rxrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
EM(afs_abort_probeuuid_negative, "afs-probeuuid-neg") \
EM(afs_abort_send_data_error, "afs-send-data") \
EM(afs_abort_unmarshal_error, "afs-unmarshal") \
/* rxperf errors */ \
EM(rxperf_abort_general_error, "rxperf-error") \
EM(rxperf_abort_oom, "rxperf-oom") \
EM(rxperf_abort_op_not_supported, "rxperf-op-notsupp") \
EM(rxperf_abort_unmarshal_error, "rxperf-unmarshal") \
/* RxKAD security errors */ \
EM(rxkad_abort_1_short_check, "rxkad1-short-check") \
EM(rxkad_abort_1_short_data, "rxkad1-short-data") \
Expand Down
7 changes: 7 additions & 0 deletions net/rxrpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,11 @@ config RXKAD

See Documentation/networking/rxrpc.rst.

config RXPERF
tristate "RxRPC test service"
help
Provide an rxperf service tester. This listens on UDP port 7009 for
incoming calls from the rxperf program (an example of which can be
found in OpenAFS).

endif
3 changes: 3 additions & 0 deletions net/rxrpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ rxrpc-y := \
rxrpc-$(CONFIG_PROC_FS) += proc.o
rxrpc-$(CONFIG_RXKAD) += rxkad.o
rxrpc-$(CONFIG_SYSCTL) += sysctl.o


obj-$(CONFIG_RXPERF) += rxperf.o

0 comments on commit ae32660

Please sign in to comment.