netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: ag71xx: remove unnecessary MTU reservation
@ 2021-02-18  3:45 DENG Qingfang
  2021-02-18  5:28 ` Oleksij Rempel
  2021-02-23  1:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: DENG Qingfang @ 2021-02-18  3:45 UTC (permalink / raw)
  To: Oleksij Rempel, Chris Snook, David S. Miller, Jakub Kicinski,
	Philipp Zabel, Russell King, netdev, linux-kernel
  Cc: Rosen Penev

2 bytes of the MTU are reserved for Atheros DSA tag, but DSA core
has already handled that since commit dc0fe7d47f9f.
Remove the unnecessary reservation.

Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
---
 drivers/net/ethernet/atheros/ag71xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index dd5c8a9038bb..a60ce9030581 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -223,8 +223,6 @@
 #define AG71XX_REG_RX_SM	0x01b0
 #define AG71XX_REG_TX_SM	0x01b4
 
-#define ETH_SWITCH_HEADER_LEN	2
-
 #define AG71XX_DEFAULT_MSG_ENABLE	\
 	(NETIF_MSG_DRV			\
 	| NETIF_MSG_PROBE		\
@@ -933,7 +931,7 @@ static void ag71xx_hw_setup(struct ag71xx *ag)
 
 static unsigned int ag71xx_max_frame_len(unsigned int mtu)
 {
-	return ETH_SWITCH_HEADER_LEN + ETH_HLEN + VLAN_HLEN + mtu + ETH_FCS_LEN;
+	return ETH_HLEN + VLAN_HLEN + mtu + ETH_FCS_LEN;
 }
 
 static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
-- 
2.25.1


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

* Re: [PATCH net] net: ag71xx: remove unnecessary MTU reservation
  2021-02-18  3:45 [PATCH net] net: ag71xx: remove unnecessary MTU reservation DENG Qingfang
@ 2021-02-18  5:28 ` Oleksij Rempel
  2021-02-23  1:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2021-02-18  5:28 UTC (permalink / raw)
  To: DENG Qingfang
  Cc: Oleksij Rempel, Chris Snook, David S. Miller, Jakub Kicinski,
	Philipp Zabel, Russell King, netdev, linux-kernel, Rosen Penev

On Thu, Feb 18, 2021 at 11:45:14AM +0800, DENG Qingfang wrote:
> 2 bytes of the MTU are reserved for Atheros DSA tag, but DSA core
> has already handled that since commit dc0fe7d47f9f.
> Remove the unnecessary reservation.
> 
> Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver")
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>

Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>

Thank you!

> ---
>  drivers/net/ethernet/atheros/ag71xx.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
> index dd5c8a9038bb..a60ce9030581 100644
> --- a/drivers/net/ethernet/atheros/ag71xx.c
> +++ b/drivers/net/ethernet/atheros/ag71xx.c
> @@ -223,8 +223,6 @@
>  #define AG71XX_REG_RX_SM	0x01b0
>  #define AG71XX_REG_TX_SM	0x01b4
>  
> -#define ETH_SWITCH_HEADER_LEN	2
> -
>  #define AG71XX_DEFAULT_MSG_ENABLE	\
>  	(NETIF_MSG_DRV			\
>  	| NETIF_MSG_PROBE		\
> @@ -933,7 +931,7 @@ static void ag71xx_hw_setup(struct ag71xx *ag)
>  
>  static unsigned int ag71xx_max_frame_len(unsigned int mtu)
>  {
> -	return ETH_SWITCH_HEADER_LEN + ETH_HLEN + VLAN_HLEN + mtu + ETH_FCS_LEN;
> +	return ETH_HLEN + VLAN_HLEN + mtu + ETH_FCS_LEN;
>  }
>  
>  static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
> -- 
> 2.25.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH net] net: ag71xx: remove unnecessary MTU reservation
  2021-02-18  3:45 [PATCH net] net: ag71xx: remove unnecessary MTU reservation DENG Qingfang
  2021-02-18  5:28 ` Oleksij Rempel
@ 2021-02-23  1:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-23  1:50 UTC (permalink / raw)
  To: DENG Qingfang
  Cc: linux, chris.snook, davem, kuba, p.zabel, linux, netdev,
	linux-kernel, rosenp

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Thu, 18 Feb 2021 11:45:14 +0800 you wrote:
> 2 bytes of the MTU are reserved for Atheros DSA tag, but DSA core
> has already handled that since commit dc0fe7d47f9f.
> Remove the unnecessary reservation.
> 
> Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver")
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net] net: ag71xx: remove unnecessary MTU reservation
    https://git.kernel.org/netdev/net/c/04b385f32508

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] 3+ messages in thread

end of thread, other threads:[~2021-02-23  1:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18  3:45 [PATCH net] net: ag71xx: remove unnecessary MTU reservation DENG Qingfang
2021-02-18  5:28 ` Oleksij Rempel
2021-02-23  1:50 ` 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).