Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp925073imu; Wed, 23 Jan 2019 08:01:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN6+qXjQNvtFM/OVnVXecXS+oMgudnAz8xmTRs6nAfDyi9VEAadD3tktTknLiQkZBTrNn4G8 X-Received: by 2002:a62:5b83:: with SMTP id p125mr2504405pfb.116.1548259309865; Wed, 23 Jan 2019 08:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548259309; cv=none; d=google.com; s=arc-20160816; b=ppbV4KJ5ddBzK3tGJL8lc1bDAldLtDlxkF/XsHPTigEP+KF4NN+gybYD6HVJcxIVJq PXIOTTyx27GWwHPT7A+KWHvctt1s7xaxs4TuSDI9BYcnz6Djam9rKcKk6tiGdcxNlIjS rZUpTr7RB89H8gQ6wJaYufrDyurhZnu5i6bWYOf7JwtK0Ny4SVH2Y/T1g5wU8ZlzVXVH sert91fvGunM7gFVpIRMhyQfSTJD8LrpCClQJTnUlRac06NCAoQsyKLR2XQQkaJEpafz WsuMQupdKbS+fu7G3FNxGfviWgnaxV7u+3jjHTNk0gSDdWZN94inDCWZ2bDCiHxwHZdy UQeA== 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=tgxLy2M/3SKhhiDUMZeQPZYBYDD2n3UKUYDE8oQZc+I=; b=silpRTQJRUwHSShP6OahjbOG0RhrrtRNIcjfvXlXfUQP7NSMwebguqDPeERVJ3L3Js E2fAmsbc+F4utFge+oHHYlL6gtUgvBILn0JSAuTxy2jgvz36Tn8qm7G2JrOrx/bbP60L 8zVsO+PRjz9o6wkN9S3jqSDwvvr08XRGBXdVzgHidFbbT05tpm0Jv47cBviM1eU4/bv3 cX9SME/RbBvwa3IJaP+pi7csEDwx/o4b59nQp26ay6d/Z/rKiNaJFZTTwTPz5hwHPjHr J6mCuGmumZW01t9mAjiB7sFiI9sfDpd2xd/S+sgIiabazL1KuVI0cB2YGgpKxJFhvmw/ GfeA== 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 a28si18962570pgl.530.2019.01.23.08.01.33; Wed, 23 Jan 2019 08:01:49 -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 S1727074AbfAWP7R (ORCPT + 99 others); Wed, 23 Jan 2019 10:59:17 -0500 Received: from mail.bootlin.com ([62.4.15.54]:42239 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbfAWP7Q (ORCPT ); Wed, 23 Jan 2019 10:59:16 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 10E58207B6; Wed, 23 Jan 2019 16:59:14 +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 802CF209BC; Wed, 23 Jan 2019 16:58:55 +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 06/10] net: introduce a net_device_ops macsec helper Date: Wed, 23 Jan 2019 16:56:34 +0100 Message-Id: <20190123155638.13852-7-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 introduces a net_device_ops MACsec helper to allow net device drivers to implement a MACsec offloading solution. Signed-off-by: Antoine Tenart --- include/linux/netdevice.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e675ef97a426..ee2f40dca515 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -53,6 +53,10 @@ #include #include +#ifdef CONFIG_MACSEC +#include +#endif + struct netpoll_info; struct device; struct phy_device; @@ -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 }; /** -- 2.20.1