Skip to content

Commit

Permalink
net: ipvlan: ipvlan_set_port_mode(): Add an extack argument
Browse files Browse the repository at this point in the history
A follow-up patch will extend dev_change_flags() with an extack
argument. Extend ipvlan_set_port_mode() to have that argument available
for the conversion.

Signed-off-by: Petr Machata <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
pmachata authored and davem330 committed Dec 6, 2018
1 parent dc1aea1 commit cf7686a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/ipvlan/ipvlan_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ static void ipvlan_unregister_nf_hook(struct net *net)
ARRAY_SIZE(ipvl_nfops));
}

static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval)
static int ipvlan_set_port_mode(struct ipvl_port *port, u16 nval,
struct netlink_ext_ack *extack)
{
struct ipvl_dev *ipvlan;
struct net_device *mdev = port->dev;
Expand Down Expand Up @@ -498,7 +499,7 @@ static int ipvlan_nl_changelink(struct net_device *dev,
if (data[IFLA_IPVLAN_MODE]) {
u16 nmode = nla_get_u16(data[IFLA_IPVLAN_MODE]);

err = ipvlan_set_port_mode(port, nmode);
err = ipvlan_set_port_mode(port, nmode, extack);
}

if (!err && data[IFLA_IPVLAN_FLAGS]) {
Expand Down Expand Up @@ -672,7 +673,7 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev,
if (data && data[IFLA_IPVLAN_MODE])
mode = nla_get_u16(data[IFLA_IPVLAN_MODE]);

err = ipvlan_set_port_mode(port, mode);
err = ipvlan_set_port_mode(port, mode, extack);
if (err)
goto unlink_netdev;

Expand Down

0 comments on commit cf7686a

Please sign in to comment.