# Re: \[RFC v4 2/5\] l3mdev: add function to retreive upper master

- From: David Ahern \<hidden\>
- Date: 2018-11-23 03:52:11 
- List: netdev
- Page: https://ratatoskr.run/netdev/2018/11/11115966
- Thread: https://ratatoskr.run/netdev/2018/11/11115876/t.md

```text
On 11/21/18 6:07 PM, Alexis Bauvin wrote:
> Existing functions to retreive the l3mdev of a device did not walk the
> master chain to find the upper master. This patch adds a function to
> find the l3mdev, even indirect through e.g. a bridge:
> 
>
...

> 
> This will properly resolve the l3mdev of eth0 to vrf-blue.
> 
> Signed-off-by: Alexis Bauvin <redacted>
> Reviewed-by: Amine Kherbouche <redacted>
> Tested-by: Amine Kherbouche <redacted>
> ---
>  include/net/l3mdev.h | 22 ++++++++++++++++++++++
>  net/l3mdev/l3mdev.c  | 18 ++++++++++++++++++
>  2 files changed, 40 insertions(+)
> 

Reviewed-by: David Ahern <redacted>
```
