Renamed patches to keep their original numbering from codelinaro.org Fixed minor bugs and added support for the qca-nss-drv-l2tpv2 module
42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
From 9d5acd39ef0579f27dcd2ce44316f3a4df973fa1 Mon Sep 17 00:00:00 2001
|
|
From: Nitin Shetty <quic_nitinsj@quicinc.com>
|
|
Date: Wed, 12 Jan 2022 00:06:57 +0530
|
|
Subject: [PATCH 299/500] net: gre: adding API to check GRE net device
|
|
|
|
adding support to check if the net device
|
|
is GRE.
|
|
|
|
Change-Id: Ic50f41299b19939fb8313667e4b8c9c571432235
|
|
Signed-off-by: Nitin Shetty <quic_nitinsj@quicinc.com>
|
|
---
|
|
include/net/gre.h | 12 ++++++++++++
|
|
1 file changed, 12 insertions(+)
|
|
|
|
--- a/include/net/gre.h
|
|
+++ b/include/net/gre.h
|
|
@@ -43,12 +43,24 @@ static inline bool netif_is_gretap(const
|
|
!strcmp(dev->rtnl_link_ops->kind, "gretap");
|
|
}
|
|
|
|
+static inline bool netif_is_gre(const struct net_device *dev)
|
|
+{
|
|
+ return dev->rtnl_link_ops &&
|
|
+ !strcmp(dev->rtnl_link_ops->kind, "gre");
|
|
+}
|
|
+
|
|
static inline bool netif_is_ip6gretap(const struct net_device *dev)
|
|
{
|
|
return dev->rtnl_link_ops &&
|
|
!strcmp(dev->rtnl_link_ops->kind, "ip6gretap");
|
|
}
|
|
|
|
+static inline bool netif_is_ip6gre(const struct net_device *dev)
|
|
+{
|
|
+ return dev->rtnl_link_ops &&
|
|
+ !strcmp(dev->rtnl_link_ops->kind, "ip6gre");
|
|
+}
|
|
+
|
|
static inline int gre_calc_hlen(__be16 o_flags)
|
|
{
|
|
int addend = 4;
|