Skip to content

Commit 529cdfd

Browse files
emuslndavem330
authored andcommitted
ionic: expand the descriptor bufs array
When processing a TSO we may have frags spread across several descriptors, and the total count of frags in one skb may exceed our per descriptor IONIC_MAX_FRAGS: this is fine as long as each descriptor has fewer frags than the limit. Since the skb could have as many as MAX_SKB_FRAGS, and the first descriptor is where we track and map the frag buffers, we need to be sure we can map buffers for all of the frags plus the TSO header in the first descriptor's buffer array. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 40d8353 commit 529cdfd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/net/ethernet/pensando/ionic/ionic_dev.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/atomic.h>
88
#include <linux/mutex.h>
99
#include <linux/workqueue.h>
10+
#include <linux/skbuff.h>
1011

1112
#include "ionic_if.h"
1213
#include "ionic_regs.h"
@@ -216,7 +217,7 @@ struct ionic_desc_info {
216217
};
217218
unsigned int bytes;
218219
unsigned int nbufs;
219-
struct ionic_buf_info bufs[IONIC_MAX_FRAGS];
220+
struct ionic_buf_info bufs[MAX_SKB_FRAGS + 1];
220221
ionic_desc_cb cb;
221222
void *cb_arg;
222223
};

0 commit comments

Comments
 (0)