p4-dev@lists.p4.org

list for questions/discussion of p4 programs and tools

View all threads

Issue in mininet when log_msg function is used many times.

SG
Sahil Gupta
Wed, Feb 3, 2021 9:50 PM

Hi all,
I am trying to debug my data plane program using the log_msg function.
But when I use it several times in ingress and egress, I am not able to
ping or communicate with other hosts.
My packet goes to different states and I have to check if my algorithm in
all of the states is working correctly or not.
Anybody know how to resolve this issue?

Some observations to share:

  1. With less log_msg functions:

[image: log_msg_less.png]
2. With more log_msg functions:
[image: log_msg_more2.png]

  1. Once I catch following error while pinging the hosts:
    [image: log_msg_more.png]

Regards
Sahil Gupta

Hi all, I am trying to debug my data plane program using the log_msg function. But when I use it several times in ingress and egress, I am not able to ping or communicate with other hosts. My packet goes to different states and I have to check if my algorithm in all of the states is working correctly or not. Anybody know how to resolve this issue? *Some observations* *to share*: 1. With less log_msg functions: [image: log_msg_less.png] 2. With more log_msg functions: [image: log_msg_more2.png] 3. Once I catch following error while pinging the hosts: [image: log_msg_more.png] Regards Sahil Gupta
AF
Andy Fingerhut
Thu, Feb 4, 2021 6:13 AM

Are you willing to provide the P4 source code of your program?

If you can isolate two slightly different versions of your program, one
that works, and another that doesn't, where the only difference between
them is one or a few log_msg() calls, seeing the source code of those two
different versions, and trying to compile them on our own machines, might
help identify the problem.

Andy

On Wed, Feb 3, 2021 at 1:51 PM Sahil Gupta sg5414@rit.edu wrote:

Hi all,
I am trying to debug my data plane program using the log_msg function.
But when I use it several times in ingress and egress, I am not able to
ping or communicate with other hosts.
My packet goes to different states and I have to check if my algorithm in
all of the states is working correctly or not.
Anybody know how to resolve this issue?

Some observations to share:

  1. With less log_msg functions:

[image: log_msg_less.png]
2. With more log_msg functions:
[image: log_msg_more2.png]

  1. Once I catch following error while pinging the hosts:
    [image: log_msg_more.png]

Regards
Sahil Gupta


P4-dev mailing list -- p4-dev@lists.p4.org
To unsubscribe send an email to p4-dev-leave@lists.p4.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Are you willing to provide the P4 source code of your program? If you can isolate two slightly different versions of your program, one that works, and another that doesn't, where the only difference between them is one or a few log_msg() calls, seeing the source code of those two different versions, and trying to compile them on our own machines, might help identify the problem. Andy On Wed, Feb 3, 2021 at 1:51 PM Sahil Gupta <sg5414@rit.edu> wrote: > Hi all, > I am trying to debug my data plane program using the log_msg function. > But when I use it several times in ingress and egress, I am not able to > ping or communicate with other hosts. > My packet goes to different states and I have to check if my algorithm in > all of the states is working correctly or not. > Anybody know how to resolve this issue? > > *Some observations* *to share*: > 1. With less log_msg functions: > > [image: log_msg_less.png] > 2. With more log_msg functions: > [image: log_msg_more2.png] > > > 3. Once I catch following error while pinging the hosts: > [image: log_msg_more.png] > > Regards > Sahil Gupta > > _______________________________________________ > P4-dev mailing list -- p4-dev@lists.p4.org > To unsubscribe send an email to p4-dev-leave@lists.p4.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
SG
Sahil Gupta
Thu, Feb 4, 2021 11:19 PM

Thanks Andy for offering help. ☺

I manage to run the program by reducing a couple of TCP, IP and application
layer fields.
Earlier, I was observing complete IP, TCP and some application layer bytes
multiple times.
Now, I reduce the fields to observe in order to get it working.
My guess is mininet gets overloaded if we print/access many header fields
in the P4 program.
I am not sure though.
Once my experiments are over, I am willing to share both versions of my
program.

Regards
Sahil Gupta

On Thu, Feb 4, 2021, 1:14 AM Andy Fingerhut andy.fingerhut@gmail.com
wrote:

Are you willing to provide the P4 source code of your program?

If you can isolate two slightly different versions of your program, one
that works, and another that doesn't, where the only difference between
them is one or a few log_msg() calls, seeing the source code of those two
different versions, and trying to compile them on our own machines, might
help identify the problem.

Andy

On Wed, Feb 3, 2021 at 1:51 PM Sahil Gupta sg5414@rit.edu wrote:

Hi all,
I am trying to debug my data plane program using the log_msg function.
But when I use it several times in ingress and egress, I am not able to
ping or communicate with other hosts.
My packet goes to different states and I have to check if my algorithm in
all of the states is working correctly or not.
Anybody know how to resolve this issue?

Some observations to share:

  1. With less log_msg functions:

[image: log_msg_less.png]
2. With more log_msg functions:
[image: log_msg_more2.png]

  1. Once I catch following error while pinging the hosts:
    [image: log_msg_more.png]

Regards
Sahil Gupta


P4-dev mailing list -- p4-dev@lists.p4.org
To unsubscribe send an email to p4-dev-leave@lists.p4.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Thanks Andy for offering help. ☺ I manage to run the program by reducing a couple of TCP, IP and application layer fields. Earlier, I was observing complete IP, TCP and some application layer bytes multiple times. Now, I reduce the fields to observe in order to get it working. My guess is mininet gets overloaded if we print/access many header fields in the P4 program. I am not sure though. Once my experiments are over, I am willing to share both versions of my program. Regards Sahil Gupta On Thu, Feb 4, 2021, 1:14 AM Andy Fingerhut <andy.fingerhut@gmail.com> wrote: > Are you willing to provide the P4 source code of your program? > > If you can isolate two slightly different versions of your program, one > that works, and another that doesn't, where the only difference between > them is one or a few log_msg() calls, seeing the source code of those two > different versions, and trying to compile them on our own machines, might > help identify the problem. > > Andy > > On Wed, Feb 3, 2021 at 1:51 PM Sahil Gupta <sg5414@rit.edu> wrote: > >> Hi all, >> I am trying to debug my data plane program using the log_msg function. >> But when I use it several times in ingress and egress, I am not able to >> ping or communicate with other hosts. >> My packet goes to different states and I have to check if my algorithm in >> all of the states is working correctly or not. >> Anybody know how to resolve this issue? >> >> *Some observations* *to share*: >> 1. With less log_msg functions: >> >> [image: log_msg_less.png] >> 2. With more log_msg functions: >> [image: log_msg_more2.png] >> >> >> 3. Once I catch following error while pinging the hosts: >> [image: log_msg_more.png] >> >> Regards >> Sahil Gupta >> >> _______________________________________________ >> P4-dev mailing list -- p4-dev@lists.p4.org >> To unsubscribe send an email to p4-dev-leave@lists.p4.org >> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > >