---
name: "netdev_master_upper_dev_link"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/netdev_master_upper_dev_link"
---

# netdev\_master\_upper\_dev\_link(9)

Add a master link to the upper device

## NAME

netdev\_master\_upper\_dev\_link - Add a master link to the upper device

## SYNOPSIS

**int netdev\_master\_upper\_dev\_link(struct net\_device \*** *dev***, struct net\_device \*** *upper\_dev***, void \*** *upper\_priv***, void \*** *upper\_info***);**

## ARGUMENTS

*dev*

device

*upper\_dev*

new upper device

*upper\_priv*

upper device private

*upper\_info*

upper info to be passed down via notifier

## DESCRIPTION

Adds a link to device which is upper to this one. In this case, only one master upper device can be linked, although other non-master devices might be linked as well. The caller must hold the RTNL lock. On a failure a negative errno code is returned. On success the reference counts are adjusted and the function returns zero.

## COPYRIGHT
