From patchwork Fri Mar 13 15:52:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 222548 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A534C2BB1D for ; Fri, 13 Mar 2020 15:53:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11BD520724 for ; Fri, 13 Mar 2020 15:53:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="buIZThWZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgCMPxH (ORCPT ); Fri, 13 Mar 2020 11:53:07 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:49145 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726442AbgCMPxH (ORCPT ); Fri, 13 Mar 2020 11:53:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584114786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=W0jzmLYT0L/lZOS2W/w2Rz1BnhkEFEyf3IXhEdptsio=; b=buIZThWZvjLOKoVkV7OFPtrbsMLHVuXvbLok7CiNmKBPTh+76lsATP4c4aL2c6guY8wU30 aK2OKevo/y6L8z2od1p1e/k2MipKvsDsH77snFbqyYrim8I/JPTXp3ccglgFnItRmhQo/K r03KeY/0kBWpMpVTxPpPwejLvaKmEnU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-276-q08f_LpMPNqOkfzpOZiCkg-1; Fri, 13 Mar 2020 11:53:04 -0400 X-MC-Unique: q08f_LpMPNqOkfzpOZiCkg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 177C4800D6C; Fri, 13 Mar 2020 15:53:03 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-114.ams2.redhat.com [10.36.116.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFA5260FC1; Fri, 13 Mar 2020 15:53:01 +0000 (UTC) From: Paolo Abeni To: netdev@vger.kernel.org Cc: "David S. Miller" , Mat Martineau Subject: [PATCH net-next v2 0/2] mptcp: simplify mptcp_accept() Date: Fri, 13 Mar 2020 16:52:40 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currently we allocate the MPTCP master socket at accept time. The above makes mptcp_accept() quite complex, and requires checks is several places for NULL MPTCP master socket. These series simplify the MPTCP accept implementation, moving the master socket allocation at syn-ack time, so that we drop unneeded checks with the follow-up patch. v1 -> v2: - rebased on top of 2398e3991bda7caa6b112a6f650fbab92f732b91 Paolo Abeni (2): mptcp: create msk early mptcp: drop unneeded checks net/mptcp/options.c | 14 ++------ net/mptcp/protocol.c | 83 ++++++++++++++++++++++++-------------------- net/mptcp/protocol.h | 4 +-- net/mptcp/subflow.c | 50 ++++++++++++++------------ net/mptcp/token.c | 31 ++--------------- 5 files changed, 79 insertions(+), 103 deletions(-)