OSDN Git Service

qed: Add unaligned and packed packet processing
authorMichal Kalderon <Michal.Kalderon@cavium.com>
Mon, 9 Oct 2017 09:37:51 +0000 (12:37 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Oct 2017 17:21:26 +0000 (10:21 -0700)
commit469981b17a4f8ddac91837bd74ebc98578f2ddbf
tree444e8ddd9f7a2fd4db04e68600c86dcecb3e3994
parentfcb39f6c10b24d2d16d4c2bdb4c256bc21b8a131
qed: Add unaligned and packed packet processing

The fpdu data structure is preallocated per connection.
Each connection stores the current status of the connection:
either nothing pending, or there is a partial fpdu that is waiting for
the rest of the fpdu (incomplete bytes != 0).
The same structure is also used for splitting a packet when there are
packed fpdus. The structure is initialized with all data required
for sending the fpdu back to the FW. A fpdu will always be spanned across
a maximum of 3 tx bds. One for the header, one for the partial fdpu
received and one for the remainder (unaligned) packet.
In case of packed fpdu's, two fragments are used, one for the header
and one for the data.
Corner cases are not handled in the patch for clarity, and will be added
as a separate patch.

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
drivers/net/ethernet/qlogic/qed/qed_iwarp.h