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:	Sun, 16 Nov 2014 21:40:23 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Govindarajulu Varadarajan <_govind@....com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org, ssujith@...co.com,
	benve@...co.com
Subject: Re: [PATCH net-next] enic: support skb->xmit_more

On Mon, 2014-11-17 at 04:34 +0530, Govindarajulu Varadarajan wrote:
> Update posted_index only when skb->xmit_more is 0 or tx queue is full.
> 
> Signed-off-by: Govindarajulu Varadarajan <_govind@....com>
> ---
>  drivers/net/ethernet/cisco/enic/enic_main.c |  8 ++++++--
>  drivers/net/ethernet/cisco/enic/vnic_wq.h   | 20 +++++++++++---------
>  2 files changed, 17 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
> index 5afe360..52bccfd 100644
> --- a/drivers/net/ethernet/cisco/enic/enic_main.c
> +++ b/drivers/net/ethernet/cisco/enic/enic_main.c
> @@ -533,6 +533,7 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
>  	struct vnic_wq *wq;
>  	unsigned long flags;
>  	unsigned int txq_map;
> +	struct netdev_queue *txq;
>  
>  	if (skb->len <= 0) {
>  		dev_kfree_skb_any(skb);
> @@ -541,6 +542,7 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
>  
>  	txq_map = skb_get_queue_mapping(skb) % enic->wq_count;
>  	wq = &enic->wq[txq_map];
> +	txq = netdev_get_tx_queue(netdev, skb_get_queue_mapping(skb));
>  

This is strange.

Why dont you use instead :


txq = netdev_get_tx_queue(netdev, txq_map);


>  	/* Non-TSO sends must fit within ENIC_NON_TSO_MAX_DESC descs,
>  	 * which is very likely.  In the off chance it's going to take
> @@ -558,7 +560,7 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
>  
>  	if (vnic_wq_desc_avail(wq) <
>  	    skb_shinfo(skb)->nr_frags + ENIC_DESC_MAX_SPLITS) {
> -		netif_tx_stop_queue(netdev_get_tx_queue(netdev, txq_map));

See here ? Its not equivalent to previous code.

> +		netif_tx_stop_queue(txq);
>  		/* This is a hard error, log it */
>  		netdev_err(netdev, "BUG! Tx ring full when queue awake!\n");



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