From nobody Wed Apr 06 14:05:03 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A21951A8DBC4 for ; Wed, 6 Apr 2022 14:05:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KYR9C1RYbz3JPM for ; Wed, 6 Apr 2022 14:05:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1237D1C7D4 for ; Wed, 6 Apr 2022 14:05:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 236E53vS070279 for ; Wed, 6 Apr 2022 14:05:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 236E53k0070278 for bugs@FreeBSD.org; Wed, 6 Apr 2022 14:05:03 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 263091] [genet] genet interface is not able to transmit/receive packet after the interface is marked "down" then marked "up" Date: Wed, 06 Apr 2022 14:05:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jiahali@blackberry.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649253903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oi6ucusxsqOTnZA9sAlb0za1IrTWLnvVP2958rgbAkc=; b=MSBhdxbvJqHeF6TUXigJrPuSROYm4NRVA0V6u7Akiu+1d6jTxhQ9MHVBLqnnXABKLGsUkI mFhKcNu44VeYw/Sh9hiYyPBtuezv87CNeJn4qFLip2743nxPgCSEd6dVpun0akBi8iDJbu G6Xe/bA3wZoE1qn1ePM8dyMTjQ66C2z3gKRYcZ3D91quuG13iPL81AXzPmKzfqot/cLtIh vekqSnuw4qBpR5Q+kXdQ14wdsofybvZ1pFVzvuecOhnLCEv8CTuWzhkgon2foiuJhclvFg 6I5w7nID+/a2nytjAgGGTFYmpu7Gug7neUoTqpX8zKZcy+aCbOsCORtxTLD73Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649253903; a=rsa-sha256; cv=none; b=Hq5n1VcpK4NyjqnkXy2lNn1mBDLzKlMtr7UNaOtcUW99IBzH7iaxL3Lb3t6XbPtouzFGss eZzwEgQ/uriH4Yi00trX06iLwhZmliUP4SfqRBeZwP8vMMRgIXFexFPkBmNz+QCPixe97w WZud/Q5xN/AOIJFlFSgHqjnnRPZETlu/MlsV6IqiwBS40O0nWSvMQYGk0G1qIYQysPhpmu YKp9ZZaYgO79kAV7MlNNlUZxlSs0GY4e9in5RcM/lJ2+MVRcSHAO+WUglevDtDrunf6RxJ dAvGoE60rJ5D7px+69DwUCQEKP0BSetwYeQZY3UEhmHZVBTcwHT5YOdejNeARQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263091 Bug ID: 263091 Summary: [genet] genet interface is not able to transmit/receive packet after the interface is marked "down" then marked "up" Product: Base System Version: CURRENT Hardware: arm64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jiahali@blackberry.com Overview -------- The genet interface is not able transmit/receive any packets after the genet interface is marked "down" firstly then marked "up". The reason is that the implementation genet driver code will reset the genet interface but not change the runtime flag of genet driver. Therefore, when "ifconfig genet up" command is used, the genet driver cannot be re-initiali= zed again. Moreover, the initialization of genet driver is to enbale the driver= 's DMA and interrupts, which is not enbale the genet driver being reset when g= enet is marked down. Steps to Reproduce ------------------ 1. Config a static IP address to both of the host's interface and the genet interface In the DUT(Device Under Test), with genet interface and Freebsd running, si= de root@generic:~ # ifconfig genet0 192.168.3.129 netmask 255.255.255.0 root@generic:~ # ifconfig genet0 genet0: flags=3D8843 metric 0 mtu 1= 500 =20=20=20=20=20=20=20 options=3D68000b ether dc:a6:32:bf:f4:e6 inet 192.168.3.129 netmask 0xffffff00 broadcast 192.168.3.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D29 In the host computer with direct Ethernet cable connection to the DUT $ sudo ifconfig enp0s31f6 192.168.3.2 $ ifconfig enp0s31f6 enp0s31f6: flags=3D4163 mtu 1500 inet 192.168.3.2 netmask 255.255.255.0 broadcast 192.168.3.255 ether 8c:8c:aa:c1:2b:c3 txqueuelen 1000 (Ethernet) RX packets 384 bytes 37406 (37.4 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 5674 bytes 1175798 (1.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 16 memory 0xae380000-ae3a0000 2. Host's interface and genet interface can transmit/receive packet to/from each other In the DUT root@generic:~ # ping 192.168.3.2 PING 192.168.3.2 (192.168.3.2): 56 data bytes 64 bytes from 192.168.3.2: icmp_seq=3D0 ttl=3D64 time=3D0.445 ms 64 bytes from 192.168.3.2: icmp_seq=3D1 ttl=3D64 time=3D0.321 ms 64 bytes from 192.168.3.2: icmp_seq=3D2 ttl=3D64 time=3D0.361 ms ^C --- 192.168.3.2 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev =3D 0.321/0.376/0.445/0.051 ms In the host $ ping 192.168.3.129 PING 192.168.3.129 (192.168.3.129) 56(84) bytes of data. 64 bytes from 192.168.3.129: icmp_seq=3D1 ttl=3D64 time=3D0.242 ms 64 bytes from 192.168.3.129: icmp_seq=3D2 ttl=3D64 time=3D0.233 ms 64 bytes from 192.168.3.129: icmp_seq=3D3 ttl=3D64 time=3D0.180 ms ^C --- 192.168.3.129 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2049ms rtt min/avg/max/mdev =3D 0.180/0.218/0.242/0.027 ms 3. Mark the genet interface "down", then mark the interface "up" root@generic:~ # ifconfig genet0 down root@generic:~ # ifconfig genet0 genet0: flags=3D8842 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D68000b ether dc:a6:32:bf:f4:e6 inet 192.168.3.129 netmask 0xffffff00 broadcast 192.168.3.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D29 root@generic:~ # ifconfig genet0 up root@generic:~ # ifconfig genet0=20 genet0: flags=3D8843 metric 0 mtu 1= 500 =20=20=20=20=20=20=20 options=3D68000b ether dc:a6:32:bf:f4:e6 inet 192.168.3.129 netmask 0xffffff00 broadcast 192.168.3.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D29 Actual Results -------------- 1. Genet interface is not able to transmit/receive any packet In the DUT root@generic:~ # ping 192.168.3.2 PING 192.168.3.2 (192.168.3.2): 56 data bytes ^C --- 192.168.3.2 ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss In the host $ ping 192.168.3.129 PING 192.168.3.129 (192.168.3.129) 56(84) bytes of data. From 192.168.3.2 icmp_seq=3D9 Destination Host Unreachable From 192.168.3.2 icmp_seq=3D10 Destination Host Unreachable From 192.168.3.2 icmp_seq=3D11 Destination Host Unreachable ^C --- 192.168.3.129 ping statistics --- 13 packets transmitted, 0 received, +3 errors, 100% packet loss, time 12280= ms pipe 4 Expected Results ---------------- The "ifconfig genet0 up" can re-enable the genet inerface after the genet interface is marked as "down". The data communication between the genet and= the host should be recovered when the interface is re-enbale. Build Date & Hardware --------------------- root@generic:~ # uname -a FreeBSD generic 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n254105-d53927b0b= ae: Thu Mar 31 09:26:32 UTC 2022=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm= 64 --=20 You are receiving this mail because: You are the assignee for the bug.=