public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: Kris Van Hees <kris.van.hees@oracle.com>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: Kris Van Hees <kris.van.hees@oracle.com>,
	Eugene Loh <eugene.loh@oracle.com>,
	dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [DTrace-devel] [PATCH] test/utils: add more reliable "get remote address" approach
Date: Thu, 3 Jul 2025 16:59:44 -0400	[thread overview]
Message-ID: <aGbvQAmqsLA5+LaH@oracle.com> (raw)
In-Reply-To: <077a08c1-e999-4782-9269-62a269d76f65@oracle.com>

On Thu, Jul 03, 2025 at 09:23:46PM +0100, Alan Maguire wrote:
> On 03/07/2025 20:03, Kris Van Hees wrote:
> > On Thu, Jul 03, 2025 at 07:41:41PM +0100, Alan Maguire wrote:
> >> On 03/07/2025 19:26, Kris Van Hees wrote:
> >>> On Thu, Jul 03, 2025 at 07:02:57PM +0100, Alan Maguire wrote:
> >>>> On 03/07/2025 18:06, Eugene Loh wrote:
> >>>>> On 7/3/25 12:59, Alan Maguire wrote:
> >>>>>
> >>>>>> On 03/07/2025 17:43, Eugene Loh wrote:
> >>>>>>
> >>>>>>> I tested and it looks good (modulo the OL8 UEK6 issue mentioned in the
> >>>>>>> patch 3/4 feedback).
> >>>>>>>
> >>>>>> Sorry I couldn't find that issue; is this the 5.15 problem with the ip
> >>>>>> send probes?
> >>>>>
> >>>>>     dtrace: failed to compile script /dev/stdin:
> >>>>>     ".../build/dlibs/5.2/tcp.d", line 177: failed to resolve type of
> >>>>> inet_ntoa arg#1 (ipaddr_t *):
> >>>>>     Unknown type name
> >>>>>
> >>>>
> >>>> Ah, sorry yep I have a fix for that one in the next round. Basically we
> >>>> need to add it to the core set of typedefs and add a type for a pointer
> >>>> to ipaddr_t; we can't rely on the #pragma to include net.d unfortunately.
> >>>
> >>> Why can't we rely on the pragma?  That is how e.g. the ip provider manages
> >>> this I believe?
> >>>
> >>
> >> Unfortunately the #pragma include doesn't do enough; it just defines a
> >> type for ipaddr_t , not a type for a _pointer_ to an ipaddr_t , which is
> >> what we need as a parameter to inet_ntoa(). I tried adding the ipaddr_t
> >> typedef to net.d and doing the pointer lookup/addition but that doesn't
> >> work either. Seems we need the core typedef + pointer addition or we hit
> >> this failure.
> > 
> > Actually, if you move 'typedef __be32          ipaddr_t;' from ip.d to net.d,
> > you should be set.  That is what I did in my priliminary tcp provider impl.
> > I do believe that works.  Either way, we use inet_ntoa() in the ip.d
> > translators and that works with that typedef in the file, so this really ought
> > to work.

> Yep, I tried that in the v2 patch series; Eugene hit the undefined error
> in one test and I now hit it consistently for all tcp/ip tests
> unfortunately with "typedef __be32 ipaddr_t;" in net.d.
> 
> My assumption (probably wrong) is that the include of the library does
> happen but nothing triggers the pointer type generation for "ipaddr *"
> in the CTF dict. If there was a way to force that type generation at the
> .d file level that would be great, not sure I see a way currently tho.

Well, like I said, it does work for ip.d so I don't see why this would be
any different.  I'll have a look and see if I can figure something out.

	Kris

  reply	other threads:[~2025-07-03 20:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03 11:33 [PATCH] test/utils: add more reliable "get remote address" approach Alan Maguire
2025-07-03 16:43 ` [DTrace-devel] " Eugene Loh
2025-07-03 16:59   ` Alan Maguire
2025-07-03 17:06     ` Eugene Loh
2025-07-03 18:02       ` Alan Maguire
2025-07-03 18:26         ` Kris Van Hees
2025-07-03 18:41           ` Alan Maguire
2025-07-03 19:03             ` Kris Van Hees
2025-07-03 20:23               ` Alan Maguire
2025-07-03 20:59                 ` Kris Van Hees [this message]
2025-07-03 22:36                   ` Kris Van Hees
2025-07-07 16:32                     ` Alan Maguire
2025-07-07 16:53                       ` Kris Van Hees
2025-07-07 18:14                         ` Alan Maguire
2025-07-07 19:55                           ` Kris Van Hees
2025-07-07 21:51                             ` Alan Maguire
2025-07-08  1:34                               ` Kris Van Hees
2025-07-08 17:19                                 ` Alan Maguire
2025-07-08 17:30                                   ` Kris Van Hees
2025-07-08 19:04                                     ` Alan Maguire
2025-07-08 20:13                                       ` Kris Van Hees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aGbvQAmqsLA5+LaH@oracle.com \
    --to=kris.van.hees@oracle.com \
    --cc=alan.maguire@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=eugene.loh@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox