Hi Ilya, Thanks for applying the patch. I just finished testing / investigating output(port=controller,max_len=X), and there is no need to patch the documentation, for the following reasons:
The output(port=controller,max_len=X) action is rejected by OVS: root@ovs-test-node-1:/home/vagrant# ovs-ofctl mod-flows br-int 'table=0,priority=100,in_port=veth1,ip actions=output(port=controller,max_len=128)' ovs-ofctl: output to unsupported truncate port: controller root@ovs-test-node-1:/home/vagrant# root@ovs-test-node-1:/home/vagrant# root@ovs-test-node-1:/home/vagrant# ovs-ofctl mod-flows br-int 'table=0,priority=100,in_port=veth1,ip actions=output(port=1,max_len=128)' root@ovs-test-node-1:/home/vagrant# This behavior is expected and already documented: *The port may also be one of the following additional OpenFlow ports, unless max_len is specified:* *...* *controller* *...* When using max_len with the output action, the truncation is the responsibility of the datapath, and is not available for controller packets. When using max_lengh with the controller action, the truncation was meant to be the responsibility of the userspace, but buffering is no longer available in ovs-vswitchd. Thanks, Antonin Le ven. 25 août 2023 à 14:58, Ilya Maximets <[email protected]> a écrit : > On 8/25/23 18:38, Antonin Bas wrote: > > Hi Ilya, > > > > Do you think we can merge this patch first as it is specific to the > controller action? > > I will check the behavior of output(port=controller,max_len=X) and once > I have confirmation, I can submit a new patch. > > OK. I applied the change now. > Also backported down to 2.17. > > Thanks! > > Best regards, Ilya Maximets. > > > > > Thanks, > > > > Antonin > > > > Le ven. 25 août 2023 à 07:10, Ilya Maximets <[email protected] <mailto: > [email protected]>> a écrit : > > > > On 8/17/23 02:30, Antonin Bas wrote: > > > From: Antonin Bas <[email protected] <mailto: > [email protected]>> > > > > > > From: Antonin Bas <[email protected] <mailto:[email protected]>> > > > > > > Since Open vSwitch 2.7, the max_len option has no effect, and the > full > > > packet is always sent to controllers. This was confirmed with both > the > > > kernel and netdev datapaths. > > > > Hi, Antonin. Thanks for the patch! And sorry for delay. > > > > IIUC, this also affects the output(port=controller,max_len=X) > actions, right? > > In this case, we need to update the docs for the 'output' action as > well. > > > > Best regards, Ilya Maximets. > > > > > > > > Reported-by: Antonin Bas <[email protected] <mailto:[email protected] > >> > > > Reported-at: https://github.com/openvswitch/ovs-issues/issues/295 > <https://github.com/openvswitch/ovs-issues/issues/295> > > > Signed-off-by: Antonin Bas <[email protected] <mailto: > [email protected]>> > > > --- > > > v2: Fix typos, set author to VMware email address > > > --- > > > Documentation/ref/ovs-actions.7.rst | 9 ++++++++- > > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/ref/ovs-actions.7.rst > b/Documentation/ref/ovs-actions.7.rst > > > index d13895655..36adcc5db 100644 > > > --- a/Documentation/ref/ovs-actions.7.rst > > > +++ b/Documentation/ref/ovs-actions.7.rst > > > @@ -694,7 +694,8 @@ encapsulated in an OpenFlow ``packet-in`` > message. The supported options are: > > > Limit to *max_len* the number of bytes of the packet to send > in the > > > ``packet-in.`` A *max_len* of 0 prevents any of the packet > from being > > > sent (thus, only metadata is included). By default, the > entire packet is > > > - sent, equivalent to a *max_len* of 65535. > > > + sent, equivalent to a *max_len* of 65535. This option has no > effect in > > > + Open vSwith 2.7 and later: the entire packet will always be > sent. > > > > > > ``reason=``\ *reason* > > > Specify *reason* as the reason for sending the message in the > > > @@ -733,6 +734,12 @@ encapsulated in an OpenFlow ``packet-in`` > message. The supported options are: > > > options require the Open vSwitch ``NXAST_CONTROLLER`` extension > action added > > > in Open vSwitch 1.6. > > > > > > + Open vSwitch 2.7 and later is configured to not buffer packets > for the > > > + packet-in event. As a result, the full packet is always sent to > > > + controllers. This means that the ``max_len`` option has no > effect on the > > > + ``controller`` action, and all values (even 0) are equivalent > to the default > > > + value of 65535. > > > + > > > > > > The ``enqueue`` action > > > ---------------------- > > > > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
