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 X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5826C32750 for ; Tue, 13 Aug 2019 13:17:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B76720840 for ; Tue, 13 Aug 2019 13:17:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="kokfadnC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728995AbfHMNRP (ORCPT ); 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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