[MLX4] fixed a bug in "livefish" mode. [mlnx: 3091]
[mirror/winof/.git] / hw / mlx4 / kernel_patches / core_0030_lso.patch
1 From 86a166b61efd6c040bd6d508a4179e3e15827ac0 Mon Sep 17 00:00:00 2001
2 From: Eli Cohen <eli@mellanox.co.il>
3 Date: Tue, 15 Jan 2008 15:48:20 +0200
4 Subject: [PATCH] Add core support for LSO
5
6 LSO allows to pass to the network driver SKBs with data larger
7 than MTU and let the HW fragment the packet to mss quantities.
8
9 Signed-off-by: Eli Cohen <eli@mellanox.co.il>
10 ---
11  include/rdma/ib_verbs.h |   11 +++++++++--
12  1 files changed, 9 insertions(+), 2 deletions(-)
13
14 diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
15 index a4f6184..6ef1729 100644
16 --- a/include/rdma/ib_verbs.h
17 +++ b/include/rdma/ib_verbs.h
18 @@ -103,6 +103,7 @@ enum ib_device_cap_flags {
19          * may set NETIF_F_IP_CSUM.
20          */
21         IB_DEVICE_IP_CSUM               = (1<<18),
22 +       IB_DEVICE_TCP_TSO               = (1<<19),
23  };
24  
25  enum ib_atomic_cap {
26 @@ -410,6 +411,7 @@ enum ib_wc_opcode {
27         IB_WC_COMP_SWAP,
28         IB_WC_FETCH_ADD,
29         IB_WC_BIND_MW,
30 +       IB_WC_LSO,
31  /*
32   * Set value of IB_WC_RECV so consumers can test if a completion is a
33   * receive by testing (opcode & IB_WC_RECV).
34 @@ -621,7 +623,8 @@ enum ib_wr_opcode {
35         IB_WR_SEND_WITH_IMM,
36         IB_WR_RDMA_READ,
37         IB_WR_ATOMIC_CMP_AND_SWP,
38 -       IB_WR_ATOMIC_FETCH_AND_ADD
39 +       IB_WR_ATOMIC_FETCH_AND_ADD,
40 +       IB_WR_LSO
41  };
42  
43  enum ib_send_flags {
44 @@ -629,7 +632,8 @@ enum ib_send_flags {
45         IB_SEND_SIGNALED        = (1<<1),
46         IB_SEND_SOLICITED       = (1<<2),
47         IB_SEND_INLINE          = (1<<3),
48 -       IB_SEND_IP_CSUM         = (1<<4)
49 +       IB_SEND_IP_CSUM         = (1<<4),
50 +       IB_SEND_UDP_LSO         = (1<<5)
51  };
52  
53  struct ib_sge {
54 @@ -659,6 +663,9 @@ struct ib_send_wr {
55                 } atomic;
56                 struct {
57                         struct ib_ah *ah;
58 +                       void   *header;
59 +                       int     hlen;
60 +                       int     mss;
61                         u32     remote_qpn;
62                         u32     remote_qkey;
63                         u16     pkey_index; /* valid for GSI only */
64 -- 
65 1.5.3.8
66