diff mbox series

[ovs-dev,3/5] meta-flow: Add comment.

Message ID 20190408182206.15688-3-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev,1/5] compiler: Disable BUILD_MESSAGE() when processing with sparse. | expand

Commit Message

Ben Pfaff April 8, 2019, 6:22 p.m. UTC
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 lib/meta-flow.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Numan Siddique April 9, 2019, 5:46 p.m. UTC | #1
On Mon, Apr 8, 2019 at 11:54 PM Ben Pfaff <blp@ovn.org> wrote:

> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---
>  lib/meta-flow.c | 6 ++++++
>

Acked-by: Numan Siddique <nusiddiq@redhat.com>


>  1 file changed, 6 insertions(+)
>
> diff --git a/lib/meta-flow.c b/lib/meta-flow.c
> index 1724e46e1b97..e3274b97f335 100644
> --- a/lib/meta-flow.c
> +++ b/lib/meta-flow.c
> @@ -2287,6 +2287,12 @@ mf_set(const struct mf_field *mf,
>          *err_str = NULL;
>      }
>
> +    /* The cases where 'mask' is all-1-bits or all-0-bits were already
> handled
> +     * above[*], so the code below only needs to work for the remaining
> cases
> +     * of a nontrivial mask.
> +     *
> +     * [*] Except where the field is a tunnel metadata field and 'mask' is
> +     *     all-0-bits; see above. */
>      switch (mf->id) {
>      case MFF_CT_ZONE:
>      case MFF_CT_NW_PROTO:
> --
> 2.20.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/lib/meta-flow.c b/lib/meta-flow.c
index 1724e46e1b97..e3274b97f335 100644
--- a/lib/meta-flow.c
+++ b/lib/meta-flow.c
@@ -2287,6 +2287,12 @@  mf_set(const struct mf_field *mf,
         *err_str = NULL;
     }
 
+    /* The cases where 'mask' is all-1-bits or all-0-bits were already handled
+     * above[*], so the code below only needs to work for the remaining cases
+     * of a nontrivial mask.
+     *
+     * [*] Except where the field is a tunnel metadata field and 'mask' is
+     *     all-0-bits; see above. */
     switch (mf->id) {
     case MFF_CT_ZONE:
     case MFF_CT_NW_PROTO: