qed: Fix MPA unalign flow in case header is split across two packets.
authorMichal Kalderon <Michal.Kalderon@cavium.com>
Wed, 14 Mar 2018 12:49:27 +0000 (14:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Mar 2018 16:13:50 +0000 (12:13 -0400)
There is a corner case in the MPA unalign flow where a FPDU header is
split over two tcp segments. The length of the first fragment in this
case was not initialized properly and should be '1'

Fixes: c7d1d839 ("qed: Add support for MPA header being split over two tcp packets")
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_iwarp.c

index ca4a81dc1ace685f4bb1cda85dc0e85746b4583a..fefe5277f20d87e6b874e9ecb0a75b98d2b3ba1a 100644 (file)
@@ -1928,8 +1928,8 @@ qed_iwarp_update_fpdu_length(struct qed_hwfn *p_hwfn,
                /* Missing lower byte is now available */
                mpa_len = fpdu->fpdu_length | *mpa_data;
                fpdu->fpdu_length = QED_IWARP_FPDU_LEN_WITH_PAD(mpa_len);
-               fpdu->mpa_frag_len = fpdu->fpdu_length;
                /* one byte of hdr */
+               fpdu->mpa_frag_len = 1;
                fpdu->incomplete_bytes = fpdu->fpdu_length - 1;
                DP_VERBOSE(p_hwfn,
                           QED_MSG_RDMA,