[ovs-dev] [PATCH ovs] lib/tc: reject offloading of non-Ethernet packets

Simon Horman simon.horman at netronome.com
Thu Sep 6 08:08:15 UTC 2018


On Wed, Sep 05, 2018 at 03:26:24PM +0200, Louis Peens wrote:
> When a packet is marked with the special ethtype of OFP_DL_TYPE_NOT_ETH_TYPE
> it got wrongly installed into tc datapath as a match on a packet with that
> ethtype. This prevents that from happening.
> 
> Signed-off-by: Louis Peens <louis.peens at netronome.com>
> Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren at netronome.com>
> Reviewed-by: Simon Horman <simon.horman at netronome.com>

Thanks Louis,

this looks good to me. I would, however, like to wait a little
before applying in order to allow time for others to review this patch. 

> ---
>  lib/netdev-tc-offloads.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lib/netdev-tc-offloads.c b/lib/netdev-tc-offloads.c
> index 7bc745e..ccf6d6b 100644
> --- a/lib/netdev-tc-offloads.c
> +++ b/lib/netdev-tc-offloads.c
> @@ -918,6 +918,10 @@ test_key_and_mask(struct match *match)
>                          "offloading attribute icmp_code isn't supported");
>              return EOPNOTSUPP;
>          }
> +    } else if (key->dl_type == htons(OFP_DL_TYPE_NOT_ETH_TYPE)) {
> +        VLOG_DBG_RL(&rl,
> +                    "offloading of non-ethernet packets isn't supported");
> +        return EOPNOTSUPP;
>      }
>  
>      if (!is_all_zeros(mask, sizeof *mask)) {
> -- 
> 2.7.4
> 


More information about the dev mailing list