From c43933279141c86f6029f14ca4aee06fe3addcf7 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Sat, 8 Dec 2018 17:16:43 -0600 Subject: [PATCH] rx: Remove unneeded rxi_ReceiveDataPacket params rxi_SplitJumboPacket doesn't use its 'host', 'port', or 'first' arguments, and rxi_ReceiveDataPacket only uses its 'host' and 'port' arguments to pass to rxi_SplitJumboPacket. Remove these unused parameters from both functions. While we're changing rxi_SplitJumboPacket anyway, move the declaration for rxi_SplitJumboPacket to rx_internal.h, so it's no longer in a public header. This commit should have no visible impact; it is just code reorganization. Change-Id: I16a7f613957d8cd2d415f65fa083e11d8a13edc8 Reviewed-on: https://gerrit.openafs.org/13602 Tested-by: BuildBot Reviewed-by: Cheyenne Wills Reviewed-by: Benjamin Kaduk --- src/rx/rx.c | 11 ++++------- src/rx/rx_internal.h | 1 + src/rx/rx_packet.c | 3 +-- src/rx/rx_prototypes.h | 3 --- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index 2296014..417e919 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -131,8 +131,7 @@ static struct rx_connection static struct rx_packet *rxi_ReceiveDataPacket(struct rx_call *call, struct rx_packet *np, int istack, osi_socket socket, - afs_uint32 host, u_short port, int *tnop, - struct rx_call **newcallp); + int *tnop, struct rx_call **newcallp); static struct rx_packet *rxi_ReceiveAckPacket(struct rx_call *call, struct rx_packet *np, int istack, int *a_invalid); @@ -3613,8 +3612,7 @@ rxi_ReceivePacket(struct rx_packet *np, osi_socket socket, if (type == RX_CLIENT_CONNECTION && !opr_queue_IsEmpty(&call->tq)) rxi_AckAllInTransmitQueue(call); - np = rxi_ReceiveDataPacket(call, np, 1, socket, host, port, tnop, - newcallp); + np = rxi_ReceiveDataPacket(call, np, 1, socket, tnop, newcallp); break; case RX_PACKET_TYPE_ACK: /* Respond immediately to ack packets requesting acknowledgement @@ -3896,8 +3894,7 @@ TryAttach(struct rx_call *acall, osi_socket socket, static struct rx_packet * rxi_ReceiveDataPacket(struct rx_call *call, struct rx_packet *np, int istack, - osi_socket socket, afs_uint32 host, u_short port, - int *tnop, struct rx_call **newcallp) + osi_socket socket, int *tnop, struct rx_call **newcallp) { int ackNeeded = 0; /* 0 means no, otherwise ack_reason */ int newPackets = 0; @@ -3956,7 +3953,7 @@ rxi_ReceiveDataPacket(struct rx_call *call, /* The RX_JUMBO_PACKET is set in all but the last packet in each * AFS 3.5 jumbogram. */ if (flags & RX_JUMBO_PACKET) { - tnp = rxi_SplitJumboPacket(np, host, port, isFirst); + tnp = rxi_SplitJumboPacket(np); } else { tnp = NULL; } diff --git a/src/rx/rx_internal.h b/src/rx/rx_internal.h index b420a23..afef972 100644 --- a/src/rx/rx_internal.h +++ b/src/rx/rx_internal.h @@ -75,3 +75,4 @@ extern int rxi_SendIovecs(struct rx_connection *conn, struct iovec *iov, int iovcnt, size_t length, int istack); extern void rxi_SendRaw(struct rx_call *call, struct rx_connection *conn, int type, char *data, int bytes, int istack); +extern struct rx_packet *rxi_SplitJumboPacket(struct rx_packet *p); diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index 6cf997b..a8ea7bc 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -1544,8 +1544,7 @@ rxi_ReadPacket(osi_socket socket, struct rx_packet *p, afs_uint32 * host, * last two pad bytes. */ struct rx_packet * -rxi_SplitJumboPacket(struct rx_packet *p, afs_uint32 host, short port, - int first) +rxi_SplitJumboPacket(struct rx_packet *p) { struct rx_packet *np; struct rx_jumboHeader *jp; diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 4e5c0d0..e1c0a04 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -402,9 +402,6 @@ extern struct rx_packet *rxi_AllocSendPacket(struct rx_call *call, int want); extern int rxi_ReadPacket(osi_socket socket, struct rx_packet *p, afs_uint32 * host, u_short * port); -extern struct rx_packet *rxi_SplitJumboPacket(struct rx_packet *p, - afs_uint32 host, short port, - int first); #ifndef KERNEL extern int osi_NetSend(osi_socket socket, void *addr, struct iovec *dvec, int nvecs, int length, int istack); -- 1.9.4