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] [day] [month] [year] [list]
Date:	Tue, 29 Nov 2011 11:43:35 +0200
From:	"Dmitry Kravkov" <dmitry@...adcom.com>
To:	"Tom Herbert" <therbert@...gle.com>
cc:	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v4 09/10] bnx2x: Support for byte queue limits

On Mon, 2011-11-28 at 18:33 -0800, Tom Herbert wrote:
> Changes to bnx2x to use byte queue limits.
> 
> Signed-off-by: Tom Herbert <therbert@...gle.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |   26 +++++++++++++++++++---
>  1 files changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> index 8336c78..42ce566 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> @@ -102,7 +102,8 @@ int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */
>   * return idx of last bd freed
>   */
>  static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
> -			     u16 idx)
> +			     u16 idx, unsigned int *pkts_compl,
> +			     unsigned int *bytes_compl)
>  {
>  	struct sw_tx_bd *tx_buf = &txdata->tx_buf_ring[idx];
>  	struct eth_tx_start_bd *tx_start_bd;
> @@ -159,6 +160,10 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
>  
>  	/* release skb */
>  	WARN_ON(!skb);
> +	if (skb) {
likely statement will be usefull here, since we don't expect it to be
null

> +		(*pkts_compl)++;
> +		(*bytes_compl) += skb->len;
> +	}



--
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