fm10k: Modify tunnel length header check when offloading
authorMatthew Vick <matthew.vick@intel.com>
Thu, 29 Jan 2015 07:17:22 +0000 (07:17 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 3 Mar 2015 09:07:21 +0000 (01:07 -0800)
commit8c1a90aa497dc4e2f971028c4484566629757357
treef32bb06ba0904ef78696b6f9ee035df82822b844
parentb898441f4ece44933af90b116b467f7864dd1ae7
fm10k: Modify tunnel length header check when offloading

The FM10000 host interface can only support up to 184 bytes when
performing tunnel offloads. Because of this, a check was added to
prevent the driver from attempting to feed a header to the hardware too
big for it to parse. Make this check a little more robust by calculating
the inner L4 header length based on whether it is TCP or UDP.

Cc: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_main.c
drivers/net/ethernet/intel/fm10k/fm10k_type.h