* [PATCH] net/ixgbe: fix IPv6 mask in fdir
@ 2023-03-03 4:52 Kaiwen Deng
2023-03-03 7:49 ` Jiale, SongX
0 siblings, 1 reply; 3+ messages in thread
From: Kaiwen Deng @ 2023-03-03 4:52 UTC (permalink / raw)
To: dev
Cc: stable, qiming.yang, yidingx.zhou, Kaiwen Deng, Wenjun Wu,
Qi Zhang, Wenzhuo Lu
Rules without addr mask cannot be created together in ixgbe
when setting IPv6 addr mask to default value as 0.
This commit is to change the default value of IPv6 addr mask as '0xFF'.
Fixes: cba954b7beda ("net/ixgbe: enable IPv6 mask in flow rules")
Fixes: 7d629cacedee ("net/ixgbe: enable IPv6 for consistent API")
Cc: stable@dpdk.org
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 79c84044af..eac81ee489 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -1645,10 +1645,6 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
memset(&rule->mask, 0xFF, sizeof(struct ixgbe_hw_fdir_mask));
rule->mask.vlan_tci_mask = 0;
rule->mask.flex_bytes_mask = 0;
- rule->mask.dst_port_mask = 0;
- rule->mask.src_port_mask = 0;
- rule->mask.src_ipv6_mask = 0;
- rule->mask.dst_ipv6_mask = 0;
/**
* The first not void item should be
@@ -1922,9 +1918,9 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
/* check src addr mask */
for (j = 0; j < 16; j++) {
- if (ipv6_mask->hdr.src_addr[j] == UINT8_MAX) {
- rule->mask.src_ipv6_mask |= 1 << j;
- } else if (ipv6_mask->hdr.src_addr[j] != 0) {
+ if (ipv6_mask->hdr.src_addr[j] == 0) {
+ rule->mask.src_ipv6_mask &= ~(1 << j);
+ } else if (ipv6_mask->hdr.src_addr[j] != UINT8_MAX) {
memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
@@ -1935,9 +1931,9 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
/* check dst addr mask */
for (j = 0; j < 16; j++) {
- if (ipv6_mask->hdr.dst_addr[j] == UINT8_MAX) {
- rule->mask.dst_ipv6_mask |= 1 << j;
- } else if (ipv6_mask->hdr.dst_addr[j] != 0) {
+ if (ipv6_mask->hdr.dst_addr[j] == 0) {
+ rule->mask.dst_ipv6_mask &= ~(1 << j);
+ } else if (ipv6_mask->hdr.dst_addr[j] != UINT8_MAX) {
memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] net/ixgbe: fix IPv6 mask in fdir
2023-03-03 4:52 [PATCH] net/ixgbe: fix IPv6 mask in fdir Kaiwen Deng
@ 2023-03-03 7:49 ` Jiale, SongX
2023-03-03 9:24 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Jiale, SongX @ 2023-03-03 7:49 UTC (permalink / raw)
To: Deng, KaiwenX, dev
Cc: stable, Yang, Qiming, Zhou, YidingX, Deng, KaiwenX, Wu, Wenjun1,
Zhang, Qi Z, Lu, Wenzhuo
> -----Original Message-----
> From: Kaiwen Deng <kaiwenx.deng@intel.com>
> Sent: Friday, March 3, 2023 12:52 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Deng, KaiwenX <kaiwenx.deng@intel.com>; Wu,
> Wenjun1 <wenjun1.wu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Lu,
> Wenzhuo <wenzhuo.lu@intel.com>
> Subject: [PATCH] net/ixgbe: fix IPv6 mask in fdir
>
> Rules without addr mask cannot be created together in ixgbe when setting
> IPv6 addr mask to default value as 0.
>
> This commit is to change the default value of IPv6 addr mask as '0xFF'.
>
> Fixes: cba954b7beda ("net/ixgbe: enable IPv6 mask in flow rules")
> Fixes: 7d629cacedee ("net/ixgbe: enable IPv6 for consistent API")
> Cc: stable@dpdk.org
>
> Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
> ---
Tested-by: Song Jiale <songx.jiale@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] net/ixgbe: fix IPv6 mask in fdir
2023-03-03 7:49 ` Jiale, SongX
@ 2023-03-03 9:24 ` Zhang, Qi Z
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2023-03-03 9:24 UTC (permalink / raw)
To: Jiale, SongX, Deng, KaiwenX, dev
Cc: stable, Yang, Qiming, Zhou, YidingX, Deng, KaiwenX, Wu, Wenjun1,
Lu, Wenzhuo
> -----Original Message-----
> From: Jiale, SongX <songx.jiale@intel.com>
> Sent: Friday, March 3, 2023 3:50 PM
> To: Deng, KaiwenX <kaiwenx.deng@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Zhou,
> YidingX <yidingx.zhou@intel.com>; Deng, KaiwenX
> <kaiwenx.deng@intel.com>; Wu, Wenjun1 <wenjun1.wu@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: RE: [PATCH] net/ixgbe: fix IPv6 mask in fdir
>
> > -----Original Message-----
> > From: Kaiwen Deng <kaiwenx.deng@intel.com>
> > Sent: Friday, March 3, 2023 12:52 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Zhou,
> > YidingX <yidingx.zhou@intel.com>; Deng, KaiwenX
> > <kaiwenx.deng@intel.com>; Wu,
> > Wenjun1 <wenjun1.wu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> > Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > Subject: [PATCH] net/ixgbe: fix IPv6 mask in fdir
> >
> > Rules without addr mask cannot be created together in ixgbe when
> > setting
> > IPv6 addr mask to default value as 0.
> >
> > This commit is to change the default value of IPv6 addr mask as '0xFF'.
> >
> > Fixes: cba954b7beda ("net/ixgbe: enable IPv6 mask in flow rules")
> > Fixes: 7d629cacedee ("net/ixgbe: enable IPv6 for consistent API")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
> > ---
> Tested-by: Song Jiale <songx.jiale@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-03 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03 4:52 [PATCH] net/ixgbe: fix IPv6 mask in fdir Kaiwen Deng
2023-03-03 7:49 ` Jiale, SongX
2023-03-03 9:24 ` 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).