p4-dev@lists.p4.org

list for questions/discussion of p4 programs and tools

View all threads

About queueing_metadata association with specific egress_port

BS
Bibek Shrestha
Thu, Feb 4, 2021 6:21 PM

Hi All,

I just had a quick question regarding the queueing_metadata. The
queueing_metadata.enq_qdepth and queueing_metadata.deq_qdepth is the
information of the queue specific to the egress_port right?

Thanks
B.

Hi All, I just had a quick question regarding the queueing_metadata. The queueing_metadata.enq_qdepth and queueing_metadata.deq_qdepth is the information of the queue specific to the egress_port right? Thanks B.
AF
Andy Fingerhut
Thu, Feb 4, 2021 10:40 PM

In BMv2 simple_switch, it does maintain separate queues of packets per
output port in software, and those qdepth metadata fields do refer to the
depth of the queue that the packet passed through, and not any others.  It
is in units of packets, not bytes.  See mentions of qdepth on this page:
https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md.
(that page does not seem to mention that there is one queue per output
port, though -- might be worth enhancing).

I do not know whether simple_switch has the ability to support multiple
queues per output port as its source code is checked in right now.  Even if
it doesn't already, one could imagine modifying the C++ source code to
support such an option.  In that case I would expect the qdepth to
represent the depth of the one queue that the packet went through.

Other P4 architectures besides BMv2's v1model may differ in such details,
e.g. some have qdepth in units that are at least an approximation of the
total number of bytes of packets in the queue, not the number of packets.

Andy

On Thu, Feb 4, 2021 at 10:21 AM Bibek Shrestha sbibek2050@gmail.com wrote:

Hi All,

I just had a quick question regarding the queueing_metadata. The
queueing_metadata.enq_qdepth and queueing_metadata.deq_qdepth is the
information of the queue specific to the egress_port right?

Thanks
B.


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

In BMv2 simple_switch, it does maintain separate queues of packets per output port in software, and those qdepth metadata fields do refer to the depth of the queue that the packet passed through, and not any others. It is in units of packets, not bytes. See mentions of qdepth on this page: https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md. (that page does not seem to mention that there is one queue per output port, though -- might be worth enhancing). I do not know whether simple_switch has the ability to support multiple queues per output port as its source code is checked in right now. Even if it doesn't already, one could imagine modifying the C++ source code to support such an option. In that case I would expect the qdepth to represent the depth of the one queue that the packet went through. Other P4 architectures besides BMv2's v1model may differ in such details, e.g. some have qdepth in units that are at least an approximation of the total number of bytes of packets in the queue, not the number of packets. Andy On Thu, Feb 4, 2021 at 10:21 AM Bibek Shrestha <sbibek2050@gmail.com> wrote: > Hi All, > > I just had a quick question regarding the queueing_metadata. The > queueing_metadata.enq_qdepth and queueing_metadata.deq_qdepth is the > information of the queue specific to the egress_port right? > > Thanks > B. > _______________________________________________ > 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
BS
Bibek Shrestha
Fri, Feb 5, 2021 8:28 PM

Got it. Thanks.

B.

On Thu, Feb 4, 2021 at 2:40 PM Andy Fingerhut andy.fingerhut@gmail.com
wrote:

In BMv2 simple_switch, it does maintain separate queues of packets per
output port in software, and those qdepth metadata fields do refer to the
depth of the queue that the packet passed through, and not any others.  It
is in units of packets, not bytes.  See mentions of qdepth on this page:
https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md.
(that page does not seem to mention that there is one queue per output
port, though -- might be worth enhancing).

I do not know whether simple_switch has the ability to support multiple
queues per output port as its source code is checked in right now.  Even if
it doesn't already, one could imagine modifying the C++ source code to
support such an option.  In that case I would expect the qdepth to
represent the depth of the one queue that the packet went through.

Other P4 architectures besides BMv2's v1model may differ in such details,
e.g. some have qdepth in units that are at least an approximation of the
total number of bytes of packets in the queue, not the number of packets.

Andy

On Thu, Feb 4, 2021 at 10:21 AM Bibek Shrestha sbibek2050@gmail.com
wrote:

Hi All,

I just had a quick question regarding the queueing_metadata. The
queueing_metadata.enq_qdepth and queueing_metadata.deq_qdepth is the
information of the queue specific to the egress_port right?

Thanks
B.


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

Got it. Thanks. B. On Thu, Feb 4, 2021 at 2:40 PM Andy Fingerhut <andy.fingerhut@gmail.com> wrote: > In BMv2 simple_switch, it does maintain separate queues of packets per > output port in software, and those qdepth metadata fields do refer to the > depth of the queue that the packet passed through, and not any others. It > is in units of packets, not bytes. See mentions of qdepth on this page: > https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md. > (that page does not seem to mention that there is one queue per output > port, though -- might be worth enhancing). > > I do not know whether simple_switch has the ability to support multiple > queues per output port as its source code is checked in right now. Even if > it doesn't already, one could imagine modifying the C++ source code to > support such an option. In that case I would expect the qdepth to > represent the depth of the one queue that the packet went through. > > Other P4 architectures besides BMv2's v1model may differ in such details, > e.g. some have qdepth in units that are at least an approximation of the > total number of bytes of packets in the queue, not the number of packets. > > Andy > > > On Thu, Feb 4, 2021 at 10:21 AM Bibek Shrestha <sbibek2050@gmail.com> > wrote: > >> Hi All, >> >> I just had a quick question regarding the queueing_metadata. The >> queueing_metadata.enq_qdepth and queueing_metadata.deq_qdepth is the >> information of the queue specific to the egress_port right? >> >> Thanks >> B. >> _______________________________________________ >> 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 > >