From patchwork Mon Dec 28 12:38:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sabrina Dubroca X-Patchwork-Id: 561290 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7BB7D140C50 for ; Mon, 28 Dec 2015 23:40:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbbL1MkC (ORCPT ); Mon, 28 Dec 2015 07:40:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42716 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbbL1Mjx (ORCPT ); Mon, 28 Dec 2015 07:39:53 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id DF3E48E229; Mon, 28 Dec 2015 12:39:52 +0000 (UTC) Received: from bistromath.redhat.com (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBSCdmu5022465; Mon, 28 Dec 2015 07:39:52 -0500 From: Sabrina Dubroca To: netdev@vger.kernel.org Cc: Hannes Frederic Sowa , Sabrina Dubroca Subject: [RFC PATCH net-next 2/3] net: add MACsec netdevice priv_flags and helper Date: Mon, 28 Dec 2015 13:38:29 +0100 Message-Id: <4f179497d02f9d186559e0416e6fac74b575db95.1450964358.git.sd@queasysnail.net> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Sabrina Dubroca Reviewed-by: Hannes Frederic Sowa --- include/linux/netdevice.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c20b814e46a0..4f80f621ecf9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1319,6 +1319,7 @@ enum netdev_priv_flags { IFF_OPENVSWITCH = 1<<22, IFF_L3MDEV_SLAVE = 1<<23, IFF_TEAM = 1<<24, + IFF_MACSEC = 1<<25, }; #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN @@ -1346,6 +1347,7 @@ enum netdev_priv_flags { #define IFF_OPENVSWITCH IFF_OPENVSWITCH #define IFF_L3MDEV_SLAVE IFF_L3MDEV_SLAVE #define IFF_TEAM IFF_TEAM +#define IFF_MACSEC IFF_MACSEC /** * struct net_device - The DEVICE structure. @@ -3964,6 +3966,11 @@ static inline void skb_gso_error_unwind(struct sk_buff *skb, __be16 protocol, skb->mac_len = mac_len; } +static inline bool netif_is_macsec(const struct net_device *dev) +{ + return dev->priv_flags & IFF_MACSEC; +} + static inline bool netif_is_macvlan(const struct net_device *dev) { return dev->priv_flags & IFF_MACVLAN;