Skip to content

Commit

Permalink
Squash to "mptcp: add the mib for data checksum"
Browse files Browse the repository at this point in the history
Rename DSSCSUM to DATACSUM.

Please update the commit log too:

'''
This patch added the mib for the data checksum, MPTCP_MIB_DATACSUMERR.
'''

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
geliangtang authored and matttbe committed May 6, 2021
1 parent 113402c commit 29f9232
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/mptcp/mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
SNMP_MIB_ITEM("MPJoinAckHMacFailure", MPTCP_MIB_JOINACKMAC),
SNMP_MIB_ITEM("DSSNotMatching", MPTCP_MIB_DSSNOMATCH),
SNMP_MIB_ITEM("InfiniteMapRx", MPTCP_MIB_INFINITEMAPRX),
SNMP_MIB_ITEM("DSSCsumErr", MPTCP_MIB_DSSCSUMERR),
SNMP_MIB_ITEM("DataCsumErr", MPTCP_MIB_DATACSUMERR),
SNMP_MIB_ITEM("OFOQueueTail", MPTCP_MIB_OFOQUEUETAIL),
SNMP_MIB_ITEM("OFOQueue", MPTCP_MIB_OFOQUEUE),
SNMP_MIB_ITEM("OFOMerge", MPTCP_MIB_OFOMERGE),
Expand Down
2 changes: 1 addition & 1 deletion net/mptcp/mib.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum linux_mptcp_mib_field {
MPTCP_MIB_JOINACKMAC, /* HMAC was wrong on ACK + MP_JOIN */
MPTCP_MIB_DSSNOMATCH, /* Received a new mapping that did not match the previous one */
MPTCP_MIB_INFINITEMAPRX, /* Received an infinite mapping */
MPTCP_MIB_DSSCSUMERR, /* The DSS checksum fail */
MPTCP_MIB_DATACSUMERR, /* The data checksum fail */
MPTCP_MIB_OFOQUEUETAIL, /* Segments inserted into OoO queue tail */
MPTCP_MIB_OFOQUEUE, /* Segments inserted into OoO queue */
MPTCP_MIB_OFOMERGE, /* Segments merged in OoO queue */
Expand Down
2 changes: 1 addition & 1 deletion net/mptcp/subflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff *

csum = csum_partial(&header, sizeof(header), subflow->map_data_csum);
if (unlikely(csum_fold(csum))) {
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DSSCSUMERR);
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DATACSUMERR);
return subflow->mp_join ? MAPPING_INVALID : MAPPING_DUMMY;
}

Expand Down

0 comments on commit 29f9232

Please sign in to comment.