Skip to content

Commit

Permalink
RDS/IB: Rename byte_len to data_len to enhance readability
Browse files Browse the repository at this point in the history
Of course len is in bytes. Calling it data_len hopefully indicates
a little better what the variable is actually for.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andy Grover authored and davem330 committed Jul 20, 2009
1 parent 92c330b commit 597ddd5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/rds/ib_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ struct rds_ib_ack_state {
};

static void rds_ib_process_recv(struct rds_connection *conn,
struct rds_ib_recv_work *recv, u32 byte_len,
struct rds_ib_recv_work *recv, u32 data_len,
struct rds_ib_ack_state *state)
{
struct rds_ib_connection *ic = conn->c_transport_data;
Expand All @@ -696,19 +696,19 @@ static void rds_ib_process_recv(struct rds_connection *conn,
/* XXX shut down the connection if port 0,0 are seen? */

rdsdebug("ic %p ibinc %p recv %p byte len %u\n", ic, ibinc, recv,
byte_len);
data_len);

if (byte_len < sizeof(struct rds_header)) {
if (data_len < sizeof(struct rds_header)) {
rds_ib_conn_error(conn, "incoming message "
"from %pI4 didn't inclue a "
"header, disconnecting and "
"reconnecting\n",
&conn->c_faddr);
return;
}
byte_len -= sizeof(struct rds_header);
data_len -= sizeof(struct rds_header);

ihdr = rds_ib_get_header(conn, recv, byte_len);
ihdr = rds_ib_get_header(conn, recv, data_len);

/* Validate the checksum. */
if (!rds_message_verify_checksum(ihdr)) {
Expand All @@ -728,7 +728,7 @@ static void rds_ib_process_recv(struct rds_connection *conn,
if (ihdr->h_credit)
rds_ib_send_add_credits(conn, ihdr->h_credit);

if (ihdr->h_sport == 0 && ihdr->h_dport == 0 && byte_len == 0) {
if (ihdr->h_sport == 0 && ihdr->h_dport == 0 && data_len == 0) {
/* This is an ACK-only packet. The fact that it gets
* special treatment here is that historically, ACKs
* were rather special beasts.
Expand Down

0 comments on commit 597ddd5

Please sign in to comment.