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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html