[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220223200206.20169386@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 23 Feb 2022 20:02:06 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Roopa Prabhu <roopa@...dia.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<stephen@...workplumber.org>, <nikolay@...ulusnetworks.com>,
<idosch@...dia.com>, <dsahern@...il.com>, <bpoirier@...dia.com>
Subject: Re: [PATCH net-next v2 11/12] drivers: vxlan: vnifilter: per vni
stats
On Tue, 22 Feb 2022 02:52:29 +0000 Roopa Prabhu wrote:
> @@ -164,7 +166,6 @@ int vxlan_vnilist_update_group(struct vxlan_dev *vxlan,
> union vxlan_addr *new_remote_ip,
> struct netlink_ext_ack *extack);
>
> -
spurious
> /* vxlan_multicast.c */
> int vxlan_multicast_join(struct vxlan_dev *vxlan);
> int vxlan_multicast_leave(struct vxlan_dev *vxlan);
> +void vxlan_vnifilter_count(struct vxlan_dev *vxlan, __be32 vni,
> + int type, unsigned int len)
> +{
> + struct vxlan_vni_node *vninode;
> +
> + if (!(vxlan->cfg.flags & VXLAN_F_VNIFILTER))
> + return;
> +
> + vninode = vxlan_vnifilter_lookup(vxlan, vni);
> + if (!vninode)
> + return;
Don't we end up calling vxlan_vnifilter_lookup() multiple times for
every packet? Can't we remember the vninode from vxlan_vs_find_vni()?
> + vxlan_vnifilter_stats_add(vninode, type, len);
> +}
Powered by blists - more mailing lists