Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next v1 1/1] net: selftests: add MTU test
@ 2021-07-22  7:34 Oleksij Rempel
  2021-07-22  8:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Oleksij Rempel @ 2021-07-22  7:34 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Andrew Lunn, Florian Fainelli,
	Heiner Kallweit, Fugang Duan
  Cc: Oleksij Rempel, kernel, netdev, linux-arm-kernel, linux-kernel,
	linux-imx, Fabio Estevam, David Jander, Russell King,
	Philippe Schenker

Test if we actually can send/receive packets with MTU size. This kind of
issue was detected on ASIX HW with bogus EEPROM.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 net/core/selftests.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/net/core/selftests.c b/net/core/selftests.c
index ba7b0171974c..9077fa969892 100644
--- a/net/core/selftests.c
+++ b/net/core/selftests.c
@@ -318,6 +318,15 @@ static int net_test_phy_loopback_udp(struct net_device *ndev)
 	return __net_test_loopback(ndev, &attr);
 }
 
+static int net_test_phy_loopback_udp_mtu(struct net_device *ndev)
+{
+	struct net_packet_attrs attr = { };
+
+	attr.dst = ndev->dev_addr;
+	attr.max_size = ndev->mtu;
+	return __net_test_loopback(ndev, &attr);
+}
+
 static int net_test_phy_loopback_tcp(struct net_device *ndev)
 {
 	struct net_packet_attrs attr = { };
@@ -344,6 +353,9 @@ static const struct net_test {
 	}, {
 		.name = "PHY internal loopback, UDP    ",
 		.fn = net_test_phy_loopback_udp,
+	}, {
+		.name = "PHY internal loopback, MTU    ",
+		.fn = net_test_phy_loopback_udp_mtu,
 	}, {
 		.name = "PHY internal loopback, TCP    ",
 		.fn = net_test_phy_loopback_tcp,
-- 
2.30.2


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

* Re: [PATCH net-next v1 1/1] net: selftests: add MTU test
  2021-07-22  7:34 [PATCH net-next v1 1/1] net: selftests: add MTU test Oleksij Rempel
@ 2021-07-22  8:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-22  8:00 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: shawnguo, s.hauer, andrew, f.fainelli, hkallweit1, fugang.duan,
	kernel, netdev, linux-arm-kernel, linux-kernel, linux-imx,
	festevam, david, linux, philippe.schenker

Hello:

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

On Thu, 22 Jul 2021 09:34:27 +0200 you wrote:
> Test if we actually can send/receive packets with MTU size. This kind of
> issue was detected on ASIX HW with bogus EEPROM.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  net/core/selftests.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

Here is the summary with links:
  - [net-next,v1,1/1] net: selftests: add MTU test
    https://git.kernel.org/netdev/net-next/c/802a76affb09

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

end of thread, other threads:[~2021-07-22  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22  7:34 [PATCH net-next v1 1/1] net: selftests: add MTU test Oleksij Rempel
2021-07-22  8:00 ` 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).