I created a ticket for this (EXT-315) to make sure we keep track of the issue, 
and fix/clarify it in the next revisions of the specs.
Until then I suggest you do not use OFPP_MAX for ports, there's plenty of ids 
there anyway. :o)

Zoltan.

>-----Original Message-----
>From: Ben Pfaff [mailto:b...@nicira.com]
>Sent: Tuesday, April 30, 2013 8:40 AM
>To: Zoltán Lajos Kis
>Cc: Bertrand Bonnefoy-Claudet; openflow-discuss@lists.stanford.edu
>Subject: Re: [openflow-discuss] Port numbering and OFPP_MAX
>
>The OpenFlow 1.0 reference implementation code includes several uses of
>OFPP_MAX.  Most of them imply that a port number must be less than
>OFPP_MAX.  Two comments in OF1.0 openflow.h are explicit about this:
>
>    uint16_t port; /* Port that queue belongs. Should
>                      refer to a valid physical port
>                      (i.e. < OFPP_MAX) or OFPP_IN_PORT. */
>
>    uint16_t port;         /* Port to be queried. Should refer
>                              to a valid physical port (i.e. < OFPP_MAX) */
>
>One comment in OF1.3.1 openflow.h is also explicit about this:
>
>    uint32_t port;         /* Port to be queried. Should refer
>                              to a valid physical port (i.e. < OFPP_MAX),
>                              or OFPP_ANY to request all configured
>                              queues.*/
>
>On Tue, Apr 30, 2013 at 06:09:41AM +0000, Zolt?n Lajos Kis wrote:
>> I think ports can go from 1 to OFPP_MAX inclusive, and the mistake is
>> in the comment on page 88 (should be <= OFPP_MAX).
>>
>> Every xxx_MAX constant in OpenFlow refers to the last usable id
>(OFPP_MAX, OFPG_MAX, OFPM_MAX, OFPTT_MAX, ...). In most cases the
>structs explicitly say so.
>> Ports are only special, because there the numbering starts from 1, which
>makes the total number equal to the last usable id.
>>
>> Zoltan.
>>
>> >-----Original Message-----
>> >From: openflow-discuss-boun...@lists.stanford.edu [mailto:openflow-
>> >discuss-boun...@lists.stanford.edu] On Behalf Of Ben Pfaff
>> >Sent: Tuesday, April 30, 2013 7:54 AM
>> >To: Bertrand Bonnefoy-Claudet
>> >Cc: openflow-discuss@lists.stanford.edu
>> >Subject: Re: [openflow-discuss] Port numbering and OFPP_MAX
>> >
>> >On Mon, Apr 29, 2013 at 08:36:57PM -0500, Bertrand Bonnefoy-Claudet
>wrote:
>> >> Here is a minor point in the OpenFlow 1.3.1 specification (and most
>> >> previous versions) that I would like to clarify.
>> >>
>> >> Page 42 says that ports are numbered starting from 1 and that
>> >> OFPP_MAX is the maximum number of "normal" ports a switch can have.
>> >>
>> >> Page 88, on the other hand, says that a valid physical port should
>> >> have a number "< OFPP_MAX".
>> >>
>> >> So, to my understanding, page 42 implies OFPP_MAX is a valid port
>> >> whereas page 88 implies the contrary.
>> >
>> >This sounds like a mistake.  I imagine that it arose because the
>> >earliest versions of OpenFlow numbered ports starting from 0.  The
>> >intent is that port numbers are greater than 0 and less than OFPP_MAX.
>> >_______________________________________________
>> >openflow-discuss mailing list
>> >openflow-discuss@lists.stanford.edu
>> >https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to