mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-27 08:05:27 +08:00
mptcp: add the mib for data checksum
This patch added the mib for the data checksum, MPTCP_MIB_DATACSUMERR. Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4e14867d5e
commit
fe3ab1cbd3
@ -25,6 +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("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),
|
||||
|
@ -18,6 +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_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 */
|
||||
|
@ -900,8 +900,10 @@ static enum mapping_status validate_data_csum(struct sock *ssk, struct sk_buff *
|
||||
header.csum = 0;
|
||||
|
||||
csum = csum_partial(&header, sizeof(header), subflow->map_data_csum);
|
||||
if (unlikely(csum_fold(csum)))
|
||||
if (unlikely(csum_fold(csum))) {
|
||||
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DATACSUMERR);
|
||||
return subflow->mp_join ? MAPPING_INVALID : MAPPING_DUMMY;
|
||||
}
|
||||
|
||||
return MAPPING_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user