1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2013-2014, 2016-2018 The Linux Foundation. All rights reserved.
4 * RMNET Data configuration engine
7 #include <linux/skbuff.h>
8 #include <net/gro_cells.h>
10 #ifndef _RMNET_CONFIG_H_
11 #define _RMNET_CONFIG_H_
13 #define RMNET_MAX_LOGICAL_EP 255
15 struct rmnet_endpoint {
17 struct net_device *egress_dev;
18 struct hlist_node hlnode;
21 /* One instance of this structure is instantiated for each real_dev associated
25 struct net_device *dev;
29 struct hlist_head muxed_ep[RMNET_MAX_LOGICAL_EP];
30 struct net_device *bridge_ep;
33 extern struct rtnl_link_ops rmnet_link_ops;
35 struct rmnet_vnd_stats {
43 struct rmnet_pcpu_stats {
44 struct rmnet_vnd_stats stats;
45 struct u64_stats_sync syncp;
48 struct rmnet_priv_stats {
51 u64 csum_validation_failed;
52 u64 csum_err_bad_buffer;
53 u64 csum_err_invalid_ip_version;
54 u64 csum_err_invalid_transport;
55 u64 csum_fragmented_pkt;
62 struct net_device *real_dev;
63 struct rmnet_pcpu_stats __percpu *pcpu_stats;
64 struct gro_cells gro_cells;
65 struct rmnet_priv_stats stats;
68 struct rmnet_port *rmnet_get_port(struct net_device *real_dev);
69 struct rmnet_endpoint *rmnet_get_endpoint(struct rmnet_port *port, u8 mux_id);
70 int rmnet_add_bridge(struct net_device *rmnet_dev,
71 struct net_device *slave_dev,
72 struct netlink_ext_ack *extack);
73 int rmnet_del_bridge(struct net_device *rmnet_dev,
74 struct net_device *slave_dev);
75 #endif /* _RMNET_CONFIG_H_ */