Message ID | 20201017071238.95190-1-sven.auhagen@voleatech.de |
---|---|
Headers | show |
Series | igb: xdp patches followup | expand |
On Sat, Oct 17, 2020 at 09:12:38AM +0200, sven.auhagen@voleatech.de wrote: > From: Sven Auhagen <sven.auhagen@voleatech.de> > > Since we share the transmit queue with the slow path, > it is possible that we run into a transmit queue timeout. > This will reset the queue. > This happens under high load when the fast path is using the > transmit queue pretty much exclusively. I'm kinda not leaning towards slow/fast path distinction here, IMHO it would be better to state that transmit queues are shared between network stack and XDP, but that's just a rant. > > By setting the transmit queues trans_start variable to jiffies > in the two xdp xmit functions we avoid the timeout. Probably a few more words of explanation would help here, specifically I would say that netdev_start_xmit() sets trans_start to jiffies which is later utilized by dev_watchdog(), so to avoid timeout, let stack know that XDP xmit happened by bumping the trans_start within XDP Tx routines. > > Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de> > --- > drivers/net/ethernet/intel/igb/igb_main.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index 55e708f75187..4a082c06f48d 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -2916,6 +2916,8 @@ static int igb_xdp_xmit_back(struct igb_adapter *adapter, struct xdp_buff *xdp) > > nq = txring_txq(tx_ring); > __netif_tx_lock(nq, cpu); > + /* Avoid transmit queue timeout since we share it with the slow path */ > + nq->trans_start = jiffies; > ret = igb_xmit_xdp_ring(adapter, tx_ring, xdpf); > __netif_tx_unlock(nq); > > @@ -2948,6 +2950,9 @@ static int igb_xdp_xmit(struct net_device *dev, int n, > nq = txring_txq(tx_ring); > __netif_tx_lock(nq, cpu); > > + /* Avoid transmit queue timeout since we share it with the slow path */ > + nq->trans_start = jiffies; > + > for (i = 0; i < n; i++) { > struct xdp_frame *xdpf = frames[i]; > int err; > -- > 2.20.1 >
On Sat, Oct 17, 2020 at 09:12:32AM +0200, sven.auhagen@voleatech.de wrote: > From: Sven Auhagen <sven.auhagen@voleatech.de> > > This patch series addresses some of the comments that came back > after the igb XDP patch was accepted. > Most of it is code cleanup. > The last patch contains a fix for a tx queue timeout > that can occur when using xdp. > > Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de> Sorry for not getting back at v1 discussion, I took some time off. For the series: Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Couple nits: - you don't need SOB line within cover letter, I suppose - next time please specify the tree in the subject that you're targetting this set to land; is it net or net-next? net-next is currently closed so you probably would have to come back with this once it will be open again - SOB line should be at the end of tags within commit message of patch; I'm saying 'should' because I'm not sure if it's hard requirement. > > Change from v1: > * Drop patch 5 as the igb_rx_frame_truesize won't match > * Fix typo in comment > * Add Suggested-by and Reviewed-by tags > * Add how to avoid transmit queue timeout in xdp path > is fixed in the commit message > > Sven Auhagen (6): > igb: XDP xmit back fix error code > igb: take vlan double header into account > igb: XDP extack message on error > igb: skb add metasize for xdp > igb: use xdp_do_flush > igb: avoid transmit queue timeout in xdp path > > drivers/net/ethernet/intel/igb/igb.h | 5 ++++ > drivers/net/ethernet/intel/igb/igb_main.c | 32 +++++++++++++++-------- > 2 files changed, 26 insertions(+), 11 deletions(-) > > -- > 2.20.1 >
On Sun, 18 Oct 2020 15:39:51 +0200 Maciej Fijalkowski wrote: > - next time please specify the tree in the subject that you're targetting > this set to land; is it net or net-next? net-next is currently closed so > you probably would have to come back with this once it will be open > again Most of the patches here look like fixes, so we can take them into net but please repost them rather soon.
On Sun, Oct 18, 2020 at 03:39:51PM +0200, Maciej Fijalkowski wrote: > On Sat, Oct 17, 2020 at 09:12:32AM +0200, sven.auhagen@voleatech.de wrote: > > From: Sven Auhagen <sven.auhagen@voleatech.de> > > > > This patch series addresses some of the comments that came back > > after the igb XDP patch was accepted. > > Most of it is code cleanup. > > The last patch contains a fix for a tx queue timeout > > that can occur when using xdp. > > > > Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de> > > Sorry for not getting back at v1 discussion, I took some time off. > > For the series: > Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> > > Couple nits: > - you don't need SOB line within cover letter, I suppose > - next time please specify the tree in the subject that you're targetting > this set to land; is it net or net-next? net-next is currently closed so > you probably would have to come back with this once it will be open > again > - SOB line should be at the end of tags within commit message of patch; > I'm saying 'should' because I'm not sure if it's hard requirement. Thank you, I will fix that and send a v3. Best Sven > > > > > Change from v1: > > * Drop patch 5 as the igb_rx_frame_truesize won't match > > * Fix typo in comment > > * Add Suggested-by and Reviewed-by tags > > * Add how to avoid transmit queue timeout in xdp path > > is fixed in the commit message > > > > Sven Auhagen (6): > > igb: XDP xmit back fix error code > > igb: take vlan double header into account > > igb: XDP extack message on error > > igb: skb add metasize for xdp > > igb: use xdp_do_flush > > igb: avoid transmit queue timeout in xdp path > > > > drivers/net/ethernet/intel/igb/igb.h | 5 ++++ > > drivers/net/ethernet/intel/igb/igb_main.c | 32 +++++++++++++++-------- > > 2 files changed, 26 insertions(+), 11 deletions(-) > > > > -- > > 2.20.1 > >
On Sun, Oct 18, 2020 at 12:03:36PM -0700, Jakub Kicinski wrote: > On Sun, 18 Oct 2020 15:39:51 +0200 Maciej Fijalkowski wrote: > > - next time please specify the tree in the subject that you're targetting > > this set to land; is it net or net-next? net-next is currently closed so > > you probably would have to come back with this once it will be open > > again > > Most of the patches here look like fixes, so we can take them into net > but please repost them rather soon. I will repost them today. Best Sven