* [dpdk-dev] [PATCH] net/ice: fix item number when pattern has ETH
@ 2019-07-15 9:02 Wei Zhao
2019-07-16 1:13 ` Zhang, Qi Z
2019-07-16 2:08 ` [dpdk-dev] [PATCH v2] " Wei Zhao
0 siblings, 2 replies; 5+ messages in thread
From: Wei Zhao @ 2019-07-15 9:02 UTC (permalink / raw)
To: dev; +Cc: qi.z.zhang, wei zhao
When pattern has ETH, maybe it will contain
MAC and ethertype two kinds of lookup parameters,
so add more item number for memory malloc.
Signed-off-by: wei zhao <wei.zhao1@intel.com>
---
drivers/net/ice/ice_switch_filter.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 5424223..6ec50fb 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -435,6 +435,8 @@ ice_create_switch_filter(struct ice_pf *pf,
tun_type = ICE_SW_TUN_VXLAN;
if (item->type == RTE_FLOW_ITEM_TYPE_NVGRE)
tun_type = ICE_SW_TUN_NVGRE;
+ if (item->type == RTE_FLOW_ITEM_TYPE_ETH)
+ item_num++;
}
rule_info.tun_type = tun_type;
--
2.7.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ice: fix item number when pattern has ETH
2019-07-15 9:02 [dpdk-dev] [PATCH] net/ice: fix item number when pattern has ETH Wei Zhao
@ 2019-07-16 1:13 ` Zhang, Qi Z
2019-07-16 2:08 ` [dpdk-dev] [PATCH v2] " Wei Zhao
1 sibling, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2019-07-16 1:13 UTC (permalink / raw)
To: Zhao1, Wei, dev
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Monday, July 15, 2019 5:03 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH] net/ice: fix item number when pattern has ETH
>
> When pattern has ETH, maybe it will contain MAC and ethertype two kinds of
> lookup parameters, so add more item number for memory malloc.
>
> Signed-off-by: wei zhao <wei.zhao1@intel.com>
> ---
> drivers/net/ice/ice_switch_filter.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ice/ice_switch_filter.c
> b/drivers/net/ice/ice_switch_filter.c
> index 5424223..6ec50fb 100644
> --- a/drivers/net/ice/ice_switch_filter.c
> +++ b/drivers/net/ice/ice_switch_filter.c
> @@ -435,6 +435,8 @@ ice_create_switch_filter(struct ice_pf *pf,
> tun_type = ICE_SW_TUN_VXLAN;
> if (item->type == RTE_FLOW_ITEM_TYPE_NVGRE)
> tun_type = ICE_SW_TUN_NVGRE;
> + if (item->type == RTE_FLOW_ITEM_TYPE_ETH)
I would suggest add some comment here like
"reserve one more slot for ETH which may consume 2 lookup items"
to help others easy to understand.
> + item_num++;
> }
> rule_info.tun_type = tun_type;
>
> --
> 2.7.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] net/ice: fix item number when pattern has ETH
2019-07-15 9:02 [dpdk-dev] [PATCH] net/ice: fix item number when pattern has ETH Wei Zhao
2019-07-16 1:13 ` Zhang, Qi Z
@ 2019-07-16 2:08 ` Wei Zhao
2019-07-16 2:36 ` [dpdk-dev] [PATCH v3] " Wei Zhao
1 sibling, 1 reply; 5+ messages in thread
From: Wei Zhao @ 2019-07-16 2:08 UTC (permalink / raw)
To: dev; +Cc: qi.z.zhang, wei zhao
When pattern has ETH, maybe it will contain
MAC and ethertype two kinds of lookup parameters,
so add more item number for memory malloc in order
to reserve one more memory slot for ETH which may
consume 2 lookup items.
Fixes: 24dc00c30907 ("net/ice: enable switch filter")
Signed-off-by: wei zhao <wei.zhao1@intel.com>
---
drivers/net/ice/ice_switch_filter.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 5424223..6ec50fb 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -435,6 +435,8 @@ ice_create_switch_filter(struct ice_pf *pf,
tun_type = ICE_SW_TUN_VXLAN;
if (item->type == RTE_FLOW_ITEM_TYPE_NVGRE)
tun_type = ICE_SW_TUN_NVGRE;
+ if (item->type == RTE_FLOW_ITEM_TYPE_ETH)
+ item_num++;
}
rule_info.tun_type = tun_type;
--
2.7.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v3] net/ice: fix item number when pattern has ETH
2019-07-16 2:08 ` [dpdk-dev] [PATCH v2] " Wei Zhao
@ 2019-07-16 2:36 ` Wei Zhao
2019-07-16 7:30 ` Zhang, Qi Z
0 siblings, 1 reply; 5+ messages in thread
From: Wei Zhao @ 2019-07-16 2:36 UTC (permalink / raw)
To: dev; +Cc: qi.z.zhang, wei zhao
When pattern has ETH, maybe it will contain
MAC and ethertype two kinds of lookup parameters,
so add more item number for memory malloc in order
to reserve one more memory slot for ETH which may
consume 2 lookup items.
Fixes: 24dc00c30907 ("net/ice: enable switch filter")
Signed-off-by: wei zhao <wei.zhao1@intel.com>
---
drivers/net/ice/ice_switch_filter.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 5424223..b88b4f5 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -435,6 +435,11 @@ ice_create_switch_filter(struct ice_pf *pf,
tun_type = ICE_SW_TUN_VXLAN;
if (item->type == RTE_FLOW_ITEM_TYPE_NVGRE)
tun_type = ICE_SW_TUN_NVGRE;
+ /* reserve one more memory slot for ETH which may
+ * consume 2 lookup items.
+ */
+ if (item->type == RTE_FLOW_ITEM_TYPE_ETH)
+ item_num++;
}
rule_info.tun_type = tun_type;
--
2.7.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/ice: fix item number when pattern has ETH
2019-07-16 2:36 ` [dpdk-dev] [PATCH v3] " Wei Zhao
@ 2019-07-16 7:30 ` Zhang, Qi Z
0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2019-07-16 7:30 UTC (permalink / raw)
To: Zhao1, Wei, dev
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, July 16, 2019 10:37 AM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH v3] net/ice: fix item number when pattern has ETH
>
> When pattern has ETH, maybe it will contain MAC and ethertype two kinds of
> lookup parameters, so add more item number for memory malloc in order to
> reserve one more memory slot for ETH which may consume 2 lookup items.
>
> Fixes: 24dc00c30907 ("net/ice: enable switch filter")
> Signed-off-by: wei zhao <wei.zhao1@intel.com>
s/wei zhao/Wei Zhao
> ---
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-16 7:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15 9:02 [dpdk-dev] [PATCH] net/ice: fix item number when pattern has ETH Wei Zhao
2019-07-16 1:13 ` Zhang, Qi Z
2019-07-16 2:08 ` [dpdk-dev] [PATCH v2] " Wei Zhao
2019-07-16 2:36 ` [dpdk-dev] [PATCH v3] " Wei Zhao
2019-07-16 7:30 ` Zhang, Qi Z
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).