From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: isubramanian-qTEPVZfXA3Y@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
patches-qTEPVZfXA3Y@public.gmane.org,
rapatel-qTEPVZfXA3Y@public.gmane.org,
kchudgar-qTEPVZfXA3Y@public.gmane.org
Subject: Re: [PATCH v6 4/4] drivers: net: Add APM X-Gene SoC ethernet driver support.
Date: Tue, 17 Jun 2014 13:20:24 -0700 (PDT) [thread overview]
Message-ID: <20140617.132024.1213369771856463527.davem@davemloft.net> (raw)
In-Reply-To: <CAKh23F=2undAW=nWibOreAM8DJiQKpLx=OboCX=fNZE+OU=AbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
From: Iyappan Subramanian <isubramanian-qTEPVZfXA3Y@public.gmane.org>
Date: Tue, 17 Jun 2014 12:21:08 -0700
> On Mon, Jun 16, 2014 at 9:42 PM, David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> wrote:
>> From: Iyappan Subramanian <isubramanian-qTEPVZfXA3Y@public.gmane.org>
>> Date: Mon, 16 Jun 2014 17:18:46 -0700
>>
>>> +static netdev_tx_t xgene_enet_start_xmit(struct sk_buff *skb,
>>> + struct net_device *ndev)
>>> +{
>>> + struct xgene_enet_pdata *pdata = netdev_priv(ndev);
>>> + struct xgene_enet_desc_ring *tx_ring = pdata->tx_ring;
>>> + struct xgene_enet_desc_ring *cp_ring = tx_ring->cp_ring;
>>> + u32 tx_level, cq_level;
>>> +
>>> + tx_level = xgene_enet_ring_len(tx_ring);
>>> + cq_level = xgene_enet_ring_len(cp_ring);
>>> + if (unlikely(tx_level > pdata->tx_qcnt_hi ||
>>> + cq_level > pdata->cp_qcnt_hi)) {
>>> + netif_stop_queue(ndev);
>>> + return NETDEV_TX_BUSY;
>>> + }
>>> +
>>> + if (xgene_enet_setup_tx_desc(tx_ring, skb))
>>> + return NETDEV_TX_OK;
>>
>> If you return NETDEV_TX_OK, it is your responsibility to deal with the
>> SKB, because you own it.
>>
>> In particular, you have to free the packet.
>
> skb freeing happens in xgene_enet_tx_completion().
You're not queueing up the packet when DMA mapping the packet fails,
which is the only condition that causes xgene_enet_setup_tx_desc() to
return an error, so xgene_enet_tx_completion() will not be called.
Can you really not see this?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-06-17 20:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 0:18 [PATCH v6 0/4] net: Add APM X-Gene SoC Ethernet driver support Iyappan Subramanian
2014-06-17 0:18 ` [PATCH v6 1/4] MAINTAINERS: Add entry for APM X-Gene SoC ethernet driver Iyappan Subramanian
2014-06-17 0:18 ` [PATCH v6 2/4] Documentation: dts: Add bindings " Iyappan Subramanian
2014-06-17 0:18 ` [PATCH v6 3/4] " Iyappan Subramanian
2014-06-17 0:18 ` [PATCH v6 4/4] drivers: net: Add APM X-Gene SoC ethernet driver support Iyappan Subramanian
[not found] ` <1402964326-11147-5-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2014-06-17 4:42 ` David Miller
[not found] ` <20140616.214247.1154200670003936158.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-06-17 19:21 ` Iyappan Subramanian
[not found] ` <CAKh23F=2undAW=nWibOreAM8DJiQKpLx=OboCX=fNZE+OU=AbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-17 19:24 ` Florian Fainelli
2014-06-17 20:07 ` Iyappan Subramanian
2014-06-17 20:20 ` David Miller [this message]
2014-06-18 23:46 ` Iyappan Subramanian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140617.132024.1213369771856463527.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=isubramanian-qTEPVZfXA3Y@public.gmane.org \
--cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kchudgar-qTEPVZfXA3Y@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=patches-qTEPVZfXA3Y@public.gmane.org \
--cc=rapatel-qTEPVZfXA3Y@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).