[ovs-dev] [PATCH v1] datapath-windows: Fix updating ct label when mask is specified

Alin Serdean aserdean at cloudbasesolutions.com
Sun Aug 18 22:27:25 UTC 2019


Thanks a lot for the patch!

I applied it on master and backported as far as I could.

Alin.

> On 15 Aug 2019, at 19:39, Anand Kumar via dev <ovs-dev at openvswitch.org> wrote:
> 
> From: kumaranand <kumaranand at vmware.com>
> 
> When an existing label needs to be changed by specifing bits to be
> updated using mask, instead of updating only the masked bits,
> new label was getting overridden. This patch fixes this issue.
> 
> Signed-off-by: Anand Kumar <kumaranand at vmware.com>
> ---
> datapath-windows/ovsext/Conntrack.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-windows/ovsext/Conntrack.c
> index bc00b60..ba56116 100644
> --- a/datapath-windows/ovsext/Conntrack.c
> +++ b/datapath-windows/ovsext/Conntrack.c
> @@ -807,6 +807,7 @@ OvsConntrackSetLabels(OvsFlowKey *key,
>     ovs_u128 v, m, pktMdLabel = {0};
>     memcpy(&v, val, sizeof v);
>     memcpy(&m, mask, sizeof m);
> +    memcpy(&pktMdLabel, &entry->labels, sizeof(struct ovs_key_ct_labels));
> 
>     pktMdLabel.u64.lo = v.u64.lo | (pktMdLabel.u64.lo & ~(m.u64.lo));
>     pktMdLabel.u64.hi = v.u64.hi | (pktMdLabel.u64.hi & ~(m.u64.hi));
> -- 
> 2.9.3.windows.1
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev



More information about the dev mailing list