public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: Benjamin Poirier <bpoirier@nvidia.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Ido Schimmel <idosch@nvidia.com>, Simon Horman <horms@kernel.org>,
	Jiri Benc <jbenc@redhat.com>, Gavin Li <gavinl@nvidia.com>,
	Hangbin Liu <liuhangbin@gmail.com>,
	Vladimir Nikishkin <vladimir@nikishkin.pw>,
	Li Zetao <lizetao1@huawei.com>, Thomas Graf <tgraf@suug.ch>,
	Tom Herbert <therbert@google.com>,
	Roopa Prabhu <roopa@nvidia.com>
Subject: Re: [PATCH net] vxlan: Add missing entries to vxlan_get_size()
Date: Mon, 18 Sep 2023 21:40:29 +0300	[thread overview]
Message-ID: <e3405821-a614-2e04-c319-b54b9a1a0901@blackwall.org> (raw)
In-Reply-To: <20230918154015.80722-1-bpoirier@nvidia.com>

On 9/18/23 18:40, Benjamin Poirier wrote:
> There are some attributes added by vxlan_fill_info() which are not
> accounted for in vxlan_get_size(). Add them.
> 
> I didn't find a way to trigger an actual problem from this miscalculation
> since there is usually extra space in netlink size calculations like
> if_nlmsg_size(); but maybe I just didn't search long enough.
> 
> Fixes: 3511494ce2f3 ("vxlan: Group Policy extension")
> Fixes: e1e5314de08b ("vxlan: implement GPE")
> Fixes: 0ace2ca89cbd ("vxlan: Use checksum partial with remote checksum offload")
> Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
> ---
>   drivers/net/vxlan/vxlan_core.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index e463f59e95c2..5b5597073b00 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c
> @@ -4331,6 +4331,10 @@ static size_t vxlan_get_size(const struct net_device *dev)
>   		nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_REMCSUM_TX */
>   		nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_REMCSUM_RX */
>   		nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_LOCALBYPASS */
> +		nla_total_size(0) + /* IFLA_VXLAN_GBP */
> +		nla_total_size(0) + /* IFLA_VXLAN_GPE */
> +		nla_total_size(0) + /* IFLA_VXLAN_REMCSUM_NOPARTIAL */
> +		nla_total_size(sizeof(__u8)) + /* IFLA_VXLAN_VNIFILTER */
>   		0;
>   }
>   

Acked-by: Nikolay Aleksandrov <razor@blackwall.org>

  reply	other threads:[~2023-09-18 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 15:40 [PATCH net] vxlan: Add missing entries to vxlan_get_size() Benjamin Poirier
2023-09-18 18:40 ` Nikolay Aleksandrov [this message]
2023-09-19 15:20 ` Ido Schimmel
2023-09-20  8:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3405821-a614-2e04-c319-b54b9a1a0901@blackwall.org \
    --to=razor@blackwall.org \
    --cc=bpoirier@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gavinl@nvidia.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=jbenc@redhat.com \
    --cc=kuba@kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=lizetao1@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roopa@nvidia.com \
    --cc=tgraf@suug.ch \
    --cc=therbert@google.com \
    --cc=vladimir@nikishkin.pw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox