[ovs-dev] [PATCH] ofproto-dpif-mirror: add snaplen/truncate support.
Ben Pfaff
blp at ovn.org
Tue Jun 7 04:50:07 UTC 2016
On Fri, May 27, 2016 at 11:22:10AM -0700, William Tu wrote:
> This patch adds a 'snaplen' config for mirroring table. A mirrored packet
> with size larger than snaplen bytes will be truncated in datapath before
> sending to the mirror output port. A snaplen of 0 equals 65535, which means
> no truncation applied.
>
> The patch depends on packet truncation patch:
> https://patchwork.ozlabs.org/patch/626486/
>
> Signed-off-by: William Tu <u9012063 at gmail.com>
This seems quite reasonable once we're happy with the packet truncation
patch.
Usually, when one patch depends on another, we send both out as a
series, to ensure that they are kept together.
The indentation of the second line here looks wrong:
if (ctx->mirror_snaplen != 0 &&
ctx->mirror_snaplen != (uint16_t) - 1) {
I would write it as:
if (ctx->mirror_snaplen != 0 &&
ctx->mirror_snaplen != (uint16_t) - 1) {
Also it looks funny to me to write a space after the unary operator -.
I would write UINT16_MAX instead of "(uint16_t) - 1".
Thanks,
Ben.
More information about the dev
mailing list