]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb023048434fd9760e4baa53f48af29b276511298
tree2f74b973187fed7c7bc2d72fdd61e34a84df3957
parenta7fdf83181e8c65105dac2f5000297ba1662c2e5
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