The dummy packet for GRE had ICE_VXLAN instead of ICE_NVGRE listed in the offsets so change that to be correct. The dummy packet itself had some text to indicate VXLAN also so I changed that to just be GRE since it really wasn't VXLAN.
Fixes: 5e81d85ff066 ("net/ice/base: enable additional switch rules") Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell...@intel.com> Signed-off-by: Leyi Rong <leyi.r...@intel.com> --- drivers/net/ice/base/ice_switch.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 2e1dbfe42..dbf4c5fb0 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -53,13 +53,16 @@ static const u8 dummy_eth_header[DUMMY_ETH_HDR_LEN] = { 0x2, 0, 0, 0, 0, 0, sizeof(((struct ice_sw_rule_vsi_list *)0)->vsi) + \ ((n) * sizeof(((struct ice_sw_rule_vsi_list *)0)->vsi))) -static const struct ice_dummy_pkt_offsets { +struct ice_dummy_pkt_offsets { enum ice_protocol_type type; u16 offset; /* ICE_PROTOCOL_LAST indicates end of list */ -} dummy_gre_packet_offsets[] = { +}; + +static const +struct ice_dummy_pkt_offsets dummy_gre_packet_offsets[] = { { ICE_MAC_OFOS, 0 }, { ICE_IPV4_OFOS, 14 }, - { ICE_VXLAN, 34 }, + { ICE_NVGRE, 34 }, { ICE_MAC_IL, 42 }, { ICE_IPV4_IL, 54 }, { ICE_PROTOCOL_LAST, 0 }, @@ -75,7 +78,7 @@ u8 dummy_gre_packet[] = { 0, 0, 0, 0, /* ICE_MAC_OFOS 0 */ 0, 0x2F, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0x80, 0, 0x65, 0x58, /* ICE_VXLAN_GRE 34 */ + 0x80, 0, 0x65, 0x58, /* ICE_NVGRE 34 */ 0, 0, 0, 0, 0, 0, 0, 0, /* ICE_MAC_IL 42 */ 0, 0, 0, 0, @@ -5380,6 +5383,9 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt, case ICE_SCTP_IL: len = sizeof(struct ice_sctp_hdr); break; + case ICE_NVGRE: + len = sizeof(struct ice_nvgre); + break; case ICE_VXLAN: case ICE_GENEVE: case ICE_VXLAN_GPE: -- 2.17.1