Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3501538ybl; Mon, 12 Aug 2019 01:20:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMdq6+TT/lpZbVsXNW746Ycwv1qazxiGtl0+x/GYS5LqQdYv7FKRCsVEfe8ZQ33HzxgxXs X-Received: by 2002:a17:90a:2ec1:: with SMTP id h1mr22530072pjs.101.1565598011701; Mon, 12 Aug 2019 01:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565598011; cv=none; d=google.com; s=arc-20160816; b=T7/MwTYjz1I/6wHjMt2lbpSypu2KFJ2E3WzIP2K6jBQS1Yk/9s+GHaKlJdkpq69pXd m+yI2HieuyBIQJ6Mzd5JR02WYF6DVT67JVMBnLALGyO69We2TfUZS0fviUpV3XTrUsXX Bum3a/wwlF1jtSf63UOJYRir/C+TSy2w93YSLZmZgVS9fCsbFiKhEYLYLmpAUYE6ILjj 7GFaOLk03SkkpZwlYcjJM3PHVkmEJN7BcGO0MIKkpnvQbVRHSHINMQERgfDF8Q6WaFmD MhSxtojB4/6/ru5qczNtff3vVnuyDDNttxbmwlS4qQ2hnkUVSZOeS+BuXafjGDcfmf0I KYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=SjZFRZzcVdclJyhHz7M+El9tYcnBUriIB9PU6/Z92ag=; b=UWNKgzzt/dGuVcDKOXnztrAocLfPLXTelRaKfVqO0AkMrsi30ZxHy1dLXM7HSuBKbp oypEApSXd9URgILGhCS4B6WyIBiHR0ziYXz7vQYWeA8eFrJjEWCdxsmFG+X7SQGhPiWg TbIhxoMkru5u7Y40t7Uc0mPz8V9DTGx1EHIqJum514cMlHuiNAmvK56H9NHiWWPuV1B/ kGn0j4bNQnu0yQkNag0wgtU+9Ey7wW6aeu85GGWnFG6H+rlfuV3IWLkzUqQ2fj/kuM09 NQa0oMglfw7dCyZN3yQwsP/u9DvxA2Ca/9jZ8QLHOSi1JxEO3QlCdSZ/iM4U8m0o88jR YwGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n124si57922754pga.214.2019.08.12.01.19.56; Mon, 12 Aug 2019 01:20:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbfHLISn (ORCPT + 99 others); Mon, 12 Aug 2019 04:18:43 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:41327 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfHLISn (ORCPT ); Mon, 12 Aug 2019 04:18:43 -0400 X-Originating-IP: 86.250.200.211 Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: antoine.tenart@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 9C64520010; Mon, 12 Aug 2019 08:18:39 +0000 (UTC) Date: Mon, 12 Aug 2019 10:18:39 +0200 From: Antoine Tenart To: Jakub Kicinski Cc: Antoine Tenart , davem@davemloft.net, sd@queasysnail.net, andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com, allan.nielsen@microchip.com, camelia.groza@nxp.com, Simon.Edelhaus@aquantia.com Subject: Re: [PATCH net-next v2 4/9] net: introduce MACsec ops and add a reference in net_device Message-ID: <20190812081839.GF3698@kwain> References: <20190808140600.21477-1-antoine.tenart@bootlin.com> <20190808140600.21477-5-antoine.tenart@bootlin.com> <20190809133509.12dbead1@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190809133509.12dbead1@cakuba.netronome.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jakub, On Fri, Aug 09, 2019 at 01:35:09PM -0700, Jakub Kicinski wrote: > On Thu, 8 Aug 2019 16:05:55 +0200, Antoine Tenart wrote: > > > > +#if defined(CONFIG_MACSEC) > > +struct macsec_ops { > > I think it'd be cleaner to have macsec_ops declared in macsec.h > and forward declare macsec_ops rather than macsec_context. That makes sense, I'll move this declaration in macsec.h > > + /* Device wide */ > > + int (*mdo_dev_open)(struct macsec_context *ctx); > > + int (*mdo_dev_stop)(struct macsec_context *ctx); > > + /* SecY */ > > + int (*mdo_add_secy)(struct macsec_context *ctx); > > + int (*mdo_upd_secy)(struct macsec_context *ctx); > > + int (*mdo_del_secy)(struct macsec_context *ctx); > > + /* Security channels */ > > + int (*mdo_add_rxsc)(struct macsec_context *ctx); > > + int (*mdo_upd_rxsc)(struct macsec_context *ctx); > > + int (*mdo_del_rxsc)(struct macsec_context *ctx); > > + /* Security associations */ > > + int (*mdo_add_rxsa)(struct macsec_context *ctx); > > + int (*mdo_upd_rxsa)(struct macsec_context *ctx); > > + int (*mdo_del_rxsa)(struct macsec_context *ctx); > > + int (*mdo_add_txsa)(struct macsec_context *ctx); > > + int (*mdo_upd_txsa)(struct macsec_context *ctx); > > + int (*mdo_del_txsa)(struct macsec_context *ctx); > > +}; > > +#endif Thanks! Antoine -- Antoine T?nart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com