summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadoslaw Tyl <radoslawx.tyl@intel.com>2023-03-13 17:07:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-30 13:51:18 +0300
commit7714e744fe6da89c604d4d7524426c0aa25504d6 (patch)
tree25124bd18150a51c172f442b13c8f15af1c9bd22
parentf752ace58867de3c063512b21e0f1694fc27f043 (diff)
downloadlinux-7714e744fe6da89c604d4d7524426c0aa25504d6.tar.xz
i40e: fix flow director packet filter programming
[ Upstream commit c672297bbc0e86dbf88396b8053e2fbb173f16ff ] Initialize to zero structures to build a valid Tx Packet used for the filter programming. Fixes: a9219b332f52 ("i40e: VLAN field for flow director") Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 924f972b91fa..72b091f2509d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -171,10 +171,10 @@ static char *i40e_create_dummy_packet(u8 *dummy_packet, bool ipv4, u8 l4proto,
struct i40e_fdir_filter *data)
{
bool is_vlan = !!data->vlan_tag;
- struct vlan_hdr vlan;
- struct ipv6hdr ipv6;
- struct ethhdr eth;
- struct iphdr ip;
+ struct vlan_hdr vlan = {};
+ struct ipv6hdr ipv6 = {};
+ struct ethhdr eth = {};
+ struct iphdr ip = {};
u8 *tmp;
if (ipv4) {