net/ice/base: fix QinQ PPPoE dummy packet selection
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 13 Apr 2021 05:06:38 +0000 (13:06 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 13 Apr 2021 14:25:27 +0000 (16:25 +0200)
The dummy packet should be QinQ PPPoE ipv6 when ppp protocol is ipv6.

Fixes: bb3386f348dd ("net/ice: enable QinQ filter for switch")
Cc: stable@dpdk.org
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_switch.c

index 763c7b8..a567b6d 100644 (file)
@@ -7808,6 +7808,11 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
                *pkt_len = sizeof(dummy_qinq_pppoe_ipv4_pkt);
                *offsets = dummy_qinq_pppoe_ipv4_packet_offsets;
                return;
+       } else if (tun_type == ICE_SW_TUN_PPPOE_QINQ && ipv6) {
+               *pkt = dummy_qinq_pppoe_ipv6_packet;
+               *pkt_len = sizeof(dummy_qinq_pppoe_ipv6_packet);
+               *offsets = dummy_qinq_pppoe_packet_offsets;
+               return;
        } else if (tun_type == ICE_SW_TUN_PPPOE_QINQ ||
                        tun_type == ICE_SW_TUN_PPPOE_PAY_QINQ) {
                *pkt = dummy_qinq_pppoe_ipv4_pkt;