bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups
@ 2025-06-18 12:00 Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 01/11] net: fec: fix typos found by codespell Marc Kleine-Budde
                   ` (12 more replies)
  0 siblings, 13 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li, Andrew Lunn

This series first cleans up the fec driver a bit (typos, obsolete
comments, add missing header files, rename struct, replace magic
number by defines).

The last 5 patches clean up the fec_enet_rx_queue() function,
including VLAN handling.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
Changes in v4:
- 3: new patch to switch from asm/cacheflush.h to linux/cacheflush.h
- 4: new patch to alphabetically sort includes (thanks Alexander Lobakin)
- Link to v3: https://patch.msgid.link/20250617-fec-cleanups-v3-0-a57bfb38993f@pengutronix.de

Changes in v3:
- update cover letter and subject
- 1: fix another typo (thanks Bence Csókás)
- 7: clarify patch description (thanks Andrew Lunn)
- collected Wei Fang's, Bence Csókás's and Andrew Lunn's Reviewed-by
- Link to v2: https://patch.msgid.link/20250612-fec-cleanups-v2-0-ae7c36df185e@pengutronix.de

Changes in v2:
- removed patches 7, 8 for now
- rebased to recent net-next/main:
  dropped patch 6
- 2, 3: wrap patch description at 75 chars:
  (thanks Frank Li)
- 4, 5, 6, 7, 9: updated wording of patch description
  (thanks Frank Li)
- 10: move VLAN_header into the if statement (thanks Wei Fang)
- 10: mark several variables const
- collected Wei Fang's and Frank Li's Reviewed-by
- Link to v1: https://patch.msgid.link/20241016-fec-cleanups-v1-0-de783bd15e6a@pengutronix.de

---
Marc Kleine-Budde (11):
      net: fec: fix typos found by codespell
      net: fec: struct fec_enet_private: remove obsolete comment
      net: fec: switch from asm/cacheflush.h to linux/cacheflush.h
      net: fec: sort the includes by alphabetic order
      net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info
      net: fec: fec_restart(): introduce a define for FEC_ECR_SPEED
      net: fec: fec_enet_rx_queue(): use same signature as fec_enet_tx_queue()
      net: fec: fec_enet_rx_queue(): replace manual VLAN header calculation with skb_vlan_eth_hdr()
      net: fec: fec_enet_rx_queue(): reduce scope of data
      net: fec: fec_enet_rx_queue(): move_call to _vlan_hwaccel_put_tag()
      net: fec: fec_enet_rx_queue(): factor out VLAN handling into separate function fec_enet_rx_vlan()

 drivers/net/ethernet/freescale/fec.h         |  15 ++-
 drivers/net/ethernet/freescale/fec_main.c    | 137 +++++++++++++--------------
 drivers/net/ethernet/freescale/fec_mpc52xx.c |   2 +-
 drivers/net/ethernet/freescale/fec_ptp.c     |  42 ++++----
 4 files changed, 96 insertions(+), 100 deletions(-)
---
base-commit: 170e4e3944aa39accf64d869b27c187f8c08abc7
change-id: 20240925-fec-cleanups-c9b5544bc854

Best regards,
-- 
Marc Kleine-Budde <mkl@pengutronix.de>



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 01/11] net: fec: fix typos found by codespell
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 02/11] net: fec: struct fec_enet_private: remove obsolete comment Marc Kleine-Budde
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li, Andrew Lunn

codespell has found some typos in the comments, fix them.

Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Csókás, Bence <csokas.bence@prolan.hu>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec.h         | 8 ++++----
 drivers/net/ethernet/freescale/fec_mpc52xx.c | 2 +-
 drivers/net/ethernet/freescale/fec_ptp.c     | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index c81f2ea588f2..3cce9bba5dee 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -115,7 +115,7 @@
 #define IEEE_T_MCOL		0x254 /* Frames tx'd with multiple collision */
 #define IEEE_T_DEF		0x258 /* Frames tx'd after deferral delay */
 #define IEEE_T_LCOL		0x25c /* Frames tx'd with late collision */
-#define IEEE_T_EXCOL		0x260 /* Frames tx'd with excesv collisions */
+#define IEEE_T_EXCOL		0x260 /* Frames tx'd with excessive collisions */
 #define IEEE_T_MACERR		0x264 /* Frames tx'd with TX FIFO underrun */
 #define IEEE_T_CSERR		0x268 /* Frames tx'd with carrier sense err */
 #define IEEE_T_SQE		0x26c /* Frames tx'd with SQE err */
@@ -342,7 +342,7 @@ struct bufdesc_ex {
 #define FEC_TX_BD_FTYPE(X)	(((X) & 0xf) << 20)
 
 /* The number of Tx and Rx buffers.  These are allocated from the page
- * pool.  The code may assume these are power of two, so it it best
+ * pool.  The code may assume these are power of two, so it is best
  * to keep them that size.
  * We don't need to allocate pages for the transmitter.  We just use
  * the skbuffer directly.
@@ -460,7 +460,7 @@ struct bufdesc_ex {
 #define FEC_QUIRK_SINGLE_MDIO		(1 << 11)
 /* Controller supports RACC register */
 #define FEC_QUIRK_HAS_RACC		(1 << 12)
-/* Controller supports interrupt coalesc */
+/* Controller supports interrupt coalesce */
 #define FEC_QUIRK_HAS_COALESCE		(1 << 13)
 /* Interrupt doesn't wake CPU from deep idle */
 #define FEC_QUIRK_ERR006687		(1 << 14)
@@ -495,7 +495,7 @@ struct bufdesc_ex {
  */
 #define FEC_QUIRK_HAS_EEE		(1 << 20)
 
-/* i.MX8QM ENET IP version add new feture to generate delayed TXC/RXC
+/* i.MX8QM ENET IP version add new feature to generate delayed TXC/RXC
  * as an alternative option to make sure it works well with various PHYs.
  * For the implementation of delayed clock, ENET takes synchronized 250MHz
  * clocks to generate 2ns delay.
diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx.c b/drivers/net/ethernet/freescale/fec_mpc52xx.c
index 2bfaf14f65c8..3fc29afc9854 100644
--- a/drivers/net/ethernet/freescale/fec_mpc52xx.c
+++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c
@@ -619,7 +619,7 @@ static void mpc52xx_fec_hw_init(struct net_device *dev)
 	out_be32(&fec->rfifo_alarm, 0x0000030c);
 	out_be32(&fec->tfifo_alarm, 0x00000100);
 
-	/* begin transmittion when 256 bytes are in FIFO (or EOF or FIFO full) */
+	/* begin transmission when 256 bytes are in FIFO (or EOF or FIFO full) */
 	out_be32(&fec->x_wmrk, FEC_FIFO_WMRK_256B);
 
 	/* enable crc generation */
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 876d90832596..d6d9f0d6ca99 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -117,7 +117,7 @@ static u64 fec_ptp_read(const struct cyclecounter *cc)
  * @fep: the fec_enet_private structure handle
  * @enable: enable the channel pps output
  *
- * This function enble the PPS ouput on the timer channel.
+ * This function enables the PPS output on the timer channel.
  */
 static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
 {
@@ -172,7 +172,7 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
 		 * very close to the second point, which means NSEC_PER_SEC
 		 * - ts.tv_nsec is close to be zero(For example 20ns); Since the timer
 		 * is still running when we calculate the first compare event, it is
-		 * possible that the remaining nanoseonds run out before the compare
+		 * possible that the remaining nanoseconds run out before the compare
 		 * counter is calculated and written into TCCR register. To avoid
 		 * this possibility, we will set the compare event to be the next
 		 * of next second. The current setting is 31-bit timer and wrap

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 02/11] net: fec: struct fec_enet_private: remove obsolete comment
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 01/11] net: fec: fix typos found by codespell Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h Marc Kleine-Budde
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li, Andrew Lunn

In commit 4d494cdc92b3 ("net: fec: change data structure to support
multiqueue") the data structures were changed, so that the comment about
the sent-in-place skb doesn't apply any more. Remove it.

Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index 3cce9bba5dee..ce1e4fe4d492 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -614,7 +614,6 @@ struct fec_enet_private {
 	unsigned int num_tx_queues;
 	unsigned int num_rx_queues;
 
-	/* The saved address of a sent-in-place packet/buffer, for skfree(). */
 	struct fec_enet_priv_tx_q *tx_queue[FEC_ENET_MAX_TX_QS];
 	struct fec_enet_priv_rx_q *rx_queue[FEC_ENET_MAX_RX_QS];
 

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 01/11] net: fec: fix typos found by codespell Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 02/11] net: fec: struct fec_enet_private: remove obsolete comment Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-19  1:39   ` Wei Fang
  2025-06-18 12:00 ` [PATCH net-next v4 04/11] net: fec: sort the includes by alphabetic order Marc Kleine-Budde
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde

To fix the checkpatch warning, use linux/cacheflush.h instead of
asm/cacheflush.h.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 17e9bddb9ddd..dbfc191bcde1 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -49,6 +49,7 @@
 #include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/cacheflush.h>
 #include <linux/clk.h>
 #include <linux/crc32.h>
 #include <linux/platform_device.h>
@@ -71,8 +72,6 @@
 #include <linux/bpf.h>
 #include <linux/bpf_trace.h>
 
-#include <asm/cacheflush.h>
-
 #include "fec.h"
 
 static void set_multicast_list(struct net_device *ndev);

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 04/11] net: fec: sort the includes by alphabetic order
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (2 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 05/11] net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info Marc Kleine-Budde
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde

This is a preparation patch to make addition of new includes easier
without breaking the alphabetic order.

Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec.h      |  6 +--
 drivers/net/ethernet/freescale/fec_main.c | 80 +++++++++++++++----------------
 drivers/net/ethernet/freescale/fec_ptp.c  | 38 +++++++--------
 3 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index ce1e4fe4d492..5c8fdcef759b 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -14,14 +14,14 @@
 #define	FEC_H
 /****************************************************************************/
 
+#include <dt-bindings/firmware/imx/rsrc.h>
+#include <linux/bpf.h>
 #include <linux/clocksource.h>
+#include <linux/firmware/imx/sci.h>
 #include <linux/net_tstamp.h>
 #include <linux/pm_qos.h>
-#include <linux/bpf.h>
 #include <linux/ptp_clock_kernel.h>
 #include <linux/timecounter.h>
-#include <dt-bindings/firmware/imx/rsrc.h>
-#include <linux/firmware/imx/sci.h>
 #include <net/xdp.h>
 
 #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index dbfc191bcde1..3b1a4506caa6 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -22,55 +22,55 @@
  * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
  */
 
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/pm_runtime.h>
-#include <linux/ptrace.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/slab.h>
-#include <linux/interrupt.h>
+#include <linux/bitops.h>
+#include <linux/bpf.h>
+#include <linux/bpf_trace.h>
+#include <linux/cacheflush.h>
+#include <linux/clk.h>
+#include <linux/crc32.h>
 #include <linux/delay.h>
-#include <linux/netdevice.h>
+#include <linux/errno.h>
 #include <linux/etherdevice.h>
-#include <linux/skbuff.h>
+#include <linux/fec.h>
+#include <linux/filter.h>
+#include <linux/gpio/consumer.h>
+#include <linux/icmp.h>
+#include <linux/if_vlan.h>
 #include <linux/in.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/ioport.h>
 #include <linux/ip.h>
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/mdio.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/of.h>
+#include <linux/of_mdio.h>
+#include <linux/of_net.h>
+#include <linux/phy.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
+#include <linux/prefetch.h>
+#include <linux/property.h>
+#include <linux/ptrace.h>
+#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
+#include <linux/skbuff.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/string.h>
+#include <linux/tcp.h>
+#include <linux/udp.h>
+#include <linux/workqueue.h>
 #include <net/ip.h>
 #include <net/page_pool/helpers.h>
 #include <net/selftests.h>
 #include <net/tso.h>
-#include <linux/tcp.h>
-#include <linux/udp.h>
-#include <linux/icmp.h>
-#include <linux/spinlock.h>
-#include <linux/workqueue.h>
-#include <linux/bitops.h>
-#include <linux/io.h>
-#include <linux/irq.h>
-#include <linux/cacheflush.h>
-#include <linux/clk.h>
-#include <linux/crc32.h>
-#include <linux/platform_device.h>
-#include <linux/property.h>
-#include <linux/mdio.h>
-#include <linux/phy.h>
-#include <linux/fec.h>
-#include <linux/of.h>
-#include <linux/of_mdio.h>
-#include <linux/of_net.h>
-#include <linux/regulator/consumer.h>
-#include <linux/if_vlan.h>
-#include <linux/pinctrl/consumer.h>
-#include <linux/gpio/consumer.h>
-#include <linux/prefetch.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
 #include <soc/imx/cpuidle.h>
-#include <linux/filter.h>
-#include <linux/bpf.h>
-#include <linux/bpf_trace.h>
 
 #include "fec.h"
 
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index d6d9f0d6ca99..afe162c9eed8 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -7,30 +7,30 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/ptrace.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/slab.h>
-#include <linux/interrupt.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/spinlock.h>
-#include <linux/workqueue.h>
 #include <linux/bitops.h>
-#include <linux/io.h>
-#include <linux/irq.h>
 #include <linux/clk.h>
-#include <linux/platform_device.h>
-#include <linux/phy.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/etherdevice.h>
 #include <linux/fec.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/ioport.h>
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/netdevice.h>
 #include <linux/of.h>
 #include <linux/of_net.h>
+#include <linux/pci.h>
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+#include <linux/ptrace.h>
+#include <linux/skbuff.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/string.h>
+#include <linux/workqueue.h>
 
 #include "fec.h"
 

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 05/11] net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (3 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 04/11] net: fec: sort the includes by alphabetic order Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 06/11] net: fec: fec_restart(): introduce a define for FEC_ECR_SPEED Marc Kleine-Budde
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li, Andrew Lunn

In da722186f654 ("net: fec: set GPR bit on suspend by DT
configuration.") the platform_device_id fec_devtype::driver_data was
converted from holding the quirks to a pointing to struct fec_devinfo.

The struct fec_devinfo holding the information for the i.MX6SX was
named fec_imx6x_info.

Rename fec_imx6x_info to fec_imx6sx_info to align with the SoC's name.

Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 3b1a4506caa6..083b7e07a9d1 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -130,7 +130,7 @@ static const struct fec_devinfo fec_mvf600_info = {
 		  FEC_QUIRK_HAS_MDIO_C45,
 };
 
-static const struct fec_devinfo fec_imx6x_info = {
+static const struct fec_devinfo fec_imx6sx_info = {
 	.quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
 		  FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
 		  FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB |
@@ -195,7 +195,7 @@ static const struct of_device_id fec_dt_ids[] = {
 	{ .compatible = "fsl,imx28-fec", .data = &fec_imx28_info, },
 	{ .compatible = "fsl,imx6q-fec", .data = &fec_imx6q_info, },
 	{ .compatible = "fsl,mvf600-fec", .data = &fec_mvf600_info, },
-	{ .compatible = "fsl,imx6sx-fec", .data = &fec_imx6x_info, },
+	{ .compatible = "fsl,imx6sx-fec", .data = &fec_imx6sx_info, },
 	{ .compatible = "fsl,imx6ul-fec", .data = &fec_imx6ul_info, },
 	{ .compatible = "fsl,imx8mq-fec", .data = &fec_imx8mq_info, },
 	{ .compatible = "fsl,imx8qm-fec", .data = &fec_imx8qm_info, },

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 06/11] net: fec: fec_restart(): introduce a define for FEC_ECR_SPEED
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (4 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 05/11] net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 07/11] net: fec: fec_enet_rx_queue(): use same signature as fec_enet_tx_queue() Marc Kleine-Budde
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li, Andrew Lunn

Replace "1 << 5" for configuring 1000 MBit/s with a defined constant to
improve code readability and maintainability.

Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 083b7e07a9d1..e4fc1baf114d 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -275,6 +275,7 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
 #define FEC_ECR_MAGICEN         BIT(2)
 #define FEC_ECR_SLEEP           BIT(3)
 #define FEC_ECR_EN1588          BIT(4)
+#define FEC_ECR_SPEED           BIT(5)
 #define FEC_ECR_BYTESWP         BIT(8)
 /* FEC RCR bits definition */
 #define FEC_RCR_LOOP            BIT(0)
@@ -1206,7 +1207,7 @@ fec_restart(struct net_device *ndev)
 		/* 1G, 100M or 10M */
 		if (ndev->phydev) {
 			if (ndev->phydev->speed == SPEED_1000)
-				ecntl |= (1 << 5);
+				ecntl |= FEC_ECR_SPEED;
 			else if (ndev->phydev->speed == SPEED_100)
 				rcntl &= ~FEC_RCR_10BASET;
 			else

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 07/11] net: fec: fec_enet_rx_queue(): use same signature as fec_enet_tx_queue()
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (5 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 06/11] net: fec: fec_restart(): introduce a define for FEC_ECR_SPEED Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 08/11] net: fec: fec_enet_rx_queue(): replace manual VLAN header calculation with skb_vlan_eth_hdr() Marc Kleine-Budde
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Andrew Lunn

There are the functions fec_enet_rx_queue() and fec_enet_tx_queue(),
one for handling the RX queue the other one handles the TX queue.

However they don't have the same signature. Align fec_enet_rx_queue()
argument order with fec_enet_tx_queue() to make code more readable.

Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index e4fc1baf114d..9e4164fc0cd1 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1712,7 +1712,7 @@ fec_enet_run_xdp(struct fec_enet_private *fep, struct bpf_prog *prog,
  * effectively tossing the packet.
  */
 static int
-fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
+fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 {
 	struct fec_enet_private *fep = netdev_priv(ndev);
 	struct fec_enet_priv_rx_q *rxq;
@@ -1939,7 +1939,7 @@ static int fec_enet_rx(struct net_device *ndev, int budget)
 
 	/* Make sure that AVB queues are processed first. */
 	for (i = fep->num_rx_queues - 1; i >= 0; i--)
-		done += fec_enet_rx_queue(ndev, budget - done, i);
+		done += fec_enet_rx_queue(ndev, i, budget - done);
 
 	return done;
 }

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 08/11] net: fec: fec_enet_rx_queue(): replace manual VLAN header calculation with skb_vlan_eth_hdr()
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (6 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 07/11] net: fec: fec_enet_rx_queue(): use same signature as fec_enet_tx_queue() Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 09/11] net: fec: fec_enet_rx_queue(): reduce scope of data Marc Kleine-Budde
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li, Andrew Lunn

For better readability and maintainability, use the provided helper function
skb_vlan_eth_hdr() to replace manual the VLAN header calculation, and change
the type of vlan_header to struct vlan_ethhdr to take into account that the
Ethernet header plus VLAN header is returned.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 9e4164fc0cd1..45dd96f4786e 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1859,8 +1859,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 		    fep->bufdesc_ex &&
 		    (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN))) {
 			/* Push and remove the vlan tag */
-			struct vlan_hdr *vlan_header =
-					(struct vlan_hdr *) (data + ETH_HLEN);
+			struct vlan_ethhdr *vlan_header = skb_vlan_eth_hdr(skb);
 			vlan_tag = ntohs(vlan_header->h_vlan_TCI);
 
 			vlan_packet_rcvd = true;

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 09/11] net: fec: fec_enet_rx_queue(): reduce scope of data
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (7 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 08/11] net: fec: fec_enet_rx_queue(): replace manual VLAN header calculation with skb_vlan_eth_hdr() Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 10/11] net: fec: fec_enet_rx_queue(): move_call to _vlan_hwaccel_put_tag() Marc Kleine-Budde
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li

In order to clean up of the VLAN handling, reduce the scope of data.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 45dd96f4786e..84dd08473280 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1720,7 +1720,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 	unsigned short status;
 	struct  sk_buff *skb;
 	ushort	pkt_len;
-	__u8 *data;
 	int	pkt_received = 0;
 	struct	bufdesc_ex *ebdp = NULL;
 	bool	vlan_packet_rcvd = false;
@@ -1843,10 +1842,11 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 		skb_mark_for_recycle(skb);
 
 		if (unlikely(need_swap)) {
+			u8 *data;
+
 			data = page_address(page) + FEC_ENET_XDP_HEADROOM;
 			swap_buffer(data, pkt_len);
 		}
-		data = skb->data;
 
 		/* Extract the enhanced buffer descriptor */
 		ebdp = NULL;
@@ -1864,7 +1864,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 
 			vlan_packet_rcvd = true;
 
-			memmove(skb->data + VLAN_HLEN, data, ETH_ALEN * 2);
+			memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2);
 			skb_pull(skb, VLAN_HLEN);
 		}
 

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 10/11] net: fec: fec_enet_rx_queue(): move_call to _vlan_hwaccel_put_tag()
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (8 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 09/11] net: fec: fec_enet_rx_queue(): reduce scope of data Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:00 ` [PATCH net-next v4 11/11] net: fec: fec_enet_rx_queue(): factor out VLAN handling into separate function fec_enet_rx_vlan() Marc Kleine-Budde
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li

Move __vlan_hwaccel_put_tag() into the if statement that sets
vlan_packet_rcvd = true. This change eliminates the unnecessary
vlan_packet_rcvd variable, simplifying the code and improving clarity.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 84dd08473280..6797aa1ed639 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1722,8 +1722,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 	ushort	pkt_len;
 	int	pkt_received = 0;
 	struct	bufdesc_ex *ebdp = NULL;
-	bool	vlan_packet_rcvd = false;
-	u16	vlan_tag;
 	int	index = 0;
 	bool	need_swap = fep->quirks & FEC_QUIRK_SWAP_FRAME;
 	struct bpf_prog *xdp_prog = READ_ONCE(fep->xdp_prog);
@@ -1854,18 +1852,18 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 			ebdp = (struct bufdesc_ex *)bdp;
 
 		/* If this is a VLAN packet remove the VLAN Tag */
-		vlan_packet_rcvd = false;
 		if ((ndev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
 		    fep->bufdesc_ex &&
 		    (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN))) {
 			/* Push and remove the vlan tag */
 			struct vlan_ethhdr *vlan_header = skb_vlan_eth_hdr(skb);
-			vlan_tag = ntohs(vlan_header->h_vlan_TCI);
-
-			vlan_packet_rcvd = true;
+			u16 vlan_tag = ntohs(vlan_header->h_vlan_TCI);
 
 			memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2);
 			skb_pull(skb, VLAN_HLEN);
+			__vlan_hwaccel_put_tag(skb,
+					       htons(ETH_P_8021Q),
+					       vlan_tag);
 		}
 
 		skb->protocol = eth_type_trans(skb, ndev);
@@ -1885,12 +1883,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 			}
 		}
 
-		/* Handle received VLAN packets */
-		if (vlan_packet_rcvd)
-			__vlan_hwaccel_put_tag(skb,
-					       htons(ETH_P_8021Q),
-					       vlan_tag);
-
 		skb_record_rx_queue(skb, queue_id);
 		napi_gro_receive(&fep->napi, skb);
 

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH net-next v4 11/11] net: fec: fec_enet_rx_queue(): factor out VLAN handling into separate function fec_enet_rx_vlan()
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (9 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 10/11] net: fec: fec_enet_rx_queue(): move_call to _vlan_hwaccel_put_tag() Marc Kleine-Budde
@ 2025-06-18 12:00 ` Marc Kleine-Budde
  2025-06-18 12:12 ` [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
  2025-06-19 22:40 ` patchwork-bot+netdevbpf
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:00 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Marc Kleine-Budde,
	Frank Li

In order to clean up of the VLAN handling, factor out the VLAN
handling into separate function fec_enet_rx_vlan().

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 32 ++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 6797aa1ed639..63dac4272045 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1706,6 +1706,22 @@ fec_enet_run_xdp(struct fec_enet_private *fep, struct bpf_prog *prog,
 	return ret;
 }
 
+static void fec_enet_rx_vlan(const struct net_device *ndev, struct sk_buff *skb)
+{
+	if (ndev->features & NETIF_F_HW_VLAN_CTAG_RX) {
+		const struct vlan_ethhdr *vlan_header = skb_vlan_eth_hdr(skb);
+		const u16 vlan_tag = ntohs(vlan_header->h_vlan_TCI);
+
+		/* Push and remove the vlan tag */
+
+		memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2);
+		skb_pull(skb, VLAN_HLEN);
+		__vlan_hwaccel_put_tag(skb,
+				       htons(ETH_P_8021Q),
+				       vlan_tag);
+	}
+}
+
 /* During a receive, the bd_rx.cur points to the current incoming buffer.
  * When we update through the ring, if the next incoming buffer has
  * not been given to the system, we just set the empty indicator,
@@ -1852,19 +1868,9 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 			ebdp = (struct bufdesc_ex *)bdp;
 
 		/* If this is a VLAN packet remove the VLAN Tag */
-		if ((ndev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
-		    fep->bufdesc_ex &&
-		    (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN))) {
-			/* Push and remove the vlan tag */
-			struct vlan_ethhdr *vlan_header = skb_vlan_eth_hdr(skb);
-			u16 vlan_tag = ntohs(vlan_header->h_vlan_TCI);
-
-			memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2);
-			skb_pull(skb, VLAN_HLEN);
-			__vlan_hwaccel_put_tag(skb,
-					       htons(ETH_P_8021Q),
-					       vlan_tag);
-		}
+		if (fep->bufdesc_ex &&
+		    (ebdp->cbd_esc & cpu_to_fec32(BD_ENET_RX_VLAN)))
+			fec_enet_rx_vlan(ndev, skb);
 
 		skb->protocol = eth_type_trans(skb, ndev);
 

-- 
2.47.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (10 preceding siblings ...)
  2025-06-18 12:00 ` [PATCH net-next v4 11/11] net: fec: fec_enet_rx_queue(): factor out VLAN handling into separate function fec_enet_rx_vlan() Marc Kleine-Budde
@ 2025-06-18 12:12 ` Marc Kleine-Budde
  2025-06-19 22:40 ` patchwork-bot+netdevbpf
  12 siblings, 0 replies; 15+ messages in thread
From: Marc Kleine-Budde @ 2025-06-18 12:12 UTC (permalink / raw)
  To: Wei Fang, Shenwei Wang, Clark Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, Andrew Lunn,
	Alexander Lobakin
  Cc: imx, netdev, linux-kernel, kernel, bpf, Frank Li, Andrew Lunn

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

On 18.06.2025 14:00:00, Marc Kleine-Budde wrote:
> This series first cleans up the fec driver a bit (typos, obsolete
> comments, add missing header files, rename struct, replace magic
> number by defines).
> 
> The last 5 patches clean up the fec_enet_rx_queue() function,
> including VLAN handling.

I accidentally dropped the patch "net: fec: add missing header files".
But this series can be applies as is, I'll include the missing patch in
my next series.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH net-next v4 03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h
  2025-06-18 12:00 ` [PATCH net-next v4 03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h Marc Kleine-Budde
@ 2025-06-19  1:39   ` Wei Fang
  0 siblings, 0 replies; 15+ messages in thread
From: Wei Fang @ 2025-06-19  1:39 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: imx@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	bpf@vger.kernel.org, Shenwei Wang, Clark Wang, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Richard Cochran,
	Andrew Lunn, Alexander Lobakin

> To fix the checkpatch warning, use linux/cacheflush.h instead of
> asm/cacheflush.h.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 17e9bddb9ddd..dbfc191bcde1 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -49,6 +49,7 @@
>  #include <linux/bitops.h>
>  #include <linux/io.h>
>  #include <linux/irq.h>
> +#include <linux/cacheflush.h>
>  #include <linux/clk.h>
>  #include <linux/crc32.h>
>  #include <linux/platform_device.h>
> @@ -71,8 +72,6 @@
>  #include <linux/bpf.h>
>  #include <linux/bpf_trace.h>
> 
> -#include <asm/cacheflush.h>
> -
>  #include "fec.h"
> 
>  static void set_multicast_list(struct net_device *ndev);
> 

Reviewed-by: Wei Fang <wei.fang@nxp.com>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups
  2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
                   ` (11 preceding siblings ...)
  2025-06-18 12:12 ` [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
@ 2025-06-19 22:40 ` patchwork-bot+netdevbpf
  12 siblings, 0 replies; 15+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-19 22:40 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: wei.fang, shenwei.wang, xiaoning.wang, davem, edumazet, kuba,
	pabeni, richardcochran, andrew+netdev, aleksander.lobakin, imx,
	netdev, linux-kernel, kernel, bpf, Frank.Li, andrew

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 18 Jun 2025 14:00:00 +0200 you wrote:
> This series first cleans up the fec driver a bit (typos, obsolete
> comments, add missing header files, rename struct, replace magic
> number by defines).
> 
> The last 5 patches clean up the fec_enet_rx_queue() function,
> including VLAN handling.
> 
> [...]

Here is the summary with links:
  - [net-next,v4,01/11] net: fec: fix typos found by codespell
    https://git.kernel.org/netdev/net-next/c/a822bdb23b3b
  - [net-next,v4,02/11] net: fec: struct fec_enet_private: remove obsolete comment
    https://git.kernel.org/netdev/net-next/c/3e03dad543fd
  - [net-next,v4,03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h
    https://git.kernel.org/netdev/net-next/c/99d171ae9595
  - [net-next,v4,04/11] net: fec: sort the includes by alphabetic order
    https://git.kernel.org/netdev/net-next/c/658e25f770de
  - [net-next,v4,05/11] net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info
    https://git.kernel.org/netdev/net-next/c/4e8594a88656
  - [net-next,v4,06/11] net: fec: fec_restart(): introduce a define for FEC_ECR_SPEED
    https://git.kernel.org/netdev/net-next/c/a4addc337745
  - [net-next,v4,07/11] net: fec: fec_enet_rx_queue(): use same signature as fec_enet_tx_queue()
    https://git.kernel.org/netdev/net-next/c/e222c08f9669
  - [net-next,v4,08/11] net: fec: fec_enet_rx_queue(): replace manual VLAN header calculation with skb_vlan_eth_hdr()
    https://git.kernel.org/netdev/net-next/c/e4a3659a986e
  - [net-next,v4,09/11] net: fec: fec_enet_rx_queue(): reduce scope of data
    https://git.kernel.org/netdev/net-next/c/33b9f31893bd
  - [net-next,v4,10/11] net: fec: fec_enet_rx_queue(): move_call to _vlan_hwaccel_put_tag()
    https://git.kernel.org/netdev/net-next/c/4dffaf379104
  - [net-next,v4,11/11] net: fec: fec_enet_rx_queue(): factor out VLAN handling into separate function fec_enet_rx_vlan()
    https://git.kernel.org/netdev/net-next/c/0593f8df66e5

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-06-19 22:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 12:00 [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 01/11] net: fec: fix typos found by codespell Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 02/11] net: fec: struct fec_enet_private: remove obsolete comment Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 03/11] net: fec: switch from asm/cacheflush.h to linux/cacheflush.h Marc Kleine-Budde
2025-06-19  1:39   ` Wei Fang
2025-06-18 12:00 ` [PATCH net-next v4 04/11] net: fec: sort the includes by alphabetic order Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 05/11] net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 06/11] net: fec: fec_restart(): introduce a define for FEC_ECR_SPEED Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 07/11] net: fec: fec_enet_rx_queue(): use same signature as fec_enet_tx_queue() Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 08/11] net: fec: fec_enet_rx_queue(): replace manual VLAN header calculation with skb_vlan_eth_hdr() Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 09/11] net: fec: fec_enet_rx_queue(): reduce scope of data Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 10/11] net: fec: fec_enet_rx_queue(): move_call to _vlan_hwaccel_put_tag() Marc Kleine-Budde
2025-06-18 12:00 ` [PATCH net-next v4 11/11] net: fec: fec_enet_rx_queue(): factor out VLAN handling into separate function fec_enet_rx_vlan() Marc Kleine-Budde
2025-06-18 12:12 ` [PATCH net-next v4 00/11] net: fec: general + VLAN cleanups Marc Kleine-Budde
2025-06-19 22:40 ` patchwork-bot+netdevbpf

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).