* [PATCH v2 iwl-next 0/3] igc: ethtool: Flex filter cleanup
@ 2024-01-24 8:55 Kurt Kanzenbach
2024-01-24 8:55 ` [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree Kurt Kanzenbach
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Kurt Kanzenbach @ 2024-01-24 8:55 UTC (permalink / raw)
To: Jesse Brandeburg, Tony Nguyen, Vinicius Costa Gomes
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, netdev, Sebastian Andrzej Siewior,
Kurt Kanzenbach
Hi,
this series contains some cosmetics for the flex filter code. The fixes have
been merged separately via -net already.
Changes since v1:
* Add Vinicius Ack
* Rebase to v6.8-rc1
* Wrap commit messages at 75 chars
Previous versions:
* v1: https://lore.kernel.org/netdev/20231128074849.16863-1-kurt@linutronix.de/
Kurt Kanzenbach (3):
igc: Use reverse xmas tree
igc: Use netdev printing functions for flex filters
igc: Unify filtering rule fields
drivers/net/ethernet/intel/igc/igc.h | 2 +-
drivers/net/ethernet/intel/igc/igc_ethtool.c | 4 ++--
drivers/net/ethernet/intel/igc/igc_main.c | 21 ++++++++++----------
3 files changed, 14 insertions(+), 13 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree
2024-01-24 8:55 [PATCH v2 iwl-next 0/3] igc: ethtool: Flex filter cleanup Kurt Kanzenbach
@ 2024-01-24 8:55 ` Kurt Kanzenbach
2024-01-25 11:58 ` Simon Horman
2024-02-04 10:40 ` [Intel-wired-lan] " naamax.meir
2024-01-24 8:55 ` [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters Kurt Kanzenbach
2024-01-24 8:55 ` [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields Kurt Kanzenbach
2 siblings, 2 replies; 10+ messages in thread
From: Kurt Kanzenbach @ 2024-01-24 8:55 UTC (permalink / raw)
To: Jesse Brandeburg, Tony Nguyen, Vinicius Costa Gomes
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, netdev, Sebastian Andrzej Siewior,
Kurt Kanzenbach
Use reverse xmas tree coding style convention in igc_add_flex_filter().
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index ba8d3fe186ae..4b3faa9a667f 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3577,9 +3577,9 @@ static bool igc_flex_filter_in_use(struct igc_adapter *adapter)
static int igc_add_flex_filter(struct igc_adapter *adapter,
struct igc_nfc_rule *rule)
{
- struct igc_flex_filter flex = { };
struct igc_nfc_filter *filter = &rule->filter;
unsigned int eth_offset, user_offset;
+ struct igc_flex_filter flex = { };
int ret, index;
bool vlan;
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters
2024-01-24 8:55 [PATCH v2 iwl-next 0/3] igc: ethtool: Flex filter cleanup Kurt Kanzenbach
2024-01-24 8:55 ` [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree Kurt Kanzenbach
@ 2024-01-24 8:55 ` Kurt Kanzenbach
2024-01-25 11:59 ` Simon Horman
2024-02-04 15:05 ` [Intel-wired-lan] " naamax.meir
2024-01-24 8:55 ` [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields Kurt Kanzenbach
2 siblings, 2 replies; 10+ messages in thread
From: Kurt Kanzenbach @ 2024-01-24 8:55 UTC (permalink / raw)
To: Jesse Brandeburg, Tony Nguyen, Vinicius Costa Gomes
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, netdev, Sebastian Andrzej Siewior,
Kurt Kanzenbach
All igc filter implementations use netdev_*() printing functions except for
the flex filters. Unify it.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 4b3faa9a667f..91297b561519 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3385,7 +3385,7 @@ static int igc_flex_filter_select(struct igc_adapter *adapter,
u32 fhftsl;
if (input->index >= MAX_FLEX_FILTER) {
- dev_err(&adapter->pdev->dev, "Wrong Flex Filter index selected!\n");
+ netdev_err(adapter->netdev, "Wrong Flex Filter index selected!\n");
return -EINVAL;
}
@@ -3420,7 +3420,6 @@ static int igc_flex_filter_select(struct igc_adapter *adapter,
static int igc_write_flex_filter_ll(struct igc_adapter *adapter,
struct igc_flex_filter *input)
{
- struct device *dev = &adapter->pdev->dev;
struct igc_hw *hw = &adapter->hw;
u8 *data = input->data;
u8 *mask = input->mask;
@@ -3434,7 +3433,7 @@ static int igc_write_flex_filter_ll(struct igc_adapter *adapter,
* out early to avoid surprises later.
*/
if (input->length % 8 != 0) {
- dev_err(dev, "The length of a flex filter has to be 8 byte aligned!\n");
+ netdev_err(adapter->netdev, "The length of a flex filter has to be 8 byte aligned!\n");
return -EINVAL;
}
@@ -3504,8 +3503,8 @@ static int igc_write_flex_filter_ll(struct igc_adapter *adapter,
}
wr32(IGC_WUFC, wufc);
- dev_dbg(&adapter->pdev->dev, "Added flex filter %u to HW.\n",
- input->index);
+ netdev_dbg(adapter->netdev, "Added flex filter %u to HW.\n",
+ input->index);
return 0;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields
2024-01-24 8:55 [PATCH v2 iwl-next 0/3] igc: ethtool: Flex filter cleanup Kurt Kanzenbach
2024-01-24 8:55 ` [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree Kurt Kanzenbach
2024-01-24 8:55 ` [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters Kurt Kanzenbach
@ 2024-01-24 8:55 ` Kurt Kanzenbach
2024-01-25 11:59 ` Simon Horman
2024-02-04 20:08 ` [Intel-wired-lan] " naamax.meir
2 siblings, 2 replies; 10+ messages in thread
From: Kurt Kanzenbach @ 2024-01-24 8:55 UTC (permalink / raw)
To: Jesse Brandeburg, Tony Nguyen, Vinicius Costa Gomes
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, netdev, Sebastian Andrzej Siewior,
Kurt Kanzenbach
All filtering parameters such as EtherType and VLAN TCI are stored in host
byte order except for the VLAN EtherType. Unify it.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
drivers/net/ethernet/intel/igc/igc.h | 2 +-
drivers/net/ethernet/intel/igc/igc_ethtool.c | 4 ++--
drivers/net/ethernet/intel/igc/igc_main.c | 10 ++++++----
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 45430e246e9c..158adb1594e9 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -585,7 +585,7 @@ enum igc_filter_match_flags {
struct igc_nfc_filter {
u8 match_flags;
u16 etype;
- __be16 vlan_etype;
+ u16 vlan_etype;
u16 vlan_tci;
u16 vlan_tci_mask;
u8 src_addr[ETH_ALEN];
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index b95d2c86e803..d31a6f027c83 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -981,7 +981,7 @@ static int igc_ethtool_get_nfc_rule(struct igc_adapter *adapter,
if (rule->filter.match_flags & IGC_FILTER_FLAG_VLAN_ETYPE) {
fsp->flow_type |= FLOW_EXT;
- fsp->h_ext.vlan_etype = rule->filter.vlan_etype;
+ fsp->h_ext.vlan_etype = htons(rule->filter.vlan_etype);
fsp->m_ext.vlan_etype = ETHER_TYPE_FULL_MASK;
}
@@ -1249,7 +1249,7 @@ static void igc_ethtool_init_nfc_rule(struct igc_nfc_rule *rule,
/* VLAN etype matching */
if ((fsp->flow_type & FLOW_EXT) && fsp->h_ext.vlan_etype) {
- rule->filter.vlan_etype = fsp->h_ext.vlan_etype;
+ rule->filter.vlan_etype = ntohs(fsp->h_ext.vlan_etype);
rule->filter.match_flags |= IGC_FILTER_FLAG_VLAN_ETYPE;
}
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 91297b561519..c3fe62813f43 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -3614,10 +3614,12 @@ static int igc_add_flex_filter(struct igc_adapter *adapter,
ETH_ALEN, NULL);
/* Add VLAN etype */
- if (rule->filter.match_flags & IGC_FILTER_FLAG_VLAN_ETYPE)
- igc_flex_filter_add_field(&flex, &filter->vlan_etype, 12,
- sizeof(filter->vlan_etype),
- NULL);
+ if (rule->filter.match_flags & IGC_FILTER_FLAG_VLAN_ETYPE) {
+ __be16 vlan_etype = cpu_to_be16(filter->vlan_etype);
+
+ igc_flex_filter_add_field(&flex, &vlan_etype, 12,
+ sizeof(vlan_etype), NULL);
+ }
/* Add VLAN TCI */
if (rule->filter.match_flags & IGC_FILTER_FLAG_VLAN_TCI)
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree
2024-01-24 8:55 ` [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree Kurt Kanzenbach
@ 2024-01-25 11:58 ` Simon Horman
2024-02-04 10:40 ` [Intel-wired-lan] " naamax.meir
1 sibling, 0 replies; 10+ messages in thread
From: Simon Horman @ 2024-01-25 11:58 UTC (permalink / raw)
To: Kurt Kanzenbach
Cc: Jesse Brandeburg, Tony Nguyen, Vinicius Costa Gomes,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, netdev, Sebastian Andrzej Siewior
On Wed, Jan 24, 2024 at 09:55:30AM +0100, Kurt Kanzenbach wrote:
> Use reverse xmas tree coding style convention in igc_add_flex_filter().
>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters
2024-01-24 8:55 ` [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters Kurt Kanzenbach
@ 2024-01-25 11:59 ` Simon Horman
2024-02-04 15:05 ` [Intel-wired-lan] " naamax.meir
1 sibling, 0 replies; 10+ messages in thread
From: Simon Horman @ 2024-01-25 11:59 UTC (permalink / raw)
To: Kurt Kanzenbach
Cc: Jesse Brandeburg, Tony Nguyen, Vinicius Costa Gomes,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, netdev, Sebastian Andrzej Siewior
On Wed, Jan 24, 2024 at 09:55:31AM +0100, Kurt Kanzenbach wrote:
> All igc filter implementations use netdev_*() printing functions except for
> the flex filters. Unify it.
>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields
2024-01-24 8:55 ` [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields Kurt Kanzenbach
@ 2024-01-25 11:59 ` Simon Horman
2024-02-04 20:08 ` [Intel-wired-lan] " naamax.meir
1 sibling, 0 replies; 10+ messages in thread
From: Simon Horman @ 2024-01-25 11:59 UTC (permalink / raw)
To: Kurt Kanzenbach
Cc: Jesse Brandeburg, Tony Nguyen, Vinicius Costa Gomes,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, netdev, Sebastian Andrzej Siewior
On Wed, Jan 24, 2024 at 09:55:32AM +0100, Kurt Kanzenbach wrote:
> All filtering parameters such as EtherType and VLAN TCI are stored in host
> byte order except for the VLAN EtherType. Unify it.
>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-wired-lan] [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree
2024-01-24 8:55 ` [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree Kurt Kanzenbach
2024-01-25 11:58 ` Simon Horman
@ 2024-02-04 10:40 ` naamax.meir
1 sibling, 0 replies; 10+ messages in thread
From: naamax.meir @ 2024-02-04 10:40 UTC (permalink / raw)
To: Kurt Kanzenbach, Jesse Brandeburg, Tony Nguyen,
Vinicius Costa Gomes
Cc: netdev, Sebastian Andrzej Siewior, Eric Dumazet, intel-wired-lan,
Jakub Kicinski, Paolo Abeni, David S. Miller
On 1/24/2024 10:55, Kurt Kanzenbach wrote:
> Use reverse xmas tree coding style convention in igc_add_flex_filter().
>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
> drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-wired-lan] [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters
2024-01-24 8:55 ` [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters Kurt Kanzenbach
2024-01-25 11:59 ` Simon Horman
@ 2024-02-04 15:05 ` naamax.meir
1 sibling, 0 replies; 10+ messages in thread
From: naamax.meir @ 2024-02-04 15:05 UTC (permalink / raw)
To: Kurt Kanzenbach, Jesse Brandeburg, Tony Nguyen,
Vinicius Costa Gomes
Cc: netdev, Sebastian Andrzej Siewior, Eric Dumazet, intel-wired-lan,
Jakub Kicinski, Paolo Abeni, David S. Miller
On 1/24/2024 10:55, Kurt Kanzenbach wrote:
> All igc filter implementations use netdev_*() printing functions except for
> the flex filters. Unify it.
>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
> drivers/net/ethernet/intel/igc/igc_main.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-wired-lan] [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields
2024-01-24 8:55 ` [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields Kurt Kanzenbach
2024-01-25 11:59 ` Simon Horman
@ 2024-02-04 20:08 ` naamax.meir
1 sibling, 0 replies; 10+ messages in thread
From: naamax.meir @ 2024-02-04 20:08 UTC (permalink / raw)
To: Kurt Kanzenbach, Jesse Brandeburg, Tony Nguyen,
Vinicius Costa Gomes
Cc: netdev, Sebastian Andrzej Siewior, Eric Dumazet, intel-wired-lan,
Jakub Kicinski, Paolo Abeni, David S. Miller
On 1/24/2024 10:55, Kurt Kanzenbach wrote:
> All filtering parameters such as EtherType and VLAN TCI are stored in host
> byte order except for the VLAN EtherType. Unify it.
>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
> drivers/net/ethernet/intel/igc/igc.h | 2 +-
> drivers/net/ethernet/intel/igc/igc_ethtool.c | 4 ++--
> drivers/net/ethernet/intel/igc/igc_main.c | 10 ++++++----
> 3 files changed, 9 insertions(+), 7 deletions(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-02-04 20:09 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24 8:55 [PATCH v2 iwl-next 0/3] igc: ethtool: Flex filter cleanup Kurt Kanzenbach
2024-01-24 8:55 ` [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree Kurt Kanzenbach
2024-01-25 11:58 ` Simon Horman
2024-02-04 10:40 ` [Intel-wired-lan] " naamax.meir
2024-01-24 8:55 ` [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters Kurt Kanzenbach
2024-01-25 11:59 ` Simon Horman
2024-02-04 15:05 ` [Intel-wired-lan] " naamax.meir
2024-01-24 8:55 ` [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields Kurt Kanzenbach
2024-01-25 11:59 ` Simon Horman
2024-02-04 20:08 ` [Intel-wired-lan] " naamax.meir
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).