From: Junfeng Guo <junfeng.guo@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, junfeng.guo@intel.com
Subject: [PATCH v3 2/3] net/iavf: align with proto hdr struct change
Date: Fri, 8 Apr 2022 17:12:17 +0800 [thread overview]
Message-ID: <20220408091218.240922-3-junfeng.guo@intel.com> (raw)
In-Reply-To: <20220408091218.240922-1-junfeng.guo@intel.com>
Structure virtchnl_proto_headrs is extended with a union struct for
proto_hdr table and raw struct. Thus update the proto_hdrs template
init to align the virtchnl changes.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
drivers/net/iavf/iavf_hash.c | 180 ++++++++++++++++++-----------------
1 file changed, 92 insertions(+), 88 deletions(-)
diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index f35a07653b..278e75117d 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -181,252 +181,256 @@ iavf_hash_parse_pattern_action(struct iavf_adapter *ad,
/* proto_hdrs template */
struct virtchnl_proto_hdrs outer_ipv4_tmplt = {
TUNNEL_LEVEL_OUTER, 4,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4}}
};
struct virtchnl_proto_hdrs outer_ipv4_udp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
- proto_hdr_ipv4_with_prot,
- proto_hdr_udp}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv4_with_prot,
+ proto_hdr_udp}}
};
struct virtchnl_proto_hdrs outer_ipv4_tcp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
- proto_hdr_ipv4_with_prot,
- proto_hdr_tcp}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv4_with_prot,
+ proto_hdr_tcp}}
};
struct virtchnl_proto_hdrs outer_ipv4_sctp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4,
- proto_hdr_sctp}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4,
+ proto_hdr_sctp}}
};
struct virtchnl_proto_hdrs outer_ipv6_tmplt = {
TUNNEL_LEVEL_OUTER, 4,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6}}
};
struct virtchnl_proto_hdrs outer_ipv6_frag_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
- proto_hdr_ipv6, proto_hdr_ipv6_frag}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv6, proto_hdr_ipv6_frag}}
};
struct virtchnl_proto_hdrs outer_ipv6_udp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
- proto_hdr_ipv6_with_prot,
- proto_hdr_udp}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv6_with_prot,
+ proto_hdr_udp}}
};
struct virtchnl_proto_hdrs outer_ipv6_tcp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
- proto_hdr_ipv6_with_prot,
- proto_hdr_tcp}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan,
+ proto_hdr_ipv6_with_prot,
+ proto_hdr_tcp}}
};
struct virtchnl_proto_hdrs outer_ipv6_sctp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6,
- proto_hdr_sctp}
+ {{proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6,
+ proto_hdr_sctp}}
};
struct virtchnl_proto_hdrs inner_ipv4_tmplt = {
- TUNNEL_LEVEL_INNER, 1, {proto_hdr_ipv4}
+ TUNNEL_LEVEL_INNER, 1, {{proto_hdr_ipv4}}
};
struct virtchnl_proto_hdrs inner_ipv4_udp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4_with_prot, proto_hdr_udp}
+ TUNNEL_LEVEL_INNER, 2, {{proto_hdr_ipv4_with_prot, proto_hdr_udp}}
};
struct virtchnl_proto_hdrs inner_ipv4_tcp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4_with_prot, proto_hdr_tcp}
+ TUNNEL_LEVEL_INNER, 2, {{proto_hdr_ipv4_with_prot, proto_hdr_tcp}}
};
struct virtchnl_proto_hdrs second_inner_ipv4_tmplt = {
- 2, 1, {proto_hdr_ipv4}
+ 2, 1, {{proto_hdr_ipv4}}
};
struct virtchnl_proto_hdrs second_inner_ipv4_udp_tmplt = {
- 2, 2, {proto_hdr_ipv4_with_prot, proto_hdr_udp}
+ 2, 2, {{proto_hdr_ipv4_with_prot, proto_hdr_udp}}
};
struct virtchnl_proto_hdrs second_inner_ipv4_tcp_tmplt = {
- 2, 2, {proto_hdr_ipv4_with_prot, proto_hdr_tcp}
+ 2, 2, {{proto_hdr_ipv4_with_prot, proto_hdr_tcp}}
};
struct virtchnl_proto_hdrs second_inner_ipv6_tmplt = {
- 2, 1, {proto_hdr_ipv6}
+ 2, 1, {{proto_hdr_ipv6}}
};
struct virtchnl_proto_hdrs second_inner_ipv6_udp_tmplt = {
- 2, 2, {proto_hdr_ipv6_with_prot, proto_hdr_udp}
+ 2, 2, {{proto_hdr_ipv6_with_prot, proto_hdr_udp}}
};
struct virtchnl_proto_hdrs second_inner_ipv6_tcp_tmplt = {
- 2, 2, {proto_hdr_ipv6_with_prot, proto_hdr_tcp}
+ 2, 2, {{proto_hdr_ipv6_with_prot, proto_hdr_tcp}}
};
struct virtchnl_proto_hdrs inner_ipv4_sctp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4, proto_hdr_sctp}
+ TUNNEL_LEVEL_INNER, 2, {{proto_hdr_ipv4, proto_hdr_sctp}}
};
struct virtchnl_proto_hdrs inner_ipv6_tmplt = {
- TUNNEL_LEVEL_INNER, 1, {proto_hdr_ipv6}
+ TUNNEL_LEVEL_INNER, 1, {{proto_hdr_ipv6}}
};
struct virtchnl_proto_hdrs inner_ipv6_udp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6_with_prot, proto_hdr_udp}
+ TUNNEL_LEVEL_INNER, 2, {{proto_hdr_ipv6_with_prot, proto_hdr_udp}}
};
struct virtchnl_proto_hdrs inner_ipv6_tcp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6_with_prot, proto_hdr_tcp}
+ TUNNEL_LEVEL_INNER, 2, {{proto_hdr_ipv6_with_prot, proto_hdr_tcp}}
};
struct virtchnl_proto_hdrs inner_ipv6_sctp_tmplt = {
- TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6, proto_hdr_sctp}
+ TUNNEL_LEVEL_INNER, 2, {{proto_hdr_ipv6, proto_hdr_sctp}}
};
struct virtchnl_proto_hdrs ipv4_esp_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv4, proto_hdr_esp}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv4, proto_hdr_esp}}
};
struct virtchnl_proto_hdrs ipv4_udp_esp_tmplt = {
TUNNEL_LEVEL_OUTER, 3,
- {proto_hdr_ipv4, proto_hdr_udp, proto_hdr_esp}
+ {{proto_hdr_ipv4, proto_hdr_udp, proto_hdr_esp}}
};
struct virtchnl_proto_hdrs ipv4_ah_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv4, proto_hdr_ah}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv4, proto_hdr_ah}}
};
struct virtchnl_proto_hdrs ipv6_esp_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv6, proto_hdr_esp}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv6, proto_hdr_esp}}
};
struct virtchnl_proto_hdrs ipv6_udp_esp_tmplt = {
TUNNEL_LEVEL_OUTER, 3,
- {proto_hdr_ipv6, proto_hdr_udp, proto_hdr_esp}
+ {{proto_hdr_ipv6, proto_hdr_udp, proto_hdr_esp}}
};
struct virtchnl_proto_hdrs ipv6_ah_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv6, proto_hdr_ah}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv6, proto_hdr_ah}}
};
struct virtchnl_proto_hdrs ipv4_l2tpv3_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv4, proto_hdr_l2tpv3}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv4, proto_hdr_l2tpv3}}
};
struct virtchnl_proto_hdrs ipv6_l2tpv3_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv6, proto_hdr_l2tpv3}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv6, proto_hdr_l2tpv3}}
};
struct virtchnl_proto_hdrs ipv4_pfcp_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv4, proto_hdr_pfcp}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv4, proto_hdr_pfcp}}
};
struct virtchnl_proto_hdrs ipv6_pfcp_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_ipv6, proto_hdr_pfcp}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_ipv6, proto_hdr_pfcp}}
};
struct virtchnl_proto_hdrs ipv4_udp_gtpc_tmplt = {
- TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv4, proto_hdr_udp, proto_hdr_gtpc}
+ TUNNEL_LEVEL_OUTER, 3,
+ {{proto_hdr_ipv4, proto_hdr_udp, proto_hdr_gtpc}}
};
struct virtchnl_proto_hdrs ipv6_udp_gtpc_tmplt = {
- TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv6, proto_hdr_udp, proto_hdr_gtpc}
+ TUNNEL_LEVEL_OUTER, 3,
+ {{proto_hdr_ipv6, proto_hdr_udp, proto_hdr_gtpc}}
};
struct virtchnl_proto_hdrs eth_ecpri_tmplt = {
- TUNNEL_LEVEL_OUTER, 2, {proto_hdr_eth, proto_hdr_ecpri}
+ TUNNEL_LEVEL_OUTER, 2, {{proto_hdr_eth, proto_hdr_ecpri}}
};
struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
- TUNNEL_LEVEL_OUTER, 3, {proto_hdr_ipv4, proto_hdr_udp, proto_hdr_ecpri}
+ TUNNEL_LEVEL_OUTER, 3,
+ {{proto_hdr_ipv4, proto_hdr_udp, proto_hdr_ecpri}}
};
struct virtchnl_proto_hdrs udp_l2tpv2_ppp_ipv4_tmplt = {
TUNNEL_LEVEL_INNER, 3,
- {proto_hdr_l2tpv2,
- proto_hdr_ppp,
- proto_hdr_ipv4}
+ {{proto_hdr_l2tpv2,
+ proto_hdr_ppp,
+ proto_hdr_ipv4}}
};
struct virtchnl_proto_hdrs udp_l2tpv2_ppp_ipv6_tmplt = {
TUNNEL_LEVEL_INNER, 3,
- {proto_hdr_l2tpv2,
- proto_hdr_ppp,
- proto_hdr_ipv6}
+ {{proto_hdr_l2tpv2,
+ proto_hdr_ppp,
+ proto_hdr_ipv6}}
};
struct virtchnl_proto_hdrs udp_l2tpv2_ppp_ipv4_udp_tmplt = {
TUNNEL_LEVEL_INNER, 4,
- {proto_hdr_l2tpv2,
- proto_hdr_ppp,
- proto_hdr_ipv4_with_prot,
- proto_hdr_udp}
+ {{proto_hdr_l2tpv2,
+ proto_hdr_ppp,
+ proto_hdr_ipv4_with_prot,
+ proto_hdr_udp}}
};
struct virtchnl_proto_hdrs udp_l2tpv2_ppp_ipv4_tcp_tmplt = {
TUNNEL_LEVEL_INNER, 4,
- {proto_hdr_l2tpv2,
- proto_hdr_ppp,
- proto_hdr_ipv4_with_prot,
- proto_hdr_tcp}
+ {{proto_hdr_l2tpv2,
+ proto_hdr_ppp,
+ proto_hdr_ipv4_with_prot,
+ proto_hdr_tcp}}
};
struct virtchnl_proto_hdrs udp_l2tpv2_ppp_ipv6_udp_tmplt = {
TUNNEL_LEVEL_INNER, 4,
- {proto_hdr_l2tpv2,
- proto_hdr_ppp,
- proto_hdr_ipv6_with_prot,
- proto_hdr_udp}
+ {{proto_hdr_l2tpv2,
+ proto_hdr_ppp,
+ proto_hdr_ipv6_with_prot,
+ proto_hdr_udp}}
};
struct virtchnl_proto_hdrs udp_l2tpv2_ppp_ipv6_tcp_tmplt = {
TUNNEL_LEVEL_INNER, 4,
- {proto_hdr_l2tpv2,
- proto_hdr_ppp,
- proto_hdr_ipv6_with_prot,
- proto_hdr_tcp}
+ {{proto_hdr_l2tpv2,
+ proto_hdr_ppp,
+ proto_hdr_ipv6_with_prot,
+ proto_hdr_tcp}}
+
};
struct virtchnl_proto_hdrs ipv4_l2tpv2_tmplt = {
TUNNEL_LEVEL_OUTER, 4,
- {proto_hdr_eth,
- proto_hdr_ipv4,
- proto_hdr_udp,
- proto_hdr_l2tpv2}
+ {{proto_hdr_eth,
+ proto_hdr_ipv4,
+ proto_hdr_udp,
+ proto_hdr_l2tpv2}}
};
struct virtchnl_proto_hdrs ipv6_l2tpv2_tmplt = {
TUNNEL_LEVEL_OUTER, 4,
- {proto_hdr_eth,
- proto_hdr_ipv6,
- proto_hdr_udp,
- proto_hdr_l2tpv2}
+ {{proto_hdr_eth,
+ proto_hdr_ipv6,
+ proto_hdr_udp,
+ proto_hdr_l2tpv2}}
};
struct virtchnl_proto_hdrs ipv4_l2tpv2_ppp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth,
- proto_hdr_ipv4,
- proto_hdr_udp,
- proto_hdr_l2tpv2,
- proto_hdr_ppp}
+ {{proto_hdr_eth,
+ proto_hdr_ipv4,
+ proto_hdr_udp,
+ proto_hdr_l2tpv2,
+ proto_hdr_ppp}}
};
struct virtchnl_proto_hdrs ipv6_l2tpv2_ppp_tmplt = {
TUNNEL_LEVEL_OUTER, 5,
- {proto_hdr_eth,
- proto_hdr_ipv6,
- proto_hdr_udp,
- proto_hdr_l2tpv2,
- proto_hdr_ppp}
+ {{proto_hdr_eth,
+ proto_hdr_ipv6,
+ proto_hdr_udp,
+ proto_hdr_l2tpv2,
+ proto_hdr_ppp}}
};
/* rss type super set */
--
2.25.1
next prev parent reply other threads:[~2022-04-08 9:12 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 6:27 [PATCH 0/3] Enable Protocol Agnostic Flow Offloading FDIR in AVF Junfeng Guo
2022-04-07 6:27 ` [PATCH 1/3] common/iavf: support raw packet in protocol header Junfeng Guo
2022-04-07 6:27 ` [PATCH 2/3] net/iavf: align with proto hdr struct change Junfeng Guo
2022-04-07 6:27 ` [PATCH 3/3] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Junfeng Guo
2022-04-08 8:02 ` [PATCH v2 0/3] Enable Protocol Agnostic Flow Offloading FDIR in AVF Junfeng Guo
2022-04-08 8:02 ` [PATCH v2 1/3] common/iavf: support raw packet in protocol header Junfeng Guo
2022-04-08 8:02 ` [PATCH v2 2/3] net/iavf: align with proto hdr struct change Junfeng Guo
2022-04-08 8:02 ` [PATCH v2 3/3] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Junfeng Guo
2022-04-08 9:12 ` [PATCH v3 0/3] Enable Protocol Agnostic Flow Offloading FDIR in AVF Junfeng Guo
2022-04-08 9:12 ` [PATCH v3 1/3] common/iavf: support raw packet in protocol header Junfeng Guo
2022-04-08 9:12 ` Junfeng Guo [this message]
2022-04-08 9:12 ` [PATCH v3 3/3] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Junfeng Guo
2022-04-21 3:28 ` [PATCH v4 0/4] Enable Protocol Agnostic Flow Offloading in AVF Junfeng Guo
2022-04-21 3:28 ` [PATCH v4 1/4] common/iavf: support raw packet in protocol header Junfeng Guo
2022-05-21 1:34 ` Zhang, Qi Z
2022-04-21 3:28 ` [PATCH v4 2/4] net/iavf: align with proto hdr struct change Junfeng Guo
2022-04-21 3:28 ` [PATCH v4 3/4] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Junfeng Guo
2022-04-21 3:28 ` [PATCH v4 4/4] net/iavf: support Protocol Agnostic Flow Offloading VF RSS Junfeng Guo
2022-05-20 9:16 ` [PATCH v5 0/4] Enable Protocol Agnostic Flow Offloading in AVF Junfeng Guo
2022-05-20 9:16 ` [PATCH v5 1/4] common/iavf: support raw packet in protocol header Junfeng Guo
2022-05-23 2:31 ` [PATCH v6 0/3] Enable Protocol Agnostic Flow Offloading in AVF Junfeng Guo
2022-05-23 2:31 ` [PATCH v6 1/3] common/iavf: support raw packet in protocol header Junfeng Guo
2022-05-23 2:31 ` [PATCH 1/2] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Junfeng Guo
2022-05-23 2:44 ` Guo, Junfeng
2022-05-23 2:31 ` [PATCH v6 2/3] " Junfeng Guo
2022-05-23 5:10 ` Zhang, Qi Z
2022-05-23 2:31 ` [PATCH 2/2] net/iavf: support Protocol Agnostic Flow Offloading VF RSS Junfeng Guo
2022-05-23 2:45 ` Guo, Junfeng
2022-05-23 2:31 ` [PATCH v6 3/3] " Junfeng Guo
2022-05-23 5:09 ` [PATCH v6 0/3] Enable Protocol Agnostic Flow Offloading in AVF Zhang, Qi Z
2022-06-05 17:43 ` Thomas Monjalon
2022-06-05 23:10 ` Zhang, Qi Z
2022-05-20 9:16 ` [PATCH v5 2/4] net/iavf: align with proto hdr struct change Junfeng Guo
2022-05-20 9:16 ` [PATCH v5 3/4] net/iavf: enable Protocol Agnostic Flow Offloading FDIR Junfeng Guo
2022-05-20 9:16 ` [PATCH v5 4/4] net/iavf: support Protocol Agnostic Flow Offloading VF RSS Junfeng Guo
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=20220408091218.240922-3-junfeng.guo@intel.com \
--to=junfeng.guo@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@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).