From: Jonas Bonn <jonas@norrbonn.se>
To: laforge@gnumonks.org, kuba@kernel.org, netdev@vger.kernel.org,
pablo@netfilter.org
Cc: Jonas Bonn <jonas@norrbonn.se>
Subject: [PATCH net-next v2 6/7] gtp: set device type
Date: Wed, 3 Feb 2021 08:08:04 +0100 [thread overview]
Message-ID: <20210203070805.281321-7-jonas@norrbonn.se> (raw)
In-Reply-To: <20210203070805.281321-1-jonas@norrbonn.se>
Set the devtype to 'gtp' when setting up the link.
Signed-off-by: Jonas Bonn <jonas@norrbonn.se>
Acked-by: Harald Welte <laforge@gnumonks.org>
---
drivers/net/gtp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 04d9de385549..a1bb02818977 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -610,6 +610,10 @@ static const struct net_device_ops gtp_netdev_ops = {
.ndo_get_stats64 = dev_get_tstats64,
};
+static const struct device_type gtp_type = {
+ .name = "gtp",
+};
+
static void gtp_link_setup(struct net_device *dev)
{
unsigned int max_gtp_header_len = sizeof(struct iphdr) +
@@ -618,6 +622,7 @@ static void gtp_link_setup(struct net_device *dev)
dev->netdev_ops = >p_netdev_ops;
dev->needs_free_netdev = true;
+ SET_NETDEV_DEVTYPE(dev, >p_type);
dev->hard_header_len = 0;
dev->addr_len = 0;
--
2.27.0
next prev parent reply other threads:[~2021-02-03 7:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 6:51 [PATCH net-next 0/7] GTP Jonas Bonn
2021-02-02 6:51 ` [PATCH net-next 1/7] Revert "GTP: add support for flow based tunneling API" Jonas Bonn
2021-02-02 6:51 ` [PATCH net-next 2/7] gtp: set initial MTU Jonas Bonn
2021-02-02 6:51 ` [PATCH net-next 3/7] gtp: include role in link info Jonas Bonn
2021-02-02 6:51 ` [PATCH net-next 4/7] gtp: really check namespaces before xmit Jonas Bonn
2021-02-02 6:51 ` [PATCH net-next 5/7] gtp: drop unnecessary call to skb_dst_drop Jonas Bonn
2021-02-02 6:51 ` [PATCH net-next 6/7] gtp: set device type Jonas Bonn
2021-02-02 6:51 ` [PATCH net-next 7/7] gtp: update rx_length_errors for abnormally short packets Jonas Bonn
2021-02-02 22:00 ` Jakub Kicinski
2021-02-03 7:07 ` [PATCH net-next v2 0/7] GTP Jonas Bonn
2021-02-03 7:07 ` [PATCH net-next v2 1/7] Revert "GTP: add support for flow based tunneling API" Jonas Bonn
2021-02-03 7:08 ` [PATCH net-next v2 2/7] gtp: set initial MTU Jonas Bonn
2021-02-03 7:08 ` [PATCH net-next v2 3/7] gtp: include role in link info Jonas Bonn
2021-02-03 7:08 ` [PATCH net-next v2 4/7] gtp: really check namespaces before xmit Jonas Bonn
2021-02-03 7:08 ` [PATCH net-next v2 5/7] gtp: drop unnecessary call to skb_dst_drop Jonas Bonn
2021-02-03 7:08 ` Jonas Bonn [this message]
2021-02-03 7:08 ` [PATCH net-next v2 7/7] gtp: update rx_length_errors for abnormally short packets Jonas Bonn
2021-02-03 20:19 ` [PATCH net-next v2 0/7] GTP Jakub Kicinski
2021-02-04 20:10 ` Jakub Kicinski
2021-02-04 6:09 ` [PATCH net-next " Pravin Shelar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210203070805.281321-7-jonas@norrbonn.se \
--to=jonas@norrbonn.se \
--cc=kuba@kernel.org \
--cc=laforge@gnumonks.org \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).