diff options
author | Faisal Latif <faisal.latif@intel.com> | 2011-09-25 21:34:00 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-10-10 13:54:47 -0400 |
commit | 0f0bee8bbc2b3e49baa703118041f99db9ef41a1 (patch) | |
tree | 3a4598c74f2dcab76fcf8a6cb3d533f8582bf613 /drivers/infiniband/hw/nes/nes_cm.c | |
parent | 6224c7eeff586e9dbf51b872d7e0bae291fa00ed (diff) |
RDMA/nes: Support for Packed And Unaligned fpdus
Support for Packed and Unaligned (PAU) FPDUs is needed for
interoperability between NES and non-NES nodes. When the NES hardware
detects a PAU frame, it will pass it to the driver to process the
frame. NES driver creates a new frame for each FPDU and forwards it
to the hardware to be sent to its associated qp.
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Faisal Latif <Faisal.Latif@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_cm.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index c118663e4437..401b7bb828d0 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -159,6 +159,15 @@ atomic_t cm_connecteds; | |||
159 | atomic_t cm_connect_reqs; | 159 | atomic_t cm_connect_reqs; |
160 | atomic_t cm_rejects; | 160 | atomic_t cm_rejects; |
161 | 161 | ||
162 | int nes_add_ref_cm_node(struct nes_cm_node *cm_node) | ||
163 | { | ||
164 | return add_ref_cm_node(cm_node); | ||
165 | } | ||
166 | |||
167 | int nes_rem_ref_cm_node(struct nes_cm_node *cm_node) | ||
168 | { | ||
169 | return rem_ref_cm_node(cm_node->cm_core, cm_node); | ||
170 | } | ||
162 | 171 | ||
163 | /** | 172 | /** |
164 | * create_event | 173 | * create_event |
@@ -2331,9 +2340,13 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, | |||
2331 | } | 2340 | } |
2332 | add_ref_cm_node(cm_node); | 2341 | add_ref_cm_node(cm_node); |
2333 | } else if (cm_node->state == NES_CM_STATE_TSA) { | 2342 | } else if (cm_node->state == NES_CM_STATE_TSA) { |
2334 | rem_ref_cm_node(cm_core, cm_node); | 2343 | if (cm_node->nesqp->pau_mode) |
2335 | atomic_inc(&cm_accel_dropped_pkts); | 2344 | nes_queue_mgt_skbs(skb, nesvnic, cm_node->nesqp); |
2336 | dev_kfree_skb_any(skb); | 2345 | else { |
2346 | rem_ref_cm_node(cm_core, cm_node); | ||
2347 | atomic_inc(&cm_accel_dropped_pkts); | ||
2348 | dev_kfree_skb_any(skb); | ||
2349 | } | ||
2337 | break; | 2350 | break; |
2338 | } | 2351 | } |
2339 | skb_reset_network_header(skb); | 2352 | skb_reset_network_header(skb); |