Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2094123imu; Thu, 24 Jan 2019 07:08:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN6rTMA5hSZqHoFIn3WLZnfM1cawizWsv/hkNktkOFcZLKsQr2kBEvGjCJSnyjr9ktxDGSk4 X-Received: by 2002:a63:d450:: with SMTP id i16mr6172631pgj.246.1548342515805; Thu, 24 Jan 2019 07:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548342515; cv=none; d=google.com; s=arc-20160816; b=b5wlrR+RPpe1S+viw0ubKgOF+FLLhm4svUZQiHfA2B8sVVGbixMuszcsLTjN3LzZN/ 8To8S3q2Q9jbUkdoClzljSFIB5GAXICSbXruvWqEV/Doj6apz6MK+2Tr9Y1J1HDswoRz oTCjrhMvZar2KiRnpsxrPnO80smp4Bk6Cb/wWA9KTZB9/R6t9wWLPuJlKzYyAu7X+GTX N4iRjVhZNNMSiYuDjOgKiXbTIAUq7uwM9+JNHUNbctnif/1k5KBSSb7ZAig79I8eOuBw SJu5p49dG9EC7Ck2QtTmydOlxITCreN9RnyYpLhIZOnQOM72RKBXtPVNeL3zWqXIF2hp YZUA== 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=AcJB1gr+mXnfREJ+OSNdNt73IMVQX315HUO32gpU9+Y=; b=vj/fUjAmwu+uxgfaOnBLMzOPuj0cHo5M7cv+RA+pYR3MvmAqzXNLuVHsQ96TGKvBjC B47Cbx+BvpqqmlyvBU9pTnMJrcx7O1T/FoWnGc54+37ZdGeCjBJus3EuphI7fjUpvKu4 jQBMzDEr34QsirrYgazXPchMBNSoKperN1WOPnpMyM3OGZknwJ2IjEAJM6DWWcBi3qXl mOvnk5MNXz0ysTgEc6IciR8NkJfcCF6P0M9nSAMOxU8YufXcUaRCsW4yY3w86DwwFw/1 AOua8qTweqP26+Wfal3newYN8ZTdmKjF9MsHkDWAgbfavqxIntjBUGpqWWgsLTESTtjj Ew1g== 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 t12si21964371plr.311.2019.01.24.07.08.19; Thu, 24 Jan 2019 07:08:35 -0800 (PST) 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 S1728637AbfAXPFv (ORCPT + 99 others); Thu, 24 Jan 2019 10:05:51 -0500 Received: from mail.bootlin.com ([62.4.15.54]:40691 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727755AbfAXPFu (ORCPT ); Thu, 24 Jan 2019 10:05:50 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 2076B207B2; Thu, 24 Jan 2019 16:05:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (aaubervilliers-681-1-87-206.w90-88.abo.wanadoo.fr [90.88.29.206]) by mail.bootlin.com (Postfix) with ESMTPSA id C6DB12074E; Thu, 24 Jan 2019 16:05:47 +0100 (CET) Date: Thu, 24 Jan 2019 16:05:48 +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" , "quentin.schulz@bootlin.com" , "allan.nielsen@microchip.com" Subject: Re: [PATCH net-next 06/10] net: introduce a net_device_ops macsec helper Message-ID: <20190124150548.GG3662@kwain> References: <20190123155638.13852-1-antoine.tenart@bootlin.com> <20190123155638.13852-7-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: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Igor, On Thu, Jan 24, 2019 at 02:58:45PM +0000, Igor Russkikh wrote: > > Its great to see macsec hw offload infrastructure happening! > > > @@ -1441,6 +1445,10 @@ struct net_device_ops { > > u32 flags); > > int (*ndo_xsk_async_xmit)(struct net_device *dev, > > u32 queue_id); > > +#ifdef CONFIG_MACSEC > > + int (*ndo_macsec)(struct net_device *dev, > > + struct netdev_macsec *macsec); > > +#endif > > }; > > Most of ndo's are named by action verbs. This ndo is abit misleading, reader > may have difficulties understanding what > > + if (phydev->drv->macsec) > + ret = phydev->drv->macsec(phydev, macsec); > > is actually doing. > > May be it'd be better renaming to at least ndo_do_macsec(), or ndo_setup_macsec() > ? > > Similar comment is for > > +struct netdev_macsec { > > It reads like a macsec device context, but it is a macsec configuration command. OK, I'll rename the functions so that they contain a verb. Thanks! Antoine -- Antoine T?nart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com