From: David Miller Subject: Re: [PATCH net-next,v2] hyperv: Add handling of IP header with option field in netvsc_set_hash() Date: Tue, 14 Oct 2014 17:37:17 -0400 (EDT) Message-ID: <20141014.173717.1412701736631211553.davem@davemloft.net> References: <1413324988-8863-1-git-send-email-haiyangz@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: olaf@aepfle.de, netdev@vger.kernel.org, jasowang@redhat.com, driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org To: haiyangz@microsoft.com Return-path: In-Reply-To: <1413324988-8863-1-git-send-email-haiyangz@microsoft.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org From: Haiyang Zhang Date: Tue, 14 Oct 2014 15:16:28 -0700 > In case that the IP header has optional field at the end, this patch will > get the port numbers after that field, and compute the hash. > > Signed-off-by: Haiyang Zhang > Reviewed-by: K. Y. Srinivasan Instead of adding hack after hack after hack to your internal header parser, just use the generic flow dissector we already have in the kernel to fetch out the values you need. __skb_flow_get_ports() etc.