From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8800181350392430015==" MIME-Version: 1.0 From: Paolo Abeni To: mptcp at lists.01.org Subject: [MPTCP] sock diag uAPI and MPTCP Date: Fri, 19 Jun 2020 12:54:40 +0200 Message-ID: X-Status: X-Keywords: X-UID: 4747 --===============8800181350392430015== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, IPPROTO_MPTCP value (0x106) can't be represented using the current sock diag uAPI, as the 'sdiag_protocol' field is 8 bits wide. To implement diag support for MPTCP socket, we will likely need a 'inet_diag_req_v3' with a wider 'sdiag_protocol' field. inet_diag_handler_cmd() could detect the version of the inet_diag_req_v* provided by user-space checking nlmsg_len() and convert _v2 reqs to _v3. This change will be a bit invasive, as all in kernel diag users will then operate only on 'inet_diag_req_v3' (many functions' signature change required), but the code-related changes will be encapsulated by inet_diag_handler_cmd(). Would the above be acceptable? Thanks for any feedback! Paolo --===============8800181350392430015==-- From mboxrd@z Thu Jan 1 00:00:00 1970 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 A6A97C433E0 for ; Fri, 19 Jun 2020 10:54:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80EE1208B8 for ; Fri, 19 Jun 2020 10:54:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DjfRj6FP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732535AbgFSKyt (ORCPT ); Fri, 19 Jun 2020 06:54:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40434 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732362AbgFSKys (ORCPT ); Fri, 19 Jun 2020 06:54:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592564087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6uVmM+RPaY2/k2K9krznbGg7AKPApCZ6PBYMbCZhb3o=; b=DjfRj6FPGkRCiSGxuezzvWKKhyAS4Ys9ZbvydnKtJo1DdDNCFcZ5s9IRnQAzxiKb5XMrZH Oa4TvgsVaZ9+aMEx6kEJecnUa0nE+rADiY2k4+TxZZE8WPjE12KCZdgCOPY/TSDW3VdDFE ovHWQrHNVRM5uCTK8qj5moBKEcxyVE8= 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-292-iLyGEEd3OqOhXGZv4WmHyA-1; Fri, 19 Jun 2020 06:54:44 -0400 X-MC-Unique: iLyGEEd3OqOhXGZv4WmHyA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E954A1800D42; Fri, 19 Jun 2020 10:54:42 +0000 (UTC) Received: from ovpn-115-30.ams2.redhat.com (ovpn-115-30.ams2.redhat.com [10.36.115.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3CA871661; Fri, 19 Jun 2020 10:54:41 +0000 (UTC) Message-ID: Subject: sock diag uAPI and MPTCP From: Paolo Abeni To: Eric Dumazet , David Miller Cc: netdev@vger.kernel.org, mptcp@lists.01.org Date: Fri, 19 Jun 2020 12:54:40 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3 (3.36.3-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, IPPROTO_MPTCP value (0x106) can't be represented using the current sock diag uAPI, as the 'sdiag_protocol' field is 8 bits wide. To implement diag support for MPTCP socket, we will likely need a 'inet_diag_req_v3' with a wider 'sdiag_protocol' field. inet_diag_handler_cmd() could detect the version of the inet_diag_req_v* provided by user-space checking nlmsg_len() and convert _v2 reqs to _v3. This change will be a bit invasive, as all in kernel diag users will then operate only on 'inet_diag_req_v3' (many functions' signature change required), but the code-related changes will be encapsulated by inet_diag_handler_cmd(). Would the above be acceptable? Thanks for any feedback! Paolo