Message ID | f46dabaf1055b87b5613b126372d9e506c178264.1620282930.git.geliangtang@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Mat Martineau |
Headers | show |
Series | MP_FAIL support | expand |
On Thu, 6 May 2021, Geliang Tang wrote: > When a bad checksum is detected, send out the MP_FAIL suboption. > > Signed-off-by: Geliang Tang <geliangtang@gmail.com> > --- > net/mptcp/subflow.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c > index 659b8842ae3b..efd84ff61015 100644 > --- a/net/mptcp/subflow.c > +++ b/net/mptcp/subflow.c > @@ -906,6 +906,8 @@ 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); > + subflow->send_mp_fail = 1; > + subflow->fail_seq = subflow->map_seq; map_seq is the sequence number of the last good data *received* by this peer, but fail_seq will be used to discard data *sent* by this peer. So I think fail_seq needs to be based on the sequence number for outgoing data on this subflow? I admit the RFC has me confused here. If MP_FAIL is implemented on the multipath-tcp.org kernel it might be helpful to see how it is used there. > return subflow->mp_join ? MAPPING_INVALID : MAPPING_DUMMY; > } > > -- > 2.31.1 > > > -- Mat Martineau Intel
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 659b8842ae3b..efd84ff61015 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -906,6 +906,8 @@ 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); + subflow->send_mp_fail = 1; + subflow->fail_seq = subflow->map_seq; return subflow->mp_join ? MAPPING_INVALID : MAPPING_DUMMY; }
When a bad checksum is detected, send out the MP_FAIL suboption. Signed-off-by: Geliang Tang <geliangtang@gmail.com> --- net/mptcp/subflow.c | 2 ++ 1 file changed, 2 insertions(+)