[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140530180839.GA12172@arch.cereza>
Date: Fri, 30 May 2014 15:08:39 -0300
From: Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Gregory Clement <gregory.clement@...e-electrons.com>,
Lior Amsalem <alior@...vell.com>,
Tawfik Bayouk <tawfik@...vell.com>, fugang.duan@...escale.com,
Willy Tarreau <w@....eu>
Subject: Re: [PATCH 6/8] net: mv643xx_eth: Limit the TSO segments and adjust
stop/wake thresholds
Hi Eric,
On 30 May 10:21 AM, Eric Dumazet wrote:
> On Fri, 2014-05-30 at 13:40 -0300, Ezequiel Garcia wrote:
> >
> > -static int txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb)
> > +static int txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb,
> > + struct net_device *dev)
> > {
> > struct mv643xx_eth_private *mp = txq_to_mp(txq);
> > int nr_frags = skb_shinfo(skb)->nr_frags;
> > @@ -910,11 +918,15 @@ static int txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb)
> > cmd_sts = 0;
> > l4i_chk = 0;
> >
> > + if (txq->tx_ring_size - txq->tx_desc_count < MAX_SKB_FRAGS + 1) {
>
> I am not sure I understand this part.
>
> You have one skb here, so why are you using MAX_SKB_FRAGS ?
>
This check was moved around, so I'm blindly carrying it over.
You meant that I can directly use skb_shinfo(skb)->nr_frags, right?
> > + if (net_ratelimit())
> > + netdev_err(dev, "tx queue full?!\n");
> > + return -EBUSY;
> > + }
> > +
>
> Also it looks like this part will become dead after the following
> patch...
>
Indeed, I've kept it just for consistency. I had to return some error value
and EBUSY seems the most appropriate. Do you think I should change this?
Thanks for the feedback,
--
Ezequiel GarcĂa, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists