Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1025085ybl; Tue, 13 Aug 2019 06:19:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaa/idWSnik0VZWd8GLn1nFoQvNAMx1InQBN/Ld3Uz105FPh5JOjSqkVDbWo1SLg1la7fw X-Received: by 2002:a17:90a:8591:: with SMTP id m17mr2276573pjn.100.1565702357226; Tue, 13 Aug 2019 06:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565702357; cv=none; d=google.com; s=arc-20160816; b=ExM3ou/lUlsS4mjNDqjbZJZxdCEkkCqRsvqG0+CZutnKKehzZP/9lmg8aaOgLHHLH8 Rq2aSWpVT+ndMRQsJ2E0+J/JDY0J3JDwfUvS5r8nrl3ZnVjrV1Xbh/7kczMpEFn+j2Nm +0fQHW95DT0fga37gA5bqltZuS2LaJb+KC/MBgbjI1NtRN2ckVEjXIUUR/T+F7KHCJYZ tMy/ZVaqaqVLcxj48CztDAYCU/Y53DeESjkKF5VdEFBSxXWt6Gei+3Y80W4Pioy3tcKw jJrw4WMr4aY0za/mI0LpdKhot4XzhH1jd0fyuGLu8W216HIFPwiyn2Yj1oK562iKBIZh AFSA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lDlcKH+jpyMIdatKAOyBrbLs0vonOISA/RCsgldAZeo=; b=iV+rhGIeRcxXb3wzm2D4oTuyzBoKxyx+Df6b83fpjpy0XKzIWNNah3dC4zCWkk0a4a pSRhYhJ+Cg7Ajm0vVWFMFKQ+BKZFLputobFagxdsu38Wjx2m/SQA4+Jwai4OX/lAOo5F Mr50CBVNDlEufi4H9onJZ+havaZ2jWMIMYraqEM6wM6+ufjwUIQ/bFydw9YRkGGyEPXh Ew3sUYizk0bpBjvsmvTat7uxNcuGtMEkRCXJBjLmHIcLI7JiaRpTaG6vU6fLIWGWw9mS 7+83ItY8S3lsNa2sqNWKgjYKMLJjSixDA1oMjLC6340A7qHeyq8ciKcsMs3iFiTtlLoy z1gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=kokfadnC; 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 r3si59094977plb.14.2019.08.13.06.19.00; Tue, 13 Aug 2019 06:19:17 -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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=kokfadnC; 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 S1729004AbfHMNRP (ORCPT + 99 others); Tue, 13 Aug 2019 09:17:15 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56762 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728796AbfHMNRP (ORCPT ); Tue, 13 Aug 2019 09:17:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=lDlcKH+jpyMIdatKAOyBrbLs0vonOISA/RCsgldAZeo=; b=kokfadnCz4inebHrhjOWc3X1mw 75FZkVRIPPpya5H51KrVLEZSNkr2OAA1bWYBxgen/oHhROrMEZg5VZesVQreHFoCaZxFr8ahOWg5a GCPrLUUE2cjokcuhlcN3XpnV+ZwG2LnbLX7XlELoHIev2CwhWUXMbDzPk9UlbqNG4fdE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hxWfi-0001HZ-Ii; Tue, 13 Aug 2019 15:17:06 +0200 Date: Tue, 13 Aug 2019 15:17:06 +0200 From: Andrew Lunn To: Antoine Tenart Cc: Igor Russkikh , "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 , Pavel Belous Subject: Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure Message-ID: <20190813131706.GE15047@lunn.ch> References: <20190808140600.21477-1-antoine.tenart@bootlin.com> <20190808140600.21477-7-antoine.tenart@bootlin.com> <20190813085817.GA3200@kwain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190813085817.GA3200@kwain> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 10:58:17AM +0200, Antoine Tenart wrote: > I think this question is linked to the use of a MACsec virtual interface > when using h/w offloading. The starting point for me was that I wanted > to reuse the data structures and the API exposed to the userspace by the > s/w implementation of MACsec. I then had two choices: keeping the exact > same interface for the user (having a virtual MACsec interface), or > registering the MACsec genl ops onto the real net devices (and making > the s/w implementation a virtual net dev and a provider of the MACsec > "offloading" ops). > > The advantages of the first option were that nearly all the logic of the > s/w implementation could be kept and especially that it would be > transparent for the user to use both implementations of MACsec. Hi Antoine We have always talked about offloading operations to the hardware, accelerating what the linux stack can do by making use of hardware accelerators. The basic user API should not change because of acceleration. Those are the general guidelines. It would however be interesting to get comments from those who did the software implementation and what they think of this architecture. I've no personal experience with MACSec, so it is hard for me to say if the current architecture makes sense when using accelerators. Andrew