From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 89E3B5A0274 for ; Thu, 21 Mar 2024 13:51:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1711025483; bh=zci9nreTEBKUupel1QnV7aBQ6rEoy5tyfdbernxkeSU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OJtE0ZqciLqMvrHSLABjxIn9/Q23iljV6Pg5m+9tm80vHuGr1BX8eb0NJxZ8JT25I j4zBaRJWfEJDjtca2lERpkB6qMCRiLEu6U3GRk4Alb0ebWjgik5qKM8ec/np69aZ3F NBhCdWhpUo2BmJiJO/rcec+Kbva3SVIHRlZ7nzKpwCtjqdlBlOeEF8SGoxJEf5N8+8 PoX5FKJI/N8COMz1CUckf4vGgdbqsHbbrR3b9uT8NECJymtWlhWwlcB6zQYsSkQX/F H262/wdkE070RfPS4JqqgaGVdu3Q8AzJUbjTRjBEsXUC0Bs1ui4dk4noG2CM9UluKo WPwjO/BQma9fQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4V0lhC65dbz4wcC; Thu, 21 Mar 2024 23:51:23 +1100 (AEDT) Date: Thu, 21 Mar 2024 23:51:20 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [RFC v3] tcp: Replace TCP buffer structure by an iovec array Message-ID: References: <20240320163146.1918122-1-lvivier@redhat.com> <6d0c5777-ed50-4e99-96cb-35aa38d0e129@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2wwl79+oJ14RKh2w" Content-Disposition: inline In-Reply-To: Message-ID-Hash: 63A4RA2E2XLBCFH7YMBY5NFB6XTNEJLM X-Message-ID-Hash: 63A4RA2E2XLBCFH7YMBY5NFB6XTNEJLM X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --2wwl79+oJ14RKh2w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 21, 2024 at 11:47:45PM +1100, David Gibson wrote: > On Thu, Mar 21, 2024 at 01:21:03PM +0100, Laurent Vivier wrote: > > On 3/21/24 11:55, David Gibson wrote: > > > On Thu, Mar 21, 2024 at 09:26:58AM +0100, Laurent Vivier wrote: > > > > On 3/21/24 02:26, David Gibson wrote: > > > > > On Wed, Mar 20, 2024 at 05:31:46PM +0100, Laurent Vivier wrote: > > > > > > To be able to provide pointers to TCP headers and IP headers wi= thout > > > > > > worrying about alignment in the structure, split the structure = into > > > > > > several arrays and point to each part of the frame using an iov= ec array. > > > > > >=20 > > > > > > Using iovec also allows us to simply ignore the first entry whe= n the > > > > > > vnet length header is not needed. > > > > > >=20 > > > > > > Signed-off-by: Laurent Vivier > > > > >=20 > > > > > [snip] > > > > > > +static_assert(MSS4 <=3D sizeof(tcp4_payload[0].data)); > > > > >=20 > > > > > This generates a clang-tidy warning, because apparently the C11 > > > > > version of static_assert() requires a message - making it optiona= l is > > > > > a C2x extension. > > > > >=20 > > > > > Laurent, I know you're having trouble getting the full testsuite = to > > > > > run (but some ideas on that later today, I hope). But could you > > > > > please add a "make cppcheck" and "make clang-tidy" to your pre-po= st > > > > > routine. > > > > >=20 > > > >=20 > > > > I'll do. > > > > Thank you to have checked that. > > > > Are there any other commands to run before to send? > > > > Something like scripts/chekpatch.pl we have in QEMU? > > > >=20 > > > > I have always the same problem with the test suite, even after a "m= ake > > > > realclean" in test (see attachment) > > > > How to debug? > > >=20 > > > Huh. Guest kernel can't find root. That's not a fault I was > > > expecting (and alas, won't be helped by the patch I have in the > > > works). > > >=20 > > > What's really weird is I don't see any signs of loading the initrd > > > before that failure, and with the mbuto images we're using we should > > > never *leave* the initrd. Which kind of makes sense - if it's not > > > seeing the initrd, then there is indeed no root to mount. > > >=20 > > > Can you gran the full qemu command line it's trying to use? > > >=20 > > My file mbuto seems to be empty: >=20 > Welp, that would explain it. >=20 > > $ cd test/ > > $ make > > ./mbuto/mbuto -p ./passt.mem.mbuto -c lz4 -f mbuto.mem.img > > Applying profile from file ./passt.mem.mbuto > > depmod: WARNING: could not open modules.builtin.modinfo at > > /tmp/tmp.0Xr88SNogx/lib/modules/6.7.9-200.fc39.x86_64: No such file or > > directory >=20 > So now we have two mysteries. 1) Why is depmod failing here, and 2) > why isn't depmod failing causing mbuto to fail, rather than generating > nonsense output. Can you get the output of running mbuto with sh -x? That might shed some light. >=20 > > Size: bin 4.9M lib 15M kmod 218k total 20M compressed 4.1k > > KERNEL=3D/boot/vmlinuz-6.7.9-200.fc39.x86_64 > > INITRD=3D/home/lvivier/Projects/passt/test/mbuto.mem.img > > initramfs mounted at: /tmp/tmp.0Xr88SNogx > > $ ls -l /home/lvivier/Projects/passt/test/mbuto.mem.img > > -rw-r--r--. 1 lvivier lvivier 50 Mar 21 13:17 /home/lvivier/Projects/pa= sst/test/mbuto.mem.img > > $ gzip -d - < /home/lvivier/Projects/passt/test/mbuto.mem.img|hexdump = -C > > 00000000 30 37 30 37 30 31 30 30 30 30 30 30 30 30 30 30 |0707010000= 000000| > > 00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000= 000000| > > 00000020 30 30 30 30 30 30 30 30 30 30 30 30 30 31 30 30 |0000000000= 000100| > > 00000030 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000= 000000| > > * > > 00000060 30 30 30 30 30 42 30 30 30 30 30 30 30 30 54 52 |00000B0000= 0000TR| > > 00000070 41 49 4c 45 52 21 21 21 00 00 00 00 00 00 00 00 |AILER!!!..= =2E.....| > > 00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |..........= =2E.....| > > * > > 00000200 > >=20 > > Thanks, > > Laurent > >=20 >=20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --2wwl79+oJ14RKh2w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmX8LUcACgkQzQJF27ox 2GeUWQ/9Gox+GDXOCtbsnYsimg/P4K7+c+NMkIOkqfqmu7u2QGXSMN3nTN4MmYAe M4Y/L/z1BldGcRwYPTKtcj154cBIOK/BCZmAoTbmNUzxVRZCza+AD9nXcLY81xRv sz6OjnqHj6IhEpaq7BYaIrtZsPs8eJSZBjIyavMrROzS/lgDrhohfQRW5WfTtZe3 NfcZ2vztdYD1V0bq0RC7B2PKNZ+2SPIv/hjx6gjbgVWFTHWFCOGetkBmDDAufiaH 26hxqTwA4V0EI8AjG2vLjUaiZ0agBlkys+XT/PKHi6NArKo074wlVbTjJhPkrROM cnDdN4HIUOducItR1QCcYmor/uq6VmnTBBDnOaWh4fNPMpKMp8Dg6aw1fi75vczt 7B1K8JGsD0lirbpSf/lKzkVexWjNkcoYj880hYEG3aWem5YBQsD+reXUUtqP7qih kHZ6+hjd85Ggi8jit/2/z7a9saQbTAa1eCgVUuOjj1oTF1sUV2n5ihbgVrEXLp4j zmTQwBuArkkp/z1rNXmXf5OL+FtrSOrewP0yVL3DB+DNkPp44Zb3pjDHfipFi5oJ Mg+2uMLhCJGLImvL5mhgAvTzJSwZGtsnr6XwHoYgFfP0sCXm6KYg34gj3QYXEi5h DI+jWpXfrbMiXxJeIR4by/e2zU1Bm9ERY4uz/Qr6qVWc4NMqsaY= =3ueR -----END PGP SIGNATURE----- --2wwl79+oJ14RKh2w--