]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
igb: check timestamp validity
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Wed, 3 Mar 2021 20:51:03 +0000 (12:51 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 19 Mar 2021 15:47:46 +0000 (08:47 -0700)
commitf0a03a026857d6c7766eb7d5835edbf5523ca15c
treee21a085692568a68b7b66ac6c57203af7fde531e
parenta75519a84855bca029ce7d8a27de9409d9b84956
igb: check timestamp validity

Add a couple of checks to make sure timestamping is on and that the
timestamp value from DMA is valid. This avoids any functional issues
that could come from a misinterpreted time stamp.

One of the functions changed doesn't need a return value added because
there was no value in checking from the calling locations.

While here, fix a couple of reverse christmas tree issues next to
the code being changed.

Fixes: f56e7bba22fa ("igb: Pull timestamp from fragment before adding it to skb")
Fixes: 9cbc948b5a20 ("igb: add XDP support")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igb/igb_ptp.c