Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1111490rdg; Fri, 13 Oct 2023 10:28:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjBzx4bKktpjr4xWARioYG/iFE7CLIpa8Zy93WE6mFGXlrWfqKh5zAU1zVtbB2aDLzB6je X-Received: by 2002:a05:6a00:2450:b0:693:4108:1eb7 with SMTP id d16-20020a056a00245000b0069341081eb7mr27426621pfj.30.1697218123231; Fri, 13 Oct 2023 10:28:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697218123; cv=none; d=google.com; s=arc-20160816; b=craSZqhnfCR52+bQct2CYoaOqRkh0eXUg26AtDKaeeeF9nCFXZWHalyK428k6MjSnE W9I+E89lZTZ9UFdedH2LvlasVWsGFi7wXpGGMk/utkCv8UUeVdk0aYTdp5dXYTYPFk+V EifiINgvpiY7Pae/7E2kdYwM2a3L2WNlRt9/BGMK3Ma4MIWFwlCYxuP25dcFQQ6hasQz LEFPlb2es31b+69ptTlzKpNKKxAUiWmFHjuAVoUyxLzpYHRH/sQGTTFa3ULDmc/o9hES +eZOOM7yYikX1gdokbybvHUESoPscm1uEtayiOYY3CtlJ8tXveO9QUdrYLEHffSihabU u4VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0d/pWehWv+Hdv/4vCdzlbAX2+Cko422vtQSu1l2iDTg=; fh=eU9hcR8RRhdf8wKfPb7Nqz+G+W8i4MsM4/mVTkkOk4k=; b=kbc69SXdk5OT/58/Y8qAzezDIUMK+JCyohRve7iwWcpUmNv9vlKJR+UEBuJVE7oUMI qopx5gq0yoZclXhA3CelFIGiFe4/SZJ8Es0XY4ncLG8wMy8sl0nv2nbm1kRZPSmmPitl 8ZVL5gOYPxvD38rxLWTEiFsXk5aPGXg1ImeJjaNpls4rZvFyIBj5kWxhciuSLIqwI+UB 5cQWamodI/ycD0C99Y6tY8Oem/rNtApGvzTQKbSA5nr6AxaVnlyf7AcmC0l1PiHd/YOF Ca6LoZ11rSv7Zu17tMsjqTtNEmH8erUj/pc8o5DMk1eKRrmiYjJCaCY4Sr0GNPZPjj5T H4QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rFuQYjJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id f10-20020a056a00228a00b006933b29f560si1307589pfe.46.2023.10.13.10.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 10:28:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rFuQYjJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 7985F83D10E8; Fri, 13 Oct 2023 10:28:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230458AbjJMR2d (ORCPT + 99 others); Fri, 13 Oct 2023 13:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230133AbjJMR2b (ORCPT ); Fri, 13 Oct 2023 13:28:31 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC3FBA9 for ; Fri, 13 Oct 2023 10:28:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C085C433C9; Fri, 13 Oct 2023 17:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697218109; bh=a34qxta5xmju0t0eTmUvQCez4rNhvxoftWs6RmB0Oow=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rFuQYjJiAuaa2RNowqH1PqNcVggRje2Dzp/JfuvYdnavOnrGv27hwTFH6qH1uucF4 VcLp0nUV664Mo6lDlL9YrWakBRtJ47+96t4jLmw2B3pFBN7fhAo/oMQGRga6XkimfI R7It5TMS3D74Ive/T10KWst3+CN0VpjRjaOzPodBkG6ry5zkDUtplBpncwnfj6ReOO Gbdk9ROhVJ+LLgMUIuR9vYYEXaX/K7c8VdIHd/7VpBKdlLY2T3QtvbIPFkO6S8ehTJ RGiaVQFef7eiSSYZlYhOCJ+nn9i4QfZLYBBjPicAhEFGqHr4SCfZgETkpatcMQzqFl 5I9YkIWEJAzGQ== Date: Fri, 13 Oct 2023 19:28:23 +0200 From: Simon Horman To: Matthieu Baerts Cc: mptcp@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Mat Martineau , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Davide Caratti Subject: Re: [PATCH net-next 4/6] uapi: mptcp: use header file generated from YAML spec Message-ID: <20231013172823.GR29570@kernel.org> References: <20231010-upstream-net-next-20231006-mptcp-ynl-v1-0-18dd117e8f50@kernel.org> <20231010-upstream-net-next-20231006-mptcp-ynl-v1-4-18dd117e8f50@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010-upstream-net-next-20231006-mptcp-ynl-v1-4-18dd117e8f50@kernel.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 13 Oct 2023 10:28:40 -0700 (PDT) On Tue, Oct 10, 2023 at 09:21:45PM +0200, Matthieu Baerts wrote: > From: Davide Caratti > > generated with: > > $ ./tools/net/ynl/ynl-gen-c.py --mode uapi \ > > --spec Documentation/netlink/specs/mptcp.yaml \ > > --header -o include/uapi/linux/mptcp_pm.h > > Link: https://github.com/multipath-tcp/mptcp_net-next/issues/340 > Acked-by: Paolo Abeni > Signed-off-by: Davide Caratti > Signed-off-by: Matthieu Baerts ... > diff --git a/include/uapi/linux/mptcp_pm.h b/include/uapi/linux/mptcp_pm.h > new file mode 100644 > index 000000000000..0c7206531eb1 > --- /dev/null > +++ b/include/uapi/linux/mptcp_pm.h > @@ -0,0 +1,149 @@ > +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ > +/* Do not edit directly, auto-generated from: */ > +/* Documentation/netlink/specs/mptcp.yaml */ > +/* YNL-GEN uapi header */ > + > +#ifndef _UAPI_LINUX_MPTCP_PM_H > +#define _UAPI_LINUX_MPTCP_PM_H > + > +#define MPTCP_PM_NAME "mptcp_pm" > +#define MPTCP_PM_VER 1 > + > +/** > + * enum mptcp_event_type Hi Davide and Matthieu, I understand that is autogenerated. But it is missing an entry here for @MPTCP_EVENT_UNSPEC. Can that be addressed somehow? > + * @MPTCP_EVENT_CREATED: token, family, saddr4 | saddr6, daddr4 | daddr6, > + * sport, dport A new MPTCP connection has been created. It is the good time > + * to allocate memory and send ADD_ADDR if needed. Depending on the > + * traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED > + * is sent. > + * @MPTCP_EVENT_ESTABLISHED: token, family, saddr4 | saddr6, daddr4 | daddr6, > + * sport, dport A MPTCP connection is established (can start new subflows). > + * @MPTCP_EVENT_CLOSED: token A MPTCP connection has stopped. > + * @MPTCP_EVENT_ANNOUNCED: token, rem_id, family, daddr4 | daddr6 [, dport] A > + * new address has been announced by the peer. > + * @MPTCP_EVENT_REMOVED: token, rem_id An address has been lost by the peer. > + * @MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id, saddr4 | > + * saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error] A new > + * subflow has been established. 'error' should not be set. > + * @MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6, > + * daddr4 | daddr6, sport, dport, backup, if_idx [, error] A subflow has been > + * closed. An error (copy of sk_err) could be set if an error has been > + * detected for this subflow. > + * @MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6, > + * daddr4 | daddr6, sport, dport, backup, if_idx [, error] The priority of a > + * subflow has changed. 'error' should not be set. > + * @MPTCP_EVENT_LISTENER_CREATED: family, sport, saddr4 | saddr6 A new PM > + * listener is created. > + * @MPTCP_EVENT_LISTENER_CLOSED: family, sport, saddr4 | saddr6 A PM listener > + * is closed. > + */ > +enum mptcp_event_type { > + MPTCP_EVENT_UNSPEC, > + MPTCP_EVENT_CREATED, > + MPTCP_EVENT_ESTABLISHED, > + MPTCP_EVENT_CLOSED, > + MPTCP_EVENT_ANNOUNCED = 6, > + MPTCP_EVENT_REMOVED, > + MPTCP_EVENT_SUB_ESTABLISHED = 10, > + MPTCP_EVENT_SUB_CLOSED, > + MPTCP_EVENT_SUB_PRIORITY = 13, > + MPTCP_EVENT_LISTENER_CREATED = 15, > + MPTCP_EVENT_LISTENER_CLOSED, > +}; ...