From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3A50DA0A03; Tue, 19 Jan 2021 08:20:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7B5A140D10; Tue, 19 Jan 2021 08:20:12 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 30A78140CC7 for ; Tue, 19 Jan 2021 08:20:11 +0100 (CET) IronPort-SDR: wdGt7jUDR8gutE7r2UoMlK7fZQTGzlL5v9+zXSqh/idHFvFQfqZ0bNj/xza5lylGpmZqSQT4EI KAXW/KBSA0lg== X-IronPort-AV: E=McAfee;i="6000,8403,9868"; a="178975804" X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="178975804" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 23:20:09 -0800 IronPort-SDR: QUiJfM3+j02lIoIGxy0Ny8WAJbPbG/e/kJy4jUDkFG2sPH2epSl9DLSOIB0xSvYS/nVyT81i5z 0jYERNOUSnuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="426369355" Received: from dpdk-yyzhang2.sh.intel.com ([10.67.117.129]) by orsmga001.jf.intel.com with ESMTP; 18 Jan 2021 23:20:07 -0800 From: Yuying Zhang To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Cc: haiyue.wang@intel.com, junfeng.guo@intel.com, Yuying Zhang Date: Tue, 19 Jan 2021 07:12:53 +0000 Message-Id: <20210119071253.259063-1-yuying.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1] net/ice/base: add ethertype offset for QinQ dummy pkt X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add the ethertype offset for QinQ switch rule dummy packet to allow matching the corresponding field. Signed-off-by: Yuying Zhang --- drivers/net/ice/base/ice_switch.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 692a147e6..641c582b6 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -1611,6 +1611,7 @@ static const u8 dummy_ipv6_l2tpv3_pkt[] = { static const struct ice_dummy_pkt_offsets dummy_qinq_ipv4_packet_offsets[] = { { ICE_MAC_OFOS, 0 }, + { ICE_ETYPE_OL, 12 }, { ICE_VLAN_EX, 14 }, { ICE_VLAN_OFOS, 18 }, { ICE_IPV4_OFOS, 22 }, @@ -1621,7 +1622,8 @@ static const u8 dummy_qinq_ipv4_pkt[] = { 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x00, + + 0x91, 0x00, /* ICE_ETYPE_OL 12 */ 0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */ 0x00, 0x00, 0x08, 0x00, /* ICE_VLAN_OFOS 18 */ @@ -1640,6 +1642,7 @@ static const u8 dummy_qinq_ipv4_pkt[] = { static const struct ice_dummy_pkt_offsets dummy_qinq_ipv6_packet_offsets[] = { { ICE_MAC_OFOS, 0 }, + { ICE_ETYPE_OL, 12 }, { ICE_VLAN_EX, 14 }, { ICE_VLAN_OFOS, 18 }, { ICE_IPV6_OFOS, 22 }, @@ -1650,7 +1653,8 @@ static const u8 dummy_qinq_ipv6_pkt[] = { 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x00, + + 0x91, 0x00, /* ICE_ETYPE_OL 12 */ 0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */ 0x00, 0x00, 0x86, 0xDD, /* ICE_VLAN_OFOS 18 */ @@ -1677,6 +1681,7 @@ static const u8 dummy_qinq_ipv6_pkt[] = { static const struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_offsets[] = { { ICE_MAC_OFOS, 0 }, + { ICE_ETYPE_OL, 12 }, { ICE_VLAN_EX, 14 }, { ICE_VLAN_OFOS, 18 }, { ICE_PPPOE, 22 }, @@ -1686,6 +1691,7 @@ static const struct ice_dummy_pkt_offsets dummy_qinq_pppoe_packet_offsets[] = { static const struct ice_dummy_pkt_offsets dummy_qinq_pppoe_ipv4_packet_offsets[] = { { ICE_MAC_OFOS, 0 }, + { ICE_ETYPE_OL, 12 }, { ICE_VLAN_EX, 14 }, { ICE_VLAN_OFOS, 18 }, { ICE_PPPOE, 22 }, @@ -1697,7 +1703,8 @@ static const u8 dummy_qinq_pppoe_ipv4_pkt[] = { 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x91, 0x00, + + 0x91, 0x00, /* ICE_ETYPE_OL 12 */ 0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */ 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 18 */ -- 2.25.1