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]
Date:	Mon, 23 Nov 2009 10:52:21 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	simon.kagstrom@...insight.net
Cc:	netdev@...r.kernel.org, davej@...hat.com, shemminger@...tta.com,
	romieu@...zoreil.com
Subject: Re: [PATCH v2 5/7] via-velocity: Re-enable transmit scatter-gather
 support

From: Simon Kagstrom <simon.kagstrom@...insight.net>
Date: Mon, 23 Nov 2009 15:31:33 +0100

> @@ -2543,14 +2546,27 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb,
>  	struct velocity_td_info *tdinfo;
>  	unsigned long flags;
>  	int pktlen;
> -	__le16 len;
> -	int index;
> +	int index, prev;
> +	int i = 0;
>  
>  	if (skb_padto(skb, ETH_ZLEN))
>  		goto out;
> -	pktlen = max_t(unsigned int, skb->len, ETH_ZLEN);
>  
> -	len = cpu_to_le16(pktlen);
> +	/* The hardware can handle at most 7 memory segments, so merge
> +	 * the skb if there are more */
> +	if (skb_shinfo(skb)->nr_frags > 6 && __skb_linearize(skb)) {
> +		kfree_skb(skb);
> +		return 0;
> +	}

Zero is not a valid return value for this function.  It returns
a "netdev_tx_t" defined as follows in linux/netdevice.h:

enum netdev_tx {
	__NETDEV_TX_MIN	 = INT_MIN,	/* make sure enum is signed */
	NETDEV_TX_OK	 = 0x00,	/* driver took care of packet */
	NETDEV_TX_BUSY	 = 0x10,	/* driver tx path was busy*/
	NETDEV_TX_LOCKED = 0x20,	/* driver tx lock was already taken */
};
typedef enum netdev_tx netdev_tx_t;
--
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