]> 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)
commitbf7323de1cda5b5dfd3aa78076a7f03731b09fea
tree2f74b973187fed7c7bc2d72fdd61e34a84df3957
parent26fc4291a1e45a122fc83aa2eff771da46f21b4d
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