Messages in this thread | | | Date | Wed, 15 Mar 2023 00:32:44 -0700 | From | Jakub Kicinski <> | Subject | Re: [PATCH net-next v7 5/5] net/mlx5e: TC, Add support for VxLAN GBP encap/decap flows offload |
| |
On Mon, 13 Mar 2023 09:51:07 +0200 Gavin Li wrote: > + if (memchr_inv(&enc_opts.mask->data, 0, sizeof(enc_opts.mask->data)) && > + !MLX5_CAP_ESW_FT_FIELD_SUPPORT_2(priv->mdev, tunnel_header_0_1)) { > + NL_SET_ERR_MSG_MOD(extack, "Matching on VxLAN GBP is not supported"); > + netdev_warn(priv->netdev, "Matching on VxLAN GBP is not supported\n"); > + return -EOPNOTSUPP; > + } > + > + if (enc_opts.key->dst_opt_type != TUNNEL_VXLAN_OPT) { > + NL_SET_ERR_MSG_MOD(extack, "Wrong VxLAN option type: not GBP"); > + netdev_warn(priv->netdev, "Wrong VxLAN option type: not GBP\n"); > + return -EOPNOTSUPP; > + } > + > + if (enc_opts.key->len != sizeof(*gbp) || > + enc_opts.mask->len != sizeof(*gbp_mask)) { > + NL_SET_ERR_MSG_MOD(extack, "VxLAN GBP option/mask len is not 32 bits"); > + netdev_warn(priv->netdev, "VxLAN GBP option/mask len is not 32 bits\n"); > + return -EINVAL; > + } > + > + gbp = (u32 *)&enc_opts.key->data[0]; > + gbp_mask = (u32 *)&enc_opts.mask->data[0]; > + > + if (*gbp_mask & ~VXLAN_GBP_MASK) { > + NL_SET_ERR_MSG_FMT_MOD(extack, "Wrong VxLAN GBP mask(0x%08X)\n", *gbp_mask); > + netdev_warn(priv->netdev, "Wrong VxLAN GBP mask(0x%08X)\n", *gbp_mask); > + return -EINVAL;
extack only please, there's no excuse to be using both any more
| |