Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3498819ybl; Mon, 12 Aug 2019 01:16:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQhgrEdgbHIdsQDrIj1ZTAUyPF1CJejChrBKCVC9tR108aYQXT9No6fm39nF7R1+P7O/tk X-Received: by 2002:a17:90a:d14a:: with SMTP id t10mr22484955pjw.85.1565597796001; Mon, 12 Aug 2019 01:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565597795; cv=none; d=google.com; s=arc-20160816; b=MjZAWcnMvbKSlX1yeCKYQHsAbknt/JHIx3mWEvxJsl4nO1gF1PUhR6CUamBv/Z9eSg c2jSl3xtCC5bcfS9ShtYdv75mJzVXiejTSSInDEAGHN89k0KCgACP+N3H/x+ACD3UBmD riMoS/fPbLkbNBuQJplxI0vuWnDR3tX9Pg+WriPod847vnG8++XeL9QVJPuJFfGAW3+X 0CDjQT7axn1Aaesa1ciUA6KPabsdS5Dr9HOmJUXlCr1/Ibkabmjzau/eDwpMAqIQrLey Of7lmpYHwe4KfbNsDpfQVu51uDjdvMB7fqSBkzimOJIEgr5bfRIZv+eLeoPWfPZikpkA EpJA== 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=nadgUOAsVUW54Plr8ivumemOI9TipNKUpe1mb2rrzgM=; b=E7Sj5cUKgUaUE/KNBqR1JMdt2NA8zrFwqX2m/IXpSEkqGlGpr4PH/bAYAqi4lJvuXC s12iZCGXH19e3L50GOn2qok+ag1Dc/i0WB8fWijnbtfD3P9jCuVZNa8GdAfxbUkzAoPY Gp8oeToAnejIqRK3uLjeSPTyyPz1kLlRdaTL+PJzuN4mF7nkLaixgOnC+X5I+pRAKL5C V+LLDxVY2FHiIJ09QQRtAFOhAu4oQVEsTEBxuLcnePLL66+SmPf1o6oau03WxRsSwyrq ACti7T7K8hF6Mq2cgZ+/+aoLYtYlDPj+hJB72AIX3eS+y0wEVEInnGE1umryYeZI6ZHd CLMA== 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 f98si40273220plb.256.2019.08.12.01.16.20; Mon, 12 Aug 2019 01:16:35 -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 S1727144AbfHLIPH (ORCPT + 99 others); Mon, 12 Aug 2019 04:15:07 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:38985 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbfHLIPH (ORCPT ); Mon, 12 Aug 2019 04:15:07 -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 relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 740C8C0010; Mon, 12 Aug 2019 08:15:02 +0000 (UTC) Date: Mon, 12 Aug 2019 10:15:01 +0200 From: Antoine Tenart To: Andrew Lunn Cc: Antoine Tenart , davem@davemloft.net, sd@queasysnail.net, 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 6/9] net: macsec: hardware offloading infrastructure Message-ID: <20190812081501.GD3698@kwain> References: <20190808140600.21477-1-antoine.tenart@bootlin.com> <20190808140600.21477-7-antoine.tenart@bootlin.com> <20190810163423.GA30120@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190810163423.GA30120@lunn.ch> 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 Andrew, On Sat, Aug 10, 2019 at 06:34:23PM +0200, Andrew Lunn wrote: > On Thu, Aug 08, 2019 at 04:05:57PM +0200, Antoine Tenart wrote: > > This patch introduces the MACsec hardware offloading infrastructure. > > > > The main idea here is to re-use the logic and data structures of the > > software MACsec implementation. This allows not to duplicate definitions > > and structure storing the same kind of information. It also allows to > > use a unified genlink interface for both MACsec implementations (so that > > the same userspace tool, `ip macsec`, is used with the same arguments). > > The MACsec offloading support cannot be disabled if an interface > > supports it at the moment. > > > > The MACsec configuration is passed to device drivers supporting it > > through macsec_hw_offload() which is called from the MACsec genl > > helpers. This function calls the macsec ops of PHY and Ethernet > > drivers in two steps > > It is great that you are thinking how a MAC driver would make use of > this. But on the flip side, we don't usual add an API unless there is > a user. And as far as i see, you only add a PHY level implementation, > not a MAC level. That's right, and the only modification here is a simple patch adding the MACsec ops within struct net_device. I can remove it as we do not have providers as of now and it can be added easily later on. Thanks, Antoine -- Antoine T?nart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com