Commit e15d3f97 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Zheng Zengkai
Browse files

igb: check timestamp validity



stable inclusion
from stable-5.10.27
commit 2330d46db081367db6b20161ed280b5024799fe8
bugzilla: 51493

--------------------------------

[ Upstream commit f0a03a02 ]

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: f56e7bba ("igb: Pull timestamp from fragment before adding it to skb")
Fixes: 9cbc948b ("igb: add XDP support")
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarDave Switzer <david.switzer@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 0f36ca6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment