Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp923685imu; Wed, 23 Jan 2019 08:00:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN7gOLLnuob79kNcscjowtRgbTR0WEnwa+XtgwttFpFZ4ZYGOSEjq2dsN9KkSzI+G4k6dGI9 X-Received: by 2002:a63:6c48:: with SMTP id h69mr2338020pgc.139.1548259250516; Wed, 23 Jan 2019 08:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548259250; cv=none; d=google.com; s=arc-20160816; b=kDu+41jjsi6HaK8UiXgVJbQrM8LnO8W0BOSbMlwjIsXiO5qjbBD59JWuL0l1MjAvDS 0jXLPtlie1zwwRjOj+EEWX7TbKgRm8hNeYnZhv744MEqoAcoOM/JVzgx3DTwfgbNZpvw mi9i32QVhmjKnXce2uSQdcT2fxyUq06J9YygNN+OrnMlpm5aofYHjE/+mtiJg4vFSxiD 1cQejW+ABUyF6MgXEVQuNAKOTMpp//mnmqufW4vgz7sO+cKLaGbgpqYNoGTYftDmgYR/ jdvPWlnwuotch2ECRPyYWcRApnTw/CiRGikRikafoBahjtorRMy1RjENKKm0jYN14y/7 x4dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Y8Em1RDKdFJl6KMlZTOULKAG0iqJktxG/rPp8atCo9Y=; b=Ix6OjC2i4jj6mr6m5g96wniU9KCZDuwQ8wsdw39FMPd3NSAB0Z4xca5sy4fyxBsSpn LckDT6T3Lf7mVD2Nw9NXOFbkJ7VIo/htY2gEJwzWHV+Nhw2HXXo3gsGbngJGIvQI5Pvc KM1t8EvdDVf7wjjdzYKlkak0Oj3dEV1Wy3whowpGd6gA1jJOjb9K3702uJULElqtfm8V TYV8cM78Qi6Ue8v1o9KxIzCAQW8PlIZYvATEU+uVwP9N0IjYTuZ7ZZ7l+Ni9RThMDUSj 2PU99m4VxoAV4E9gZpo+dRTLJqDXTkSQs6OoWB7P1x/2vWvqu6k+fFd7ENuvq2mHKB66 ee5g== 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 z5si18500252pgu.19.2019.01.23.08.00.34; Wed, 23 Jan 2019 08:00:50 -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 S1726865AbfAWP7M (ORCPT + 99 others); Wed, 23 Jan 2019 10:59:12 -0500 Received: from mail.bootlin.com ([62.4.15.54]:42233 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbfAWP7L (ORCPT ); Wed, 23 Jan 2019 10:59:11 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id E6B7B20A2E; Wed, 23 Jan 2019 16:59:03 +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 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 BB0CC206A6; Wed, 23 Jan 2019 16:58:53 +0100 (CET) From: Antoine Tenart To: davem@davemloft.net, sd@queasysnail.net, andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com Cc: Antoine Tenart , 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: [PATCH net-next 01/10] net: introduce the MACSEC netdev feature Date: Wed, 23 Jan 2019 16:56:29 +0100 Message-Id: <20190123155638.13852-2-antoine.tenart@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190123155638.13852-1-antoine.tenart@bootlin.com> References: <20190123155638.13852-1-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch introduce a new netdev feature, which will be used by drivers to state they can perform MACsec transformations in hardware. Signed-off-by: Antoine Tenart --- include/linux/netdev_features.h | 3 +++ net/core/ethtool.c | 1 + 2 files changed, 4 insertions(+) diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index 2b2a6dce1630..f278da0f03cd 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -84,6 +84,8 @@ enum { NETIF_F_GRO_HW_BIT, /* Hardware Generic receive offload */ NETIF_F_HW_TLS_RECORD_BIT, /* Offload TLS record */ + NETIF_F_HW_MACSEC_BIT, /* Offload MACsec operations */ + /* * Add your fresh new feature above and remember to update * netdev_features_strings[] in net/core/ethtool.c and maybe @@ -153,6 +155,7 @@ enum { #define NETIF_F_GSO_UDP_L4 __NETIF_F(GSO_UDP_L4) #define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX) #define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX) +#define NETIF_F_HW_MACSEC __NETIF_F(HW_MACSEC) #define for_each_netdev_feature(mask_addr, bit) \ for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 158264f7cfaf..c43f281db758 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -113,6 +113,7 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN] [NETIF_F_HW_TLS_RECORD_BIT] = "tls-hw-record", [NETIF_F_HW_TLS_TX_BIT] = "tls-hw-tx-offload", [NETIF_F_HW_TLS_RX_BIT] = "tls-hw-rx-offload", + [NETIF_F_HW_MACSEC_BIT] = "macsec-hw-offload", }; static const char -- 2.20.1