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 56AC45A0274 for ; Thu, 21 Mar 2024 13:47:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1711025270; bh=5dWc+JmgyGv9y2PFm3jbby/GSrrnRUMah+RarCOixrM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=moyW6fL2w3bZrQBpScIoDvJYHnSCw34ytofoisEkJJ08FLsrzIYa4UCzsqr+PHw0K NZajnTctJ55OTMVSnmnOy/0byMRDf7hSsvtkSP6VDkgx2p4z+x5C7IrhhKIML1QfVN en9VQ00s1H/BKSY7Pnlmee86rw5KKpwHnf3IInxMqTP96c0uLYOi3cQD6ZbNb+1xLu PI+q3qWTR83v4NQ8gmd7tZE4doU5ZIybTegfeTOdLejlShvMc7WToyhVi4GsdDdbyL g7VQSB1H1Hh4Wf89oLcFdU2kh2mm77M/BZaRB74Heg58N0TSUJZMURhYZ4y9s0O21e ohDmWLwMwbtSg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4V0lc636t0z4wcC; Thu, 21 Mar 2024 23:47:50 +1100 (AEDT) Date: Thu, 21 Mar 2024 23:47:45 +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="a8CJAtpxdeyLIb9D" Content-Disposition: inline In-Reply-To: Message-ID-Hash: UJ3BO7QMWSCWPVUNH6JN7VAJ77BCHOOG X-Message-ID-Hash: UJ3BO7QMWSCWPVUNH6JN7VAJ77BCHOOG 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: --a8CJAtpxdeyLIb9D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 with= out > > > > > worrying about alignment in the structure, split the structure in= to > > > > > several arrays and point to each part of the frame using an iovec= array. > > > > >=20 > > > > > Using iovec also allows us to simply ignore the first entry when = 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 optional = 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-post > > > > 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 "make > > > 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: Welp, that would explain it. > $ 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 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. > 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/pass= t/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 |070701000000= 0000| > 00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |000000000000= 0000| > 00000020 30 30 30 30 30 30 30 30 30 30 30 30 30 31 30 30 |000000000000= 0100| > 00000030 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |000000000000= 0000| > * > 00000060 30 30 30 30 30 42 30 30 30 30 30 30 30 30 54 52 |00000B000000= 00TR| > 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 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 --a8CJAtpxdeyLIb9D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmX8LF4ACgkQzQJF27ox 2GfW+BAAkjHGN4AZPfWHhj1m+r74BHa+1+B/TdkbarX1zhjEpE/AsaGmdjhIlVHY X7b1Vmc5pJDV5zUV6v5faQOy9wkdsUyHMdOlmV5jAaAdnOW56aoYJBdmVElCsjft jC6w8BpEZnMtrmpzWaxBX0iy/CpA+slPI1oj7MpIkGUD3pPHj8NwSrYndqw+X5yK sdlNCVex+gFZLoCXqhpJqddpMGrYFtEReIvZDWdbwPzVfP/C8TtGLjSkgFaYhr24 RLL1+tZmo1i+dihwDgjTWdBAHlCOMQjoOuYj1hsWK9fClat7ZOhNJtltpP3fcoeg IeTX2mOFQ/2mVaCvPzQ7MVLvvNjiIeD6TJSVcuO9rDD4+pknHfApDZt4n9wnihTW ZXQhNjIlA7c10r6Jivb/Z+RLIBZFTFkLRZCyMXQkbKxuJDC3GTwgoLf10wjNorDF EgBSlAq62k2lFgSOrkEGWSi+drNUX3N1ZqTiMWRRudljHqRSKSa5RE2ZrA8C7mhk dsLrb8/Gwktg0yf9sWscyn8/q4etYSwqeZdqeHoM5YsnpJGX5q1+CS9xGx3Df6hM 3q7Ko3NOTVpMh8KYH8maqYgLjoir/QuZlpRk9InjXzS8Gb5CxS/K+MxYxX7VneNj qn49194Z7xtoTrF/wTTZQqtWkRLQ35kvzDrao3Rf3mdSi9QE43o= =dWk4 -----END PGP SIGNATURE----- --a8CJAtpxdeyLIb9D--