From: Chien Tung Date: Fri, 21 Mar 2008 00:55:30 +0000 (-0500) Subject: RDMA/nes: Fix MSS calculation on RDMA path X-Git-Tag: v2.6.25-rc7~29^2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f2b2b59b93082d02ee5ec8fda4ed94f498551a47;p=~shefty%2Frdma-dev.git RDMA/nes: Fix MSS calculation on RDMA path Fix the calculation of the MSS for RDMA connections: we need to allow space in frames for a VLAN tag too. Signed-off-by: Chien Tung Signed-off-by: Glenn Streiff Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 39adb267fb1..0bef878e0f6 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -1072,7 +1073,7 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, ts = current_kernel_time(); cm_node->tcp_cntxt.loc_seq_num = htonl(ts.tv_nsec); cm_node->tcp_cntxt.mss = nesvnic->max_frame_size - sizeof(struct iphdr) - - sizeof(struct tcphdr) - ETH_HLEN; + sizeof(struct tcphdr) - ETH_HLEN - VLAN_HLEN; cm_node->tcp_cntxt.rcv_nxt = 0; /* get a unique session ID , add thread_id to an upcounter to handle race */ atomic_inc(&cm_core->node_cnt);