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 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6BDEC001DF for ; Fri, 21 Jul 2023 15:21:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 964F0613AC; Fri, 21 Jul 2023 15:21:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 964F0613AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1689952885; bh=L/o001khvGXp3Laiq0M/CKGUTsJaNfrZU92queRMM90=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=mkeuUPzpUUfFtGr4RYizwkodeFanFN8RV9KeOjd0Jr89qXPpHL7XO0nVcyreeicPG BeK57EmGdMT31uce9AItSaFPhN+oKF5myYxURPwFmUDCA6xCYPr7NYSUKLODO0pwbH Q6wiN5EL2kKw2G1f2G2J8YKpqHD2ul8LWvO/9254Byz/PKvnU7UdPsOOL/nua7JfKO 0hYHhMSejS4urbEcicHRI2wAAIfkc/KAdgYF6wH4YY4T4JYsjrbrOz3IWirYS/1oPe oPuHrTO2S4NiynuY29A8EZnPfr2j28aJrdpBzEWMzOLMJwox7dfoLFQMadbEn1hJSM rjv8FLQ0j4ZTg== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oI0q8_i4NmHE; Fri, 21 Jul 2023 15:21:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 9FF5A61388; Fri, 21 Jul 2023 15:21:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9FF5A61388 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 9347B1BF287 for ; Fri, 21 Jul 2023 15:01:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6AC08417AB for ; Fri, 21 Jul 2023 15:01:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6AC08417AB X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rQRiNt_GN2Xb for ; Fri, 21 Jul 2023 15:01:22 +0000 (UTC) X-Greylist: delayed 431 seconds by postgrey-1.37 at util1.osuosl.org; Fri, 21 Jul 2023 15:01:22 UTC DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 59E4A41790 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by smtp2.osuosl.org (Postfix) with ESMTPS id 59E4A41790 for ; Fri, 21 Jul 2023 15:01:22 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6600,9927,10778"; a="357029363" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="357029363" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 07:54:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10778"; a="728139227" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="728139227" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP; 21 Jul 2023 07:54:07 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qMrW9-009CRT-1A; Fri, 21 Jul 2023 17:54:05 +0300 Date: Fri, 21 Jul 2023 17:54:05 +0300 From: Andy Shevchenko To: Marcin Szycik Message-ID: References: <20230721071532.613888-1-marcin.szycik@linux.intel.com> <20230721071532.613888-4-marcin.szycik@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230721071532.613888-4-marcin.szycik@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Mailman-Approved-At: Fri, 21 Jul 2023 15:21:09 +0000 Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3 3/6] pfcp: add PFCP module X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jiri@resnulli.us, netdev@vger.kernel.org, idosch@nvidia.com, jesse.brandeburg@intel.com, intel-wired-lan@lists.osuosl.org, kuba@kernel.org, simon.horman@corigine.com, pabeni@redhat.com, davem@davemloft.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Fri, Jul 21, 2023 at 09:15:29AM +0200, Marcin Szycik wrote: > From: Wojciech Drewek > > Packet Forwarding Control Protocol (PFCP) is a 3GPP Protocol > used between the control plane and the user plane function. > It is specified in TS 29.244[1]. > > Note that this module is not designed to support this Protocol > in the kernel space. There is no support for parsing any PFCP messages. > There is no API that could be used by any userspace daemon. > Basically it does not support PFCP. This protocol is sophisticated > and there is no need for implementing it in the kernel. The purpose > of this module is to allow users to setup software and hardware offload > of PFCP packets using tc tool. > > When user requests to create a PFCP device, a new socket is created. > The socket is set up with port number 8805 which is specific for > PFCP [29.244 4.2.2]. This allow to receive PFCP request messages, > response messages use other ports. > > Note that only one PFCP netdev can be created. > > Only IPv4 is supported at this time. > > [1] https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3111 > Signed-off-by: Wojciech Drewek Co-developed-by: Marcin...? > Signed-off-by: Marcin Szycik ... > +/* PFCP according to 3GPP TS 29.244 > + * > + * Copyright (C) 2022, Intel Corporation. > + * (C) 2022 by Wojciech Drewek Is it approved by our Legal? First time I see such (c) together with Intel's and correct authorship. > + * Author: Wojciech Drewek > + */ ... > +struct pfcp_dev { > + struct list_head list; This is defined in types.h which is missing. > + struct socket *sock; > + struct net_device *dev; > + struct net *net; > +}; ... > + dev->needs_free_netdev = true; Single space is enough. ... > +static int pfcp_newlink(struct net *net, struct net_device *dev, > + struct nlattr *tb[], struct nlattr *data[], > + struct netlink_ext_ack *extack) > +{ > + struct pfcp_dev *pfcp = netdev_priv(dev); > + struct pfcp_net *pn; > + int err; > + > + pfcp->net = net; > + > + err = pfcp_add_sock(pfcp); > + if (err) { > + netdev_dbg(dev, "failed to add pfcp socket %d\n", err); > + goto exit; > + } > + > + err = register_netdevice(dev); > + if (err) { > + netdev_dbg(dev, "failed to register pfcp netdev %d\n", err); > + goto exit_reg_netdev; > + } > + > + pn = net_generic(dev_net(dev), pfcp_net_id); > + list_add_rcu(&pfcp->list, &pn->pfcp_dev_list); > + > + netdev_dbg(dev, "registered new PFCP interface\n"); > + > + return 0; > + > +exit_reg_netdev: The label naming should tell what _will_ happen if goto $LABEL. Something like exit_del_pfcp_sock: Ditto for all labels in your code. > + pfcp_del_sock(pfcp); > +exit: Shouldn't here be ->net = NULL; ? > + return err; > +} ... > +#ifndef _PFCP_H_ > +#define _PFCP_H_ Missing headers: For net_device internals, bool type, and strcpm() call. > +#define PFCP_PORT 8805 > + > +static inline bool netif_is_pfcp(const struct net_device *dev) > +{ > + return dev->rtnl_link_ops && > + !strcmp(dev->rtnl_link_ops->kind, "pfcp"); > +} > + > +#endif -- With Best Regards, Andy Shevchenko _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan