What are the use case(s) of truncate “outside” of sampling/mirroring ? The use of truncation in the context of sampling/mirroring is well known.
On 5/10/17, 7:56 AM, "ovs-dev-boun...@openvswitch.org on behalf of William Tu" <ovs-dev-boun...@openvswitch.org on behalf of u9012...@gmail.com> wrote: > It may be cleaner if we add a new trunc action for the datapath, say > trunc2 that applies > to all outputs within the clone. > > So the translation will look like: clone(trunc2, native tunnel > translation). Would this > approach work? > Or how about we apply actual packet truncation when clone action follows truncate action? Now we apply actual packet truncation when: actions=trunc, output actions=trunc, tunnel_push actions=trunc, sample If we add clone as another truncate target, then actions = trunc(100), clone(tnl(...)), actionX, Inside clone will see packet of size 100, and actionX sees original size. Then I think we don't need to introduce trunc2? Regards, William >> >> Without the "Avoid recirculation" patch we have two datapath flows, because the >> packet is recirculated. At the end of the first flow the packet size is changed >> and the packet with modified size enters the OF pipeline again. >> >> What is the reason not to change packet size when truncate action is applied? >> > > One of the reasons could be that we introduced trunc before clone. Otherwise, a > clone(trunc2, output:x) is equivalent to trunc, output:x. Note that > the trunc datapath > action is different than other datapath actions, which usually applies > to all following > actions. Native tunneling may be the first use case that motivates > trunc2, which should > have the normal datapath action behavior. > _______________________________________________ dev mailing list d...@openvswitch.org https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=Nyz1bKwmZ6QNB_i7urMQb9UlVB32_o0naNQYadaXKCc&s=bsy7Qr0o0D2UTx4CnXmc_cigenrkyqFgomNN63vn_cc&e= _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev