From: Yuying Zhang <yuying.zhang@intel.com>
To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com
Cc: haiyue.wang@intel.com, junfeng.guo@intel.com,
Yuying Zhang <yuying.zhang@intel.com>
Subject: [dpdk-dev] [PATCH v1] net/ice/base: add ethertype offset for QinQ dummy pkt
Date: Tue, 19 Jan 2021 07:12:53 +0000 [thread overview]
Message-ID: <20210119071253.259063-1-yuying.zhang@intel.com> (raw)
Add the ethertype offset for QinQ switch rule dummy packet to
allow matching the corresponding field.
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
---
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
next reply other threads:[~2021-01-19 7:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 7:12 Yuying Zhang [this message]
2021-01-22 2:47 ` Zhang, Qi Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210119071253.259063-1-yuying.zhang@intel.com \
--to=yuying.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=haiyue.wang@intel.com \
--cc=junfeng.guo@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).