aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-02 19:22:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-02 19:22:51 -0400
commit4fc3acf2918fa158dc651a0c824a23944e956919 (patch)
tree3258f1037ee45c3799d12805d78679e41fdc98c9 /include
parent63004afa718b1506fe9a286075b3b2d8c6ca2b9b (diff)
parent9ca3cc6f3026946ba655e863ca2096339e667639 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking updates from David Miller: 1) Make syn floods consume significantly less resources by a) Not pre-COW'ing routing metrics for SYN/ACKs b) Mirroring the device queue mapping of the SYN for the SYN/ACK reply. Both from Eric Dumazet. 2) Fix calculation errors in Byte Queue Limiting, from Hiroaki SHIMODA. 3) Validate the length requested when building a paged SKB for a socket, so we don't overrun the page vector accidently. From Jason Wang. 4) When netlabel is disabled, we abort all IP option processing when we see a CIPSO option. This isn't the right thing to do, we should simply skip over it and continue processing the remaining options (if any). Fix from Paul Moore. 5) SRIOV fixes for the mellanox driver from Jack orgenstein and Marcel Apfelbaum. 6) 8139cp enables the receiver before the ring address is properly programmed, which potentially lets the device crap over random memory. Fix from Jason Wang. 7) e1000/e1000e fixes for i217 RST handling, and an improper buffer address reference in jumbo RX frame processing from Bruce Allan and Sebastian Andrzej Siewior, respectively. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: fec_mpc52xx: fix timestamp filtering mcs7830: Implement link state detection e1000e: fix Rapid Start Technology support for i217 e1000: look into the page instead of skb->data for e1000_tbi_adjust_stats() r8169: call netif_napi_del at errpaths and at driver unload tcp: reflect SYN queue_mapping into SYNACK packets tcp: do not create inetpeer on SYNACK message 8139cp/8139too: terminate the eeprom access with the right opmode 8139cp: set ring address before enabling receiver cipso: handle CIPSO options correctly when NetLabel is disabled net: sock: validate data_len before allocating skb in sock_alloc_send_pskb() bql: Avoid possible inconsistent calculation. bql: Avoid unneeded limit decrement. bql: Fix POSDIFF() to integer overflow aware. net/mlx4_core: Fix obscure mlx4_cmd_box parameter in QUERY_DEV_CAP net/mlx4_core: Check port out-of-range before using in mlx4_slave_cap net/mlx4_core: Fixes for VF / Guest startup flow net/mlx4_en: Fix improper use of "port" parameter in mlx4_en_event net/mlx4_core: Fix number of EQs used in ICM initialisation net/mlx4_core: Fix the slave_id out-of-range test in mlx4_eq_int
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx4/device.h6
-rw-r--r--include/net/cipso_ipv4.h29
2 files changed, 34 insertions, 1 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 6e27fa99e8b9..6a8f002b8ed3 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -64,6 +64,7 @@ enum {
64 MLX4_MAX_NUM_PF = 16, 64 MLX4_MAX_NUM_PF = 16,
65 MLX4_MAX_NUM_VF = 64, 65 MLX4_MAX_NUM_VF = 64,
66 MLX4_MFUNC_MAX = 80, 66 MLX4_MFUNC_MAX = 80,
67 MLX4_MAX_EQ_NUM = 1024,
67 MLX4_MFUNC_EQ_NUM = 4, 68 MLX4_MFUNC_EQ_NUM = 4,
68 MLX4_MFUNC_MAX_EQES = 8, 69 MLX4_MFUNC_MAX_EQES = 8,
69 MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) 70 MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1)
@@ -239,6 +240,10 @@ static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor)
239 return (major << 32) | (minor << 16) | subminor; 240 return (major << 32) | (minor << 16) | subminor;
240} 241}
241 242
243struct mlx4_phys_caps {
244 u32 num_phys_eqs;
245};
246
242struct mlx4_caps { 247struct mlx4_caps {
243 u64 fw_ver; 248 u64 fw_ver;
244 u32 function; 249 u32 function;
@@ -499,6 +504,7 @@ struct mlx4_dev {
499 unsigned long flags; 504 unsigned long flags;
500 unsigned long num_slaves; 505 unsigned long num_slaves;
501 struct mlx4_caps caps; 506 struct mlx4_caps caps;
507 struct mlx4_phys_caps phys_caps;
502 struct radix_tree_root qp_table_tree; 508 struct radix_tree_root qp_table_tree;
503 u8 rev_id; 509 u8 rev_id;
504 char board_id[MLX4_BOARD_ID_LEN]; 510 char board_id[MLX4_BOARD_ID_LEN];
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index 9808877c2ab9..a7a683e30b64 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -42,6 +42,7 @@
42#include <net/netlabel.h> 42#include <net/netlabel.h>
43#include <net/request_sock.h> 43#include <net/request_sock.h>
44#include <linux/atomic.h> 44#include <linux/atomic.h>
45#include <asm/unaligned.h>
45 46
46/* known doi values */ 47/* known doi values */
47#define CIPSO_V4_DOI_UNKNOWN 0x00000000 48#define CIPSO_V4_DOI_UNKNOWN 0x00000000
@@ -285,7 +286,33 @@ static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb,
285static inline int cipso_v4_validate(const struct sk_buff *skb, 286static inline int cipso_v4_validate(const struct sk_buff *skb,
286 unsigned char **option) 287 unsigned char **option)
287{ 288{
288 return -ENOSYS; 289 unsigned char *opt = *option;
290 unsigned char err_offset = 0;
291 u8 opt_len = opt[1];
292 u8 opt_iter;
293
294 if (opt_len < 8) {
295 err_offset = 1;
296 goto out;
297 }
298
299 if (get_unaligned_be32(&opt[2]) == 0) {
300 err_offset = 2;
301 goto out;
302 }
303
304 for (opt_iter = 6; opt_iter < opt_len;) {
305 if (opt[opt_iter + 1] > (opt_len - opt_iter)) {
306 err_offset = opt_iter + 1;
307 goto out;
308 }
309 opt_iter += opt[opt_iter + 1];
310 }
311
312out:
313 *option = opt + err_offset;
314 return err_offset;
315
289} 316}
290#endif /* CONFIG_NETLABEL */ 317#endif /* CONFIG_NETLABEL */
291 318