diff options
author | Michal Kalderon <Michal.Kalderon@cavium.com> | 2017-10-09 11:37:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-09 19:21:27 +0200 |
commit | d531038eeb6dd25dbf88402f932bf0ea524de82e (patch) | |
tree | e71480534ce56c479a449629c7223f5cf1a0650e /drivers/net/ethernet/qlogic/qed/qed_iwarp.h | |
parent | qed: Add unaligned and packed packet processing (diff) | |
download | linux-d531038eeb6dd25dbf88402f932bf0ea524de82e.tar.xz linux-d531038eeb6dd25dbf88402f932bf0ea524de82e.zip |
qed: Add support for freeing two ll2 buffers for corner cases
When posting a packet on the ll2 tx, we can provide a cookie that
will be returned upon tx completion. This cookie is the ll2 iwarp buffer
which is then reposted to the rx ring. Part of the unaligned mpa flow
is determining when a buffer can be reposted. Each buffer needs to be
sent only once as a cookie for on the tx ring. In packed fpdu case, only
the last packet will be sent with the buffer, meaning we need to handle the
case that a cookie can be NULL on tx complete. In addition, when a fpdu
splits over two buffers, but there are no more fpdus on the second buffer,
two buffers need to be provided as a cookie. To avoid changing the ll2
interface to provide two cookies, we introduce a piggy buf pointer,
relevant for iWARP only, that holds a pointer to a second buffer that
needs to be released during tx completion.
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>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_iwarp.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h index 858755cafd2b..58db51af26bd 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h @@ -55,6 +55,7 @@ enum qed_iwarp_qp_state qed_roce2iwarp_state(enum qed_roce_qp_state state); #define QED_IWARP_HANDLE_INVAL (0xff) struct qed_iwarp_ll2_buff { + struct qed_iwarp_ll2_buff *piggy_buf; void *data; dma_addr_t data_phys_addr; u32 buff_size; |