ionic: simplify TSO descriptor mapping
authorShannon Nelson <snelson@pensando.io>
Tue, 16 Mar 2021 02:31:33 +0000 (19:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Mar 2021 04:27:06 +0000 (21:27 -0700)
commit5b039241fe3a31b67fbffb07082c6d9d972204f8
tree2f74b973187fed7c7bc2d72fdd61e34a84df3957
parent578ce0468f0b5ccc3771ce60fd77d408cd0f9b09
ionic: simplify TSO descriptor mapping

One issue with the original TSO code was that it was working too
hard to deal with skb layouts that were never going to show up,
such as an skb->data that was longer than a single descriptor's
length.  The other issue was trying to arrange the fragment dma
mapping at the same time as figuring out the descriptors needed.
There was just too much going on at the same time.

Now we do the dma mapping first, which sets up the buffers with
skb->data in buf[0] and the remaining frags in buf[1..n-1].
Next we spread the bufs across the descriptors needed, where
each descriptor gets up to mss number of bytes.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_dev.h
drivers/net/ethernet/pensando/ionic/ionic_txrx.c