aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-13 00:10:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-13 00:10:38 -0400
commit110bc76729d448fdbcb5cdb63b83d9fd65ce5e26 (patch)
treeb25599bb5e186303ea9c18715a09a0c3278603af /include
parent6c9d370c16aad97cfc6de68666634eaabac2b048 (diff)
parent01d460dd70adc858e15307332832183c622bee50 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Handle max TX power properly wrt VIFs and the MAC in iwlwifi, from Avri Altman. 2) Use the correct FW API for scan completions in iwlwifi, from Avraham Stern. 3) FW monitor in iwlwifi accidently uses unmapped memory, fix from Liad Kaufman. 4) rhashtable conversion of mac80211 station table was buggy, the virtual interface was not taken into account. Fix from Johannes Berg. 5) Fix deadlock in rtlwifi by not using a zero timeout for usb_control_msg(), from Larry Finger. 6) Update reordering state before calculating loss detection, from Yuchung Cheng. 7) Fix off by one in bluetooth firmward parsing, from Dan Carpenter. 8) Fix extended frame handling in xiling_can driver, from Jeppe Ledet-Pedersen. 9) Fix CODEL packet scheduler behavior in the presence of TSO packets, from Eric Dumazet. 10) Fix NAPI budget testing in fm10k driver, from Alexander Duyck. 11) macvlan needs to propagate promisc settings down the the lower device, from Vlad Yasevich. 12) igb driver can oops when changing number of rings, from Toshiaki Makita. 13) Source specific default routes not handled properly in ipv6, from Markus Stenberg. 14) Use after free in tc_ctl_tfilter(), from WANG Cong. 15) Use softirq spinlocking in netxen driver, from Tony Camuso. 16) Two ARM bpf JIT fixes from Nicolas Schichan. 17) Handle MSG_DONTWAIT properly in ring based AF_PACKET sends, from Mathias Kretschmer. 18) Fix x86 bpf JIT implementation of FROM_{BE16,LE16,LE32}, from Alexei Starovoitov. 19) ll_temac driver DMA maps TX packet header with incorrect length, fix from Michal Simek. 20) We removed pm_qos bits from netdevice.h, but some indirect references remained. Kill them. From David Ahern. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (90 commits) net: Remove remaining remnants of pm_qos from netdevice.h e1000e: Add pm_qos header net: phy: micrel: Fix regression in kszphy_probe net: ll_temac: Fix DMA map size bug x86: bpf_jit: fix FROM_BE16 and FROM_LE16/32 instructions netns: return RTM_NEWNSID instead of RTM_GETNSID on a get Update be2net maintainers' email addresses net_sched: gred: use correct backlog value in WRED mode pppoe: drop pppoe device in pppoe_unbind_sock_work net: qca_spi: Fix possible race during probe net: mdio-gpio: Allow for unspecified bus id af_packet / TX_RING not fully non-blocking (w/ MSG_DONTWAIT). bnx2x: limit fw delay in kdump to 5s after boot ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits. ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction. mpls: Change reserved label names to be consistent with netbsd usbnet: avoid integer overflow in start_xmit netxen_nic: use spin_[un]lock_bh around tx_clean_lock (2) net: xgene_enet: Set hardware dependency net: amd-xgbe: Add hardware dependency ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/linux/tcp.h8
-rw-r--r--include/net/cfg802154.h2
-rw-r--r--include/net/codel.h10
-rw-r--r--include/net/mac80211.h2
-rw-r--r--include/net/mac802154.h94
-rw-r--r--include/net/tcp.h7
-rw-r--r--include/uapi/linux/inet_diag.h4
-rw-r--r--include/uapi/linux/mpls.h10
-rw-r--r--include/uapi/linux/tcp.h3
10 files changed, 133 insertions, 10 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1899c74a7127..05b9a694e213 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -25,7 +25,6 @@
25#ifndef _LINUX_NETDEVICE_H 25#ifndef _LINUX_NETDEVICE_H
26#define _LINUX_NETDEVICE_H 26#define _LINUX_NETDEVICE_H
27 27
28#include <linux/pm_qos.h>
29#include <linux/timer.h> 28#include <linux/timer.h>
30#include <linux/bug.h> 29#include <linux/bug.h>
31#include <linux/delay.h> 30#include <linux/delay.h>
@@ -1499,8 +1498,6 @@ enum netdev_priv_flags {
1499 * 1498 *
1500 * @qdisc_tx_busylock: XXX: need comments on this one 1499 * @qdisc_tx_busylock: XXX: need comments on this one
1501 * 1500 *
1502 * @pm_qos_req: Power Management QoS object
1503 *
1504 * FIXME: cleanup struct net_device such that network protocol info 1501 * FIXME: cleanup struct net_device such that network protocol info
1505 * moves out. 1502 * moves out.
1506 */ 1503 */
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 0caa3a2d4106..3b2911502a8c 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -145,11 +145,19 @@ struct tcp_sock {
145 * read the code and the spec side by side (and laugh ...) 145 * read the code and the spec side by side (and laugh ...)
146 * See RFC793 and RFC1122. The RFC writes these in capitals. 146 * See RFC793 and RFC1122. The RFC writes these in capitals.
147 */ 147 */
148 u64 bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived
149 * sum(delta(rcv_nxt)), or how many bytes
150 * were acked.
151 */
148 u32 rcv_nxt; /* What we want to receive next */ 152 u32 rcv_nxt; /* What we want to receive next */
149 u32 copied_seq; /* Head of yet unread data */ 153 u32 copied_seq; /* Head of yet unread data */
150 u32 rcv_wup; /* rcv_nxt on last window update sent */ 154 u32 rcv_wup; /* rcv_nxt on last window update sent */
151 u32 snd_nxt; /* Next sequence we send */ 155 u32 snd_nxt; /* Next sequence we send */
152 156
157 u64 bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked
158 * sum(delta(snd_una)), or how many bytes
159 * were acked.
160 */
153 u32 snd_una; /* First byte we want an ack for */ 161 u32 snd_una; /* First byte we want an ack for */
154 u32 snd_sml; /* Last byte of the most recently transmitted small packet */ 162 u32 snd_sml; /* Last byte of the most recently transmitted small packet */
155 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ 163 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index eeda67652766..6ea16c84293b 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -30,11 +30,13 @@ struct wpan_phy_cca;
30struct cfg802154_ops { 30struct cfg802154_ops {
31 struct net_device * (*add_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, 31 struct net_device * (*add_virtual_intf_deprecated)(struct wpan_phy *wpan_phy,
32 const char *name, 32 const char *name,
33 unsigned char name_assign_type,
33 int type); 34 int type);
34 void (*del_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, 35 void (*del_virtual_intf_deprecated)(struct wpan_phy *wpan_phy,
35 struct net_device *dev); 36 struct net_device *dev);
36 int (*add_virtual_intf)(struct wpan_phy *wpan_phy, 37 int (*add_virtual_intf)(struct wpan_phy *wpan_phy,
37 const char *name, 38 const char *name,
39 unsigned char name_assign_type,
38 enum nl802154_iftype type, 40 enum nl802154_iftype type,
39 __le64 extended_addr); 41 __le64 extended_addr);
40 int (*del_virtual_intf)(struct wpan_phy *wpan_phy, 42 int (*del_virtual_intf)(struct wpan_phy *wpan_phy,
diff --git a/include/net/codel.h b/include/net/codel.h
index aeee28081245..1e18005f7f65 100644
--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -120,11 +120,13 @@ static inline u32 codel_time_to_us(codel_time_t val)
120 * struct codel_params - contains codel parameters 120 * struct codel_params - contains codel parameters
121 * @target: target queue size (in time units) 121 * @target: target queue size (in time units)
122 * @interval: width of moving time window 122 * @interval: width of moving time window
123 * @mtu: device mtu, or minimal queue backlog in bytes.
123 * @ecn: is Explicit Congestion Notification enabled 124 * @ecn: is Explicit Congestion Notification enabled
124 */ 125 */
125struct codel_params { 126struct codel_params {
126 codel_time_t target; 127 codel_time_t target;
127 codel_time_t interval; 128 codel_time_t interval;
129 u32 mtu;
128 bool ecn; 130 bool ecn;
129}; 131};
130 132
@@ -166,10 +168,12 @@ struct codel_stats {
166 u32 ecn_mark; 168 u32 ecn_mark;
167}; 169};
168 170
169static void codel_params_init(struct codel_params *params) 171static void codel_params_init(struct codel_params *params,
172 const struct Qdisc *sch)
170{ 173{
171 params->interval = MS2TIME(100); 174 params->interval = MS2TIME(100);
172 params->target = MS2TIME(5); 175 params->target = MS2TIME(5);
176 params->mtu = psched_mtu(qdisc_dev(sch));
173 params->ecn = false; 177 params->ecn = false;
174} 178}
175 179
@@ -180,7 +184,7 @@ static void codel_vars_init(struct codel_vars *vars)
180 184
181static void codel_stats_init(struct codel_stats *stats) 185static void codel_stats_init(struct codel_stats *stats)
182{ 186{
183 stats->maxpacket = 256; 187 stats->maxpacket = 0;
184} 188}
185 189
186/* 190/*
@@ -234,7 +238,7 @@ static bool codel_should_drop(const struct sk_buff *skb,
234 stats->maxpacket = qdisc_pkt_len(skb); 238 stats->maxpacket = qdisc_pkt_len(skb);
235 239
236 if (codel_time_before(vars->ldelay, params->target) || 240 if (codel_time_before(vars->ldelay, params->target) ||
237 sch->qstats.backlog <= stats->maxpacket) { 241 sch->qstats.backlog <= params->mtu) {
238 /* went below - stay below for at least interval */ 242 /* went below - stay below for at least interval */
239 vars->first_above_time = 0; 243 vars->first_above_time = 0;
240 return false; 244 return false;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b4bef1152c05..8e3668b44c29 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1666,6 +1666,8 @@ struct ieee80211_tx_control {
1666 * @sta: station table entry, %NULL for per-vif queue 1666 * @sta: station table entry, %NULL for per-vif queue
1667 * @tid: the TID for this queue (unused for per-vif queue) 1667 * @tid: the TID for this queue (unused for per-vif queue)
1668 * @ac: the AC for this queue 1668 * @ac: the AC for this queue
1669 * @drv_priv: data area for driver use, will always be aligned to
1670 * sizeof(void *).
1669 * 1671 *
1670 * The driver can obtain packets from this queue by calling 1672 * The driver can obtain packets from this queue by calling
1671 * ieee80211_tx_dequeue(). 1673 * ieee80211_tx_dequeue().
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index e18e7fd43f47..7df28a4c23f9 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -247,19 +247,109 @@ static inline void ieee802154_le64_to_be64(void *be64_dst, const void *le64_src)
247 __put_unaligned_memmove64(swab64p(le64_src), be64_dst); 247 __put_unaligned_memmove64(swab64p(le64_src), be64_dst);
248} 248}
249 249
250/* Basic interface to register ieee802154 device */ 250/**
251 * ieee802154_alloc_hw - Allocate a new hardware device
252 *
253 * This must be called once for each hardware device. The returned pointer
254 * must be used to refer to this device when calling other functions.
255 * mac802154 allocates a private data area for the driver pointed to by
256 * @priv in &struct ieee802154_hw, the size of this area is given as
257 * @priv_data_len.
258 *
259 * @priv_data_len: length of private data
260 * @ops: callbacks for this device
261 *
262 * Return: A pointer to the new hardware device, or %NULL on error.
263 */
251struct ieee802154_hw * 264struct ieee802154_hw *
252ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops); 265ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops);
266
267/**
268 * ieee802154_free_hw - free hardware descriptor
269 *
270 * This function frees everything that was allocated, including the
271 * private data for the driver. You must call ieee802154_unregister_hw()
272 * before calling this function.
273 *
274 * @hw: the hardware to free
275 */
253void ieee802154_free_hw(struct ieee802154_hw *hw); 276void ieee802154_free_hw(struct ieee802154_hw *hw);
277
278/**
279 * ieee802154_register_hw - Register hardware device
280 *
281 * You must call this function before any other functions in
282 * mac802154. Note that before a hardware can be registered, you
283 * need to fill the contained wpan_phy's information.
284 *
285 * @hw: the device to register as returned by ieee802154_alloc_hw()
286 *
287 * Return: 0 on success. An error code otherwise.
288 */
254int ieee802154_register_hw(struct ieee802154_hw *hw); 289int ieee802154_register_hw(struct ieee802154_hw *hw);
290
291/**
292 * ieee802154_unregister_hw - Unregister a hardware device
293 *
294 * This function instructs mac802154 to free allocated resources
295 * and unregister netdevices from the networking subsystem.
296 *
297 * @hw: the hardware to unregister
298 */
255void ieee802154_unregister_hw(struct ieee802154_hw *hw); 299void ieee802154_unregister_hw(struct ieee802154_hw *hw);
256 300
301/**
302 * ieee802154_rx - receive frame
303 *
304 * Use this function to hand received frames to mac802154. The receive
305 * buffer in @skb must start with an IEEE 802.15.4 header. In case of a
306 * paged @skb is used, the driver is recommended to put the ieee802154
307 * header of the frame on the linear part of the @skb to avoid memory
308 * allocation and/or memcpy by the stack.
309 *
310 * This function may not be called in IRQ context. Calls to this function
311 * for a single hardware must be synchronized against each other.
312 *
313 * @hw: the hardware this frame came in on
314 * @skb: the buffer to receive, owned by mac802154 after this call
315 */
257void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb); 316void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb);
317
318/**
319 * ieee802154_rx_irqsafe - receive frame
320 *
321 * Like ieee802154_rx() but can be called in IRQ context
322 * (internally defers to a tasklet.)
323 *
324 * @hw: the hardware this frame came in on
325 * @skb: the buffer to receive, owned by mac802154 after this call
326 * @lqi: link quality indicator
327 */
258void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, 328void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb,
259 u8 lqi); 329 u8 lqi);
260 330/**
331 * ieee802154_wake_queue - wake ieee802154 queue
332 * @hw: pointer as obtained from ieee802154_alloc_hw().
333 *
334 * Drivers should use this function instead of netif_wake_queue.
335 */
261void ieee802154_wake_queue(struct ieee802154_hw *hw); 336void ieee802154_wake_queue(struct ieee802154_hw *hw);
337
338/**
339 * ieee802154_stop_queue - stop ieee802154 queue
340 * @hw: pointer as obtained from ieee802154_alloc_hw().
341 *
342 * Drivers should use this function instead of netif_stop_queue.
343 */
262void ieee802154_stop_queue(struct ieee802154_hw *hw); 344void ieee802154_stop_queue(struct ieee802154_hw *hw);
345
346/**
347 * ieee802154_xmit_complete - frame transmission complete
348 *
349 * @hw: pointer as obtained from ieee802154_alloc_hw().
350 * @skb: buffer for transmission
351 * @ifs_handling: indicate interframe space handling
352 */
263void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, 353void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb,
264 bool ifs_handling); 354 bool ifs_handling);
265 355
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 051dc5c2802d..6d204f3f9df8 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -576,7 +576,7 @@ static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize)
576} 576}
577 577
578/* tcp.c */ 578/* tcp.c */
579void tcp_get_info(const struct sock *, struct tcp_info *); 579void tcp_get_info(struct sock *, struct tcp_info *);
580 580
581/* Read 'sendfile()'-style from a TCP socket */ 581/* Read 'sendfile()'-style from a TCP socket */
582typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *, 582typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *,
@@ -804,6 +804,8 @@ enum tcp_ca_ack_event_flags {
804/* Requires ECN/ECT set on all packets */ 804/* Requires ECN/ECT set on all packets */
805#define TCP_CONG_NEEDS_ECN 0x2 805#define TCP_CONG_NEEDS_ECN 0x2
806 806
807union tcp_cc_info;
808
807struct tcp_congestion_ops { 809struct tcp_congestion_ops {
808 struct list_head list; 810 struct list_head list;
809 u32 key; 811 u32 key;
@@ -829,7 +831,8 @@ struct tcp_congestion_ops {
829 /* hook for packet ack accounting (optional) */ 831 /* hook for packet ack accounting (optional) */
830 void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us); 832 void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us);
831 /* get info for inet_diag (optional) */ 833 /* get info for inet_diag (optional) */
832 int (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb); 834 size_t (*get_info)(struct sock *sk, u32 ext, int *attr,
835 union tcp_cc_info *info);
833 836
834 char name[TCP_CA_NAME_MAX]; 837 char name[TCP_CA_NAME_MAX];
835 struct module *owner; 838 struct module *owner;
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h
index d65c0a09efd3..c7093c75bdd6 100644
--- a/include/uapi/linux/inet_diag.h
+++ b/include/uapi/linux/inet_diag.h
@@ -143,4 +143,8 @@ struct tcp_dctcp_info {
143 __u32 dctcp_ab_tot; 143 __u32 dctcp_ab_tot;
144}; 144};
145 145
146union tcp_cc_info {
147 struct tcpvegas_info vegas;
148 struct tcp_dctcp_info dctcp;
149};
146#endif /* _UAPI_INET_DIAG_H_ */ 150#endif /* _UAPI_INET_DIAG_H_ */
diff --git a/include/uapi/linux/mpls.h b/include/uapi/linux/mpls.h
index bc9abfe88c9a..139d4dd1cab8 100644
--- a/include/uapi/linux/mpls.h
+++ b/include/uapi/linux/mpls.h
@@ -31,4 +31,14 @@ struct mpls_label {
31#define MPLS_LS_TTL_MASK 0x000000FF 31#define MPLS_LS_TTL_MASK 0x000000FF
32#define MPLS_LS_TTL_SHIFT 0 32#define MPLS_LS_TTL_SHIFT 0
33 33
34/* Reserved labels */
35#define MPLS_LABEL_IPV4NULL 0 /* RFC3032 */
36#define MPLS_LABEL_RTALERT 1 /* RFC3032 */
37#define MPLS_LABEL_IPV6NULL 2 /* RFC3032 */
38#define MPLS_LABEL_IMPLNULL 3 /* RFC3032 */
39#define MPLS_LABEL_ENTROPY 7 /* RFC6790 */
40#define MPLS_LABEL_GAL 13 /* RFC5586 */
41#define MPLS_LABEL_OAMALERT 14 /* RFC3429 */
42#define MPLS_LABEL_EXTENSION 15 /* RFC7274 */
43
34#endif /* _UAPI_MPLS_H */ 44#endif /* _UAPI_MPLS_H */
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index 3b9718328d8b..faa72f4fa547 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -112,6 +112,7 @@ enum {
112#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ 112#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */
113#define TCP_TIMESTAMP 24 113#define TCP_TIMESTAMP 24
114#define TCP_NOTSENT_LOWAT 25 /* limit number of unsent bytes in write queue */ 114#define TCP_NOTSENT_LOWAT 25 /* limit number of unsent bytes in write queue */
115#define TCP_CC_INFO 26 /* Get Congestion Control (optional) info */
115 116
116struct tcp_repair_opt { 117struct tcp_repair_opt {
117 __u32 opt_code; 118 __u32 opt_code;
@@ -189,6 +190,8 @@ struct tcp_info {
189 190
190 __u64 tcpi_pacing_rate; 191 __u64 tcpi_pacing_rate;
191 __u64 tcpi_max_pacing_rate; 192 __u64 tcpi_max_pacing_rate;
193 __u64 tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */
194 __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
192}; 195};
193 196
194/* for TCP_MD5SIG socket option */ 197/* for TCP_MD5SIG socket option */