[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b68c6baa-62ec-901a-76f9-0baef7daa3f5@nvidia.com>
Date: Thu, 16 Mar 2023 14:57:26 +0800
From: Gavin Li <gavinl@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
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 3/15/2023 3:32 PM, Jakub Kicinski wrote:
> External email: Use caution opening links or attachments
>
>
> 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
ACK
Powered by blists - more mailing lists