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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 25DC4C33CA2 for ; Thu, 9 Jan 2020 13:21:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F033D206ED for ; Thu, 9 Jan 2020 13:21:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729693AbgAINVc (ORCPT ); Thu, 9 Jan 2020 08:21:32 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:58571 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbgAINVc (ORCPT ); Thu, 9 Jan 2020 08:21:32 -0500 X-Originating-IP: 90.76.143.236 Received: from localhost (lfbn-tou-1-1075-236.w90-76.abo.wanadoo.fr [90.76.143.236]) (Authenticated sender: antoine.tenart@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 5C8EE40004; Thu, 9 Jan 2020 13:21:27 +0000 (UTC) Date: Thu, 9 Jan 2020 14:21:26 +0100 From: Antoine Tenart To: Igor Russkikh 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" , "jakub.kicinski@netronome.com" , Dmitry Bogdanov , Mark Starovoytov Subject: Re: [EXT] [PATCH net-next v4 15/15] net: macsec: add support for offloading to the MAC Message-ID: <20200109132126.GD5472@kwain> References: <20191219105515.78400-1-antoine.tenart@bootlin.com> <20191219105515.78400-16-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Igor, On Mon, Dec 23, 2019 at 11:36:48AM +0000, Igor Russkikh wrote: > > > diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h > > index 024af2d1d0af..771371d5b996 100644 > > --- a/include/uapi/linux/if_link.h > > +++ b/include/uapi/linux/if_link.h > > @@ -489,6 +489,7 @@ enum macsec_validation_type { > > enum macsec_offload { > > MACSEC_OFFLOAD_OFF = 0, > > MACSEC_OFFLOAD_PHY = 1, > > + MACSEC_OFFLOAD_MAC = 2, > > __MACSEC_OFFLOAD_END, > > MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1, > > So from uapi perspective user have to explicitly specify "offload mac" > or "offload phy"? And from non experienced user perspective he always > have to try these two before rolling back to "offload none" ? > > I'm not saying this is wrong, just trying to understand if there any > more streamlined way to do this.. That is the idea, the commands will be: # ip macsec offload macsec0 off # ip macsec offload macsec0 phy # ip macsec offload macsec0 mac We should be able to report what's supported for a given interface, for a more user friendly experience though. (We could include the information in `ip macsec show` for example). Would that improve things? Thanks! Antoine -- Antoine Ténart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com