-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
max_len option for the controller action is never honored #295
Comments
Hi. It is expected behavior. According to OpenFlow spec [1]:
OVS reports number of supported buffers as zero in the The ovs-actions man page may use some update, true. [1] Section 6.1.2 : https://opennetworking.org/wp-content/uploads/2014/10/openflow-switch-v1.5.1.pdf |
Thanks for the quick confirmation. I can volunteer to update the documentation if that helps. |
Instead of 128. 65535 means that there is no buffering and that the full packet is sent to the controller. This is actually the only value supported by OVS, even though OVS will not reject other values. This can create confusion as the flows will show `max_len=128`, but the controller will always receive the full packet. Another value for max_len can be explicitly provided using the new `MaxLen` field in the `NXController` struct, but there should be no reason to do so when using OVS. See openvswitch/ovs-issues#295 Signed-off-by: Antonin Bas <[email protected]>
Instead of 128. 65535 means that there is no buffering and that the full packet is sent to the controller. This is actually the only value supported by OVS, even though OVS will not reject other values. This can create confusion as the flows will show `max_len=128`, but the controller will always receive the full packet. Another value for max_len can be explicitly provided using the new `MaxLen` field in the `NXController` struct, but there should be no reason to do so when using OVS. See openvswitch/ovs-issues#295 Signed-off-by: Antonin Bas <[email protected]>
Thanks! Feel free to submit a patch. |
Instead of 128. 65535 means that there is no buffering and that the full packet is sent to the controller. This is actually the only value supported by OVS, even though OVS will not reject other values. This can create confusion as the flows will show `max_len=128`, but the controller will always receive the full packet. Another value for max_len can be explicitly provided using the new `MaxLen` field in the `NXController` struct, but there should be no reason to do so when using OVS. See openvswitch/ovs-issues#295 Signed-off-by: Antonin Bas <[email protected]>
Since Open vSwitch 2.7, thge max_len option has no effect, and the full packet is always sent to controllers. This was confirmed with both the kernel and netdev datapath. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: 0-day Robot <[email protected]>
From: Antonin Bas <[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. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: 0-day Robot <[email protected]>
@igsilya the patch was acked, would you mind applying it: https://mail.openvswitch.org/pipermail/ovs-dev/2023-August/407313.html ? |
From: Antonin Bas <[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. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Acked-by: Simon Horman <[email protected]> Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
From: Antonin Bas <[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. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Acked-by: Simon Horman <[email protected]> Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
From: Antonin Bas <[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. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Acked-by: Simon Horman <[email protected]> Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
From: Antonin Bas <[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. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Acked-by: Simon Horman <[email protected]> Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
From: Antonin Bas <[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. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Acked-by: Simon Horman <[email protected]> Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
Applied. Thanks! |
Thanks.
which is already the documented behavior |
From: Antonin Bas <[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. Reported-by: Antonin Bas <[email protected]> Reported-at: openvswitch/ovs-issues#295 Acked-by: Simon Horman <[email protected]> Signed-off-by: Antonin Bas <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
It seems that the
max_len
option for thecontroller
action is never honored, at least not with the Linux kernel datapath.Here is my OF flow:
Here is the datapath flow:
Even though
max_len
is set to128
, the controller receives the full packet, which is 428B.I looked at the code. It seems that this was meant to be implemented just before sending the packet to the controller (in connmgr), as the entire packet is always upcalled by the kernel datapath anyway.
Originally, the functionality was implemented in
ofputil_encode_packet_in_private
:https://github.com/openvswitch/ovs/blob/7a0f907b2393626dac1387617355990eab69aef7/lib/ofp-util.c#L3857-L3897
The implementation was then removed in OVS v2.7 by this patch: openvswitch/ovs@c184807
And as far as I can tell, this field has been unused ever since:
https://github.com/openvswitch/ovs/blob/cf11766cbcf162399aafb84ba5634a22bccf9e8b/ofproto/connmgr.h#L49
Is this the expected behavior? Should the documentation for the
controller
action be updated to indicate that themax_len
option may not be honored (or is never honored)?The text was updated successfully, but these errors were encountered: