Subject: Re: [PATCH 1/2] rps: core implementation

From: Jarek Poplawski <[email-masked]>
Date: Tue, 17 Nov 2009 22:32:02 +0100

Tom Herbert wrote, On 11/11/2009 07:53 AM:

> Third version of RPS.
> 
> Signed-off-by: Tom Herbert <[email-masked]>
...
> +static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb)
> +{
> +	u32 addr1, addr2, ports;
> +	struct ipv6hdr *ip6;
> +	struct iphdr *ip;
> +	u32 hash, ihl;
> +	u8 ip_proto;
> +	int cpu;
> +	struct rps_map *map = NULL;
> +
> +	if (dev->rps_num_maps) {
> +		/*
> +		 * Locate the map corresponding to the NAPI queue that
> +		 * the packet was received on.
> +		 */
> +		int index = skb_get_rx_queue(skb);
> +		if (index < 0 || index >= dev->rps_num_maps)

skb_get_rx_queue() returns u16, so 'index < 0' seems wrong here.

Jarek P.