lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140616.214247.1154200670003936158.davem@davemloft.net>
Date:	Mon, 16 Jun 2014 21:42:47 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	isubramanian@....com
Cc:	netdev@...r.kernel.org, devicetree@...r.kernel.org,
	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, jcm@...hat.com,
	patches@....com, rapatel@....com, kchudgar@....com
Subject: Re: [PATCH v6 4/4] drivers: net: Add APM X-Gene SoC ethernet
 driver support.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ