* [dpdk-dev] [PATCH] net/igb: fix add/delete of flex filters
@ 2017-05-18 11:32 Markus Theil
2017-05-18 12:20 ` [dpdk-dev] [PATCH v2] " Markus Theil
0 siblings, 1 reply; 8+ messages in thread
From: Markus Theil @ 2017-05-18 11:32 UTC (permalink / raw)
To: wenzhuo.lu; +Cc: dev, Markus Theil
Before this patch, flex_filter->index was always zero when it was read
and used after rte_zmalloc. The corresponding code was therefore moved into the add
and delete parts of the if/else statement. i210 and i211 also support
flex filters.
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
drivers/net/e1000/igb_ethdev.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 43d1f5f..c8b8b0c 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3657,7 +3657,7 @@ eth_igb_syn_filter_handle(struct rte_eth_dev *dev,
}
#define MAC_TYPE_FILTER_SUP_EXT(type) do {\
- if ((type) != e1000_82580 && (type) != e1000_i350)\
+ if ((type) != e1000_82580 && (type) != e1000_i350 && (type) != e1000_i210 && (type) != e1000_i211)\
return -ENOSYS; \
} while (0)
@@ -3913,10 +3913,6 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
}
wufc = E1000_READ_REG(hw, E1000_WUFC);
- if (flex_filter->index < E1000_MAX_FHFT)
- reg_off = E1000_FHFT(flex_filter->index);
- else
- reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
if (add) {
if (eth_igb_flex_filter_lookup(&filter_info->flex_list,
@@ -3946,6 +3942,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
return -ENOSYS;
}
+ if (flex_filter->index < E1000_MAX_FHFT)
+ reg_off = E1000_FHFT(flex_filter->index);
+ else
+ reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
+
E1000_WRITE_REG(hw, E1000_WUFC, wufc | E1000_WUFC_FLEX_HQ |
(E1000_WUFC_FLX0 << flex_filter->index));
queueing = filter->len |
@@ -3974,6 +3975,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
return -ENOENT;
}
+ if (it->index < E1000_MAX_FHFT)
+ reg_off = E1000_FHFT(it->index);
+ else
+ reg_off = E1000_FHFT_EXT(it->index - E1000_MAX_FHFT);
+
for (i = 0; i < E1000_FHFT_SIZE_IN_DWD; i++)
E1000_WRITE_REG(hw, reg_off + i * sizeof(uint32_t), 0);
E1000_WRITE_REG(hw, E1000_WUFC, wufc &
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2] net/igb: fix add/delete of flex filters
2017-05-18 11:32 [dpdk-dev] [PATCH] net/igb: fix add/delete of flex filters Markus Theil
@ 2017-05-18 12:20 ` Markus Theil
2017-05-22 1:51 ` Lu, Wenzhuo
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Markus Theil
0 siblings, 2 replies; 8+ messages in thread
From: Markus Theil @ 2017-05-18 12:20 UTC (permalink / raw)
To: dev; +Cc: Markus Theil
Before this patch, flex_filter->index was always zero when it was read
and used after rte_zmalloc. The corresponding code was therefore moved
into the add and delete parts of the if/else statement. i210 and i211
also support flex filters.
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
drivers/net/e1000/igb_ethdev.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 43d1f5f..f090e47 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3657,7 +3657,8 @@ eth_igb_syn_filter_handle(struct rte_eth_dev *dev,
}
#define MAC_TYPE_FILTER_SUP_EXT(type) do {\
- if ((type) != e1000_82580 && (type) != e1000_i350)\
+ if ((type) != e1000_82580 && (type) != e1000_i350 &&\
+ (type) != e1000_i210 && (type) != e1000_i211)\
return -ENOSYS; \
} while (0)
@@ -3913,10 +3914,6 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
}
wufc = E1000_READ_REG(hw, E1000_WUFC);
- if (flex_filter->index < E1000_MAX_FHFT)
- reg_off = E1000_FHFT(flex_filter->index);
- else
- reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
if (add) {
if (eth_igb_flex_filter_lookup(&filter_info->flex_list,
@@ -3946,6 +3943,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
return -ENOSYS;
}
+ if (flex_filter->index < E1000_MAX_FHFT)
+ reg_off = E1000_FHFT(flex_filter->index);
+ else
+ reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
+
E1000_WRITE_REG(hw, E1000_WUFC, wufc | E1000_WUFC_FLEX_HQ |
(E1000_WUFC_FLX0 << flex_filter->index));
queueing = filter->len |
@@ -3974,6 +3976,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
return -ENOENT;
}
+ if (it->index < E1000_MAX_FHFT)
+ reg_off = E1000_FHFT(it->index);
+ else
+ reg_off = E1000_FHFT_EXT(it->index - E1000_MAX_FHFT);
+
for (i = 0; i < E1000_FHFT_SIZE_IN_DWD; i++)
E1000_WRITE_REG(hw, reg_off + i * sizeof(uint32_t), 0);
E1000_WRITE_REG(hw, E1000_WUFC, wufc &
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/igb: fix add/delete of flex filters
2017-05-18 12:20 ` [dpdk-dev] [PATCH v2] " Markus Theil
@ 2017-05-22 1:51 ` Lu, Wenzhuo
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Markus Theil
1 sibling, 0 replies; 8+ messages in thread
From: Lu, Wenzhuo @ 2017-05-22 1:51 UTC (permalink / raw)
To: Markus Theil, dev
Hi Markus,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Markus Theil
> Sent: Thursday, May 18, 2017 8:20 PM
> To: dev@dpdk.org
> Cc: Markus Theil
> Subject: [dpdk-dev] [PATCH v2] net/igb: fix add/delete of flex filters
>
> Before this patch, flex_filter->index was always zero when it was read and
> used after rte_zmalloc. The corresponding code was therefore moved into
> the add and delete parts of the if/else statement. i210 and i211 also support
> flex filters.
Thanks for the patch. To my opinion, there're 2 things here. One is to support the flex filter on i210/i211. The other is to fix the index issue.
Would you like to split it to 2 patches? So you can add a fixes tag for the index one.
>
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
> drivers/net/e1000/igb_ethdev.c | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211
2017-05-18 12:20 ` [dpdk-dev] [PATCH v2] " Markus Theil
2017-05-22 1:51 ` Lu, Wenzhuo
@ 2017-05-22 10:17 ` Markus Theil
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 2/2] net/igb: fix add/delete of flex filters Markus Theil
2017-05-23 0:36 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Lu, Wenzhuo
1 sibling, 2 replies; 8+ messages in thread
From: Markus Theil @ 2017-05-22 10:17 UTC (permalink / raw)
To: dev; +Cc: Markus Theil
i210/i211 also support flex filters. Tested on i210.
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
drivers/net/e1000/igb_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index e1702d8..631ace6 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3656,7 +3656,8 @@ eth_igb_syn_filter_handle(struct rte_eth_dev *dev,
}
#define MAC_TYPE_FILTER_SUP_EXT(type) do {\
- if ((type) != e1000_82580 && (type) != e1000_i350)\
+ if ((type) != e1000_82580 && (type) != e1000_i350 &&\
+ (type) != e1000_i210 && (type) != e1000_i211)\
return -ENOSYS; \
} while (0)
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] net/igb: fix add/delete of flex filters
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Markus Theil
@ 2017-05-22 10:17 ` Markus Theil
2017-05-23 0:37 ` Lu, Wenzhuo
2017-05-23 0:36 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Lu, Wenzhuo
1 sibling, 1 reply; 8+ messages in thread
From: Markus Theil @ 2017-05-22 10:17 UTC (permalink / raw)
To: dev; +Cc: Markus Theil
Before this patch, flex_filter->index was always zero when it was read
and used after rte_zmalloc. The corresponding code was therefore moved
into the add and delete parts of the if/else statement.
Fixes: 231d43909a31 ("igb: migrate flex filter to new API")
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
drivers/net/e1000/igb_ethdev.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 631ace6..91b7e86 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3913,10 +3913,6 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
}
wufc = E1000_READ_REG(hw, E1000_WUFC);
- if (flex_filter->index < E1000_MAX_FHFT)
- reg_off = E1000_FHFT(flex_filter->index);
- else
- reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
if (add) {
if (eth_igb_flex_filter_lookup(&filter_info->flex_list,
@@ -3946,6 +3942,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
return -ENOSYS;
}
+ if (flex_filter->index < E1000_MAX_FHFT)
+ reg_off = E1000_FHFT(flex_filter->index);
+ else
+ reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
+
E1000_WRITE_REG(hw, E1000_WUFC, wufc | E1000_WUFC_FLEX_HQ |
(E1000_WUFC_FLX0 << flex_filter->index));
queueing = filter->len |
@@ -3974,6 +3975,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
return -ENOENT;
}
+ if (it->index < E1000_MAX_FHFT)
+ reg_off = E1000_FHFT(it->index);
+ else
+ reg_off = E1000_FHFT_EXT(it->index - E1000_MAX_FHFT);
+
for (i = 0; i < E1000_FHFT_SIZE_IN_DWD; i++)
E1000_WRITE_REG(hw, reg_off + i * sizeof(uint32_t), 0);
E1000_WRITE_REG(hw, E1000_WUFC, wufc &
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] net/igb: fix add/delete of flex filters
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 2/2] net/igb: fix add/delete of flex filters Markus Theil
@ 2017-05-23 0:37 ` Lu, Wenzhuo
0 siblings, 0 replies; 8+ messages in thread
From: Lu, Wenzhuo @ 2017-05-23 0:37 UTC (permalink / raw)
To: Markus Theil, dev
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Markus Theil
> Sent: Monday, May 22, 2017 6:18 PM
> To: dev@dpdk.org
> Cc: Markus Theil
> Subject: [dpdk-dev] [PATCH v3 2/2] net/igb: fix add/delete of flex filters
>
> Before this patch, flex_filter->index was always zero when it was read and
> used after rte_zmalloc. The corresponding code was therefore moved into
> the add and delete parts of the if/else statement.
>
> Fixes: 231d43909a31 ("igb: migrate flex filter to new API")
>
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Markus Theil
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 2/2] net/igb: fix add/delete of flex filters Markus Theil
@ 2017-05-23 0:36 ` Lu, Wenzhuo
2017-05-23 12:28 ` Ferruh Yigit
1 sibling, 1 reply; 8+ messages in thread
From: Lu, Wenzhuo @ 2017-05-23 0:36 UTC (permalink / raw)
To: Markus Theil, dev
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Markus Theil
> Sent: Monday, May 22, 2017 6:18 PM
> To: dev@dpdk.org
> Cc: Markus Theil
> Subject: [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211
>
> i210/i211 also support flex filters. Tested on i210.
>
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211
2017-05-23 0:36 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Lu, Wenzhuo
@ 2017-05-23 12:28 ` Ferruh Yigit
0 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2017-05-23 12:28 UTC (permalink / raw)
To: Lu, Wenzhuo, Markus Theil, dev
On 5/23/2017 1:36 AM, Lu, Wenzhuo wrote:
> Hi,
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Markus Theil
>> Sent: Monday, May 22, 2017 6:18 PM
>> To: dev@dpdk.org
>> Cc: Markus Theil
>> Subject: [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211
>>
>> i210/i211 also support flex filters. Tested on i210.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-05-23 12:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18 11:32 [dpdk-dev] [PATCH] net/igb: fix add/delete of flex filters Markus Theil
2017-05-18 12:20 ` [dpdk-dev] [PATCH v2] " Markus Theil
2017-05-22 1:51 ` Lu, Wenzhuo
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Markus Theil
2017-05-22 10:17 ` [dpdk-dev] [PATCH v3 2/2] net/igb: fix add/delete of flex filters Markus Theil
2017-05-23 0:37 ` Lu, Wenzhuo
2017-05-23 0:36 ` [dpdk-dev] [PATCH v3 1/2] net/igb: support flex filters on i210/i211 Lu, Wenzhuo
2017-05-23 12:28 ` Ferruh Yigit
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).