History

bareudp: Move definition of struct bareudp_conf to bareudp.c

This structure is used only in bareudp.c. While there, adjust include files: we need netdevice.h, not skbuff.h.

Guillaume Nault committed 4 years ago

Commit dcdd77e1 parent 614b7a12 files · +8 −8Browse files

Unified · Split

2 files
  1. drivers/net/bareudp.c +7 −0
  2. include/net/bareudp.h +1 −8
drivers/net/bareudp.c+7−0
@@ -38,6 +38,13 @@ struct bareudp_net { · 37 unmodified lines
38 struct list_head bareudp_list;38 struct list_head bareudp_list;
39};39};
40 40
41struct bareudp_conf {
42 __be16 ethertype;
43 __be16 port;
44 u16 sport_min;
45 bool multi_proto_mode;
46};
47
41/* Pseudo network device */48/* Pseudo network device */
42struct bareudp_dev {49struct bareudp_dev {
43 struct net *net; /* netns for packet i/o */50 struct net *net; /* netns for packet i/o */
include/net/bareudp.h+1−8
@@ -3,17 +3,10 @@ · 2 unmodified lines
3#ifndef __NET_BAREUDP_H3#ifndef __NET_BAREUDP_H
4#define __NET_BAREUDP_H4#define __NET_BAREUDP_H
5 5
6#include <linux/netdevice.h>
6#include <linux/types.h>7#include <linux/types.h>
7#include <linux/skbuff.h>
8#include <net/rtnetlink.h>8#include <net/rtnetlink.h>
9 9
10struct bareudp_conf {
11 __be16 ethertype;
12 __be16 port;
13 u16 sport_min;
14 bool multi_proto_mode;
15};
16
17static inline bool netif_is_bareudp(const struct net_device *dev)10static inline bool netif_is_bareudp(const struct net_device *dev)
18{11{
19 return dev->rtnl_link_ops &&12 return dev->rtnl_link_ops &&

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t