On 7/12/24 05:26, LIU Yulong wrote:
> The ofport OFPP_TABLE(0xfff9) is defined as perform
> actions in flow table. It will send the packet back
> to table=0 to do reprocess. Add this port to learn
> output action then users can leverage it to do some
> flow table re-entry.
> 
> Signed-off-by: LIU Yulong <[email protected]>
> ---
>  lib/learn.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/learn.c b/lib/learn.c
> index a62add2fd..68d27307a 100644
> --- a/lib/learn.c
> +++ b/lib/learn.c
> @@ -167,6 +167,7 @@ learn_execute(const struct ofpact_learn *learn, const 
> struct flow *flow,
>                  if (ofp_to_u16(port) < ofp_to_u16(OFPP_MAX)
>                      || port == OFPP_IN_PORT
>                      || port == OFPP_FLOOD
> +                    || port == OFPP_TABLE
>                      || port == OFPP_LOCAL
>                      || port == OFPP_ALL) {
>                      ofpact_put_OUTPUT(ofpacts)->port = port;


Hi.  Thanks for the patch!

The definition of the OFPP_TABLE in OpenFlow specification allows
to use it only in packet-out messages:

  OFPP_TABLE = 0xfffffff9, /* Submit the packet to the first flow table
                              NB: This destination port can only be
                              used in packet-out messages. */

So, we should not use it for any other purpose.

Most of the time it is possible to use learned flows to just set
some registers and then you could use those registers in a different
table with any types of actions.  The 'learn' section of the docs
contains a more detailed explanation on how to achieve that:

  https://docs.openvswitch.org/en/stable/ref/ovs-actions.7/#the-learn-action

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to