Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1482554

Re: [PATCH net-next 1/2] net: mvneta: add xmit_more support

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH net-next 1/2] net: mvneta: add xmit_more support
Date 2016-09-13 16:50 +0200
Message-ID <sgXc6-3cQ-25@gated-at.bofh.it> (permalink)
References <sgQ0W-6Y0-7@gated-at.bofh.it> <sgQ0W-6Y0-5@gated-at.bofh.it> <sgX2q-39g-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2016-09-13 at 07:33 -0700, Eric Dumazet wrote:

> Hi Marcin
> 
> Well, given the above comment, and fact that MVNETA_MAX_TXD == 532, it
> looks like you might add a bug if more than 256 skb are given to your
> ndo_start_xmit() with skb->xmit_more = 1
> 
> I therefore suggest you make sure it does not happen.
> 
> txq->pending += frags;
> if (!skb->xmit_more ||
>     txq->pending > 256 - MVNETA_MAX_SKB_DESCS ||
>     netif_xmit_stopped(nq))
> 	mvneta_txq_pend_desc_add(pp, txq)
> 

Another solution would be to test the potential overflow in mvneta_tx()
and force a mvneta_txq_pend_desc_add(pp, txq) _before_ adding the desc
of the "about to be cooked" TSO packet.

(This is because MVNETA_MAX_SKB_DESCS is 217, so 255-217 leaves few room
for xmit_more to show its power)

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH net-next 1/2] net: mvneta: add xmit_more support Marcin Wojtas <mw@semihalf.com> - 2016-09-13 09:10 +0200
  Re: [PATCH net-next 1/2] net: mvneta: add xmit_more support Eric Dumazet <eric.dumazet@gmail.com> - 2016-09-13 16:40 +0200
    Re: [PATCH net-next 1/2] net: mvneta: add xmit_more support Eric Dumazet <eric.dumazet@gmail.com> - 2016-09-13 16:50 +0200

csiph-web