mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: isubramanian@apm.com
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, jcm@redhat.com,
	patches@apm.com, rapatel@apm.com, kchudgar@apm.com
Subject: Re: [PATCH v6 4/4] drivers: net: Add APM X-Gene SoC ethernet driver support.
Date: Mon, 16 Jun 2014 21:42:47 -0700 (PDT)	[thread overview]
Message-ID: <20140616.214247.1154200670003936158.davem@davemloft.net> (raw)
In-Reply-To: <1402964326-11147-5-git-send-email-isubramanian@apm.com>

From: Iyappan Subramanian <isubramanian@apm.com>
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.

  reply	other threads:[~2014-06-17  4:42 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 " 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
2014-06-17  4:42   ` David Miller [this message]
2014-06-17 19:21     ` Iyappan Subramanian
2014-06-17 19:24       ` Florian Fainelli
2014-06-17 20:07         ` Iyappan Subramanian
2014-06-17 20:20       ` David Miller
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=20140616.214247.1154200670003936158.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=isubramanian@apm.com \
    --cc=jcm@redhat.com \
    --cc=kchudgar@apm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@apm.com \
    --cc=rapatel@apm.com \
    /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

all inboxes | Powered by JetHome®