* [PATCH net-next] net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64
@ 2021-03-22 10:38 Vladimir Oltean
2021-03-22 10:42 ` Nikolay Aleksandrov
2021-03-22 20:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2021-03-22 10:38 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, netdev
Cc: Roopa Prabhu, Nikolay Aleksandrov, Vladimir Oltean
From: Vladimir Oltean <vladimir.oltean@nxp.com>
The only caller of br_vlan_tunnel_lookup, br_handle_ingress_vlan_tunnel,
extracts the tunnel_id from struct ip_tunnel_info::struct ip_tunnel_key::
tun_id which is a __be64 value.
The exact endianness does not seem to matter, because the tunnel id is
just used as a lookup key for the VLAN group's tunnel hash table, and
the value is not interpreted directly per se. Moreover,
rhashtable_lookup_fast treats the key argument as a const void *.
Therefore, there is no functional change associated with this patch,
just one to silence "make W=1" builds.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
net/bridge/br_vlan_tunnel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_vlan_tunnel.c b/net/bridge/br_vlan_tunnel.c
index 169e005fbda2..0d3a8c01552e 100644
--- a/net/bridge/br_vlan_tunnel.c
+++ b/net/bridge/br_vlan_tunnel.c
@@ -35,7 +35,7 @@ static const struct rhashtable_params br_vlan_tunnel_rht_params = {
};
static struct net_bridge_vlan *br_vlan_tunnel_lookup(struct rhashtable *tbl,
- u64 tunnel_id)
+ __be64 tunnel_id)
{
return rhashtable_lookup_fast(tbl, &tunnel_id,
br_vlan_tunnel_rht_params);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64
2021-03-22 10:38 [PATCH net-next] net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64 Vladimir Oltean
@ 2021-03-22 10:42 ` Nikolay Aleksandrov
2021-03-22 20:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Aleksandrov @ 2021-03-22 10:42 UTC (permalink / raw)
To: Vladimir Oltean, David S . Miller, Jakub Kicinski, netdev
Cc: Roopa Prabhu, Vladimir Oltean
On 22/03/2021 12:38, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> The only caller of br_vlan_tunnel_lookup, br_handle_ingress_vlan_tunnel,
> extracts the tunnel_id from struct ip_tunnel_info::struct ip_tunnel_key::
> tun_id which is a __be64 value.
>
> The exact endianness does not seem to matter, because the tunnel id is
> just used as a lookup key for the VLAN group's tunnel hash table, and
> the value is not interpreted directly per se. Moreover,
> rhashtable_lookup_fast treats the key argument as a const void *.
>
> Therefore, there is no functional change associated with this patch,
> just one to silence "make W=1" builds.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> net/bridge/br_vlan_tunnel.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_vlan_tunnel.c b/net/bridge/br_vlan_tunnel.c
> index 169e005fbda2..0d3a8c01552e 100644
> --- a/net/bridge/br_vlan_tunnel.c
> +++ b/net/bridge/br_vlan_tunnel.c
> @@ -35,7 +35,7 @@ static const struct rhashtable_params br_vlan_tunnel_rht_params = {
> };
>
> static struct net_bridge_vlan *br_vlan_tunnel_lookup(struct rhashtable *tbl,
> - u64 tunnel_id)
> + __be64 tunnel_id)
> {
> return rhashtable_lookup_fast(tbl, &tunnel_id,
> br_vlan_tunnel_rht_params);
>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64
2021-03-22 10:38 [PATCH net-next] net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64 Vladimir Oltean
2021-03-22 10:42 ` Nikolay Aleksandrov
@ 2021-03-22 20:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-22 20:20 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: davem, kuba, netdev, roopa, nikolay, vladimir.oltean
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Mon, 22 Mar 2021 12:38:19 +0200 you wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> The only caller of br_vlan_tunnel_lookup, br_handle_ingress_vlan_tunnel,
> extracts the tunnel_id from struct ip_tunnel_info::struct ip_tunnel_key::
> tun_id which is a __be64 value.
>
> The exact endianness does not seem to matter, because the tunnel id is
> just used as a lookup key for the VLAN group's tunnel hash table, and
> the value is not interpreted directly per se. Moreover,
> rhashtable_lookup_fast treats the key argument as a const void *.
>
> [...]
Here is the summary with links:
- [net-next] net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64
https://git.kernel.org/netdev/net-next/c/f5fcca89f59c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-22 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-22 10:38 [PATCH net-next] net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64 Vladimir Oltean
2021-03-22 10:42 ` Nikolay Aleksandrov
2021-03-22 20:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox