lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 15 Mar 2023 00:32:44 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Gavin Li <gavinl@...dia.com>
Cc:     <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
        <roopa@...dia.com>, <eng.alaamohamedsoliman.am@...il.com>,
        <bigeasy@...utronix.de>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <gavi@...dia.com>,
        <roid@...dia.com>, <maord@...dia.com>, <saeedm@...dia.com>
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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ