net_failover.c (8bb5e7f4dcd9b9ef22a3ea25c9066a8a968f12dd) | net_failover.c (fb3ceec187e8bca474340e361a18163a2e79c0a2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2018, Intel Corporation. */ 3 4/* This provides a net_failover interface for paravirtual drivers to 5 * provide an alternate datapath by exporting APIs to create and 6 * destroy a upper 'net_failover' netdev. The upper dev manages the 7 * original paravirtual interface as a 'standby' netdev and uses the 8 * generic failover infrastructure to register and manage a direct --- 310 unchanged lines hidden (view full) --- 319}; 320 321#define FAILOVER_NAME "net_failover" 322#define FAILOVER_VERSION "0.1" 323 324static void nfo_ethtool_get_drvinfo(struct net_device *dev, 325 struct ethtool_drvinfo *drvinfo) 326{ | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2018, Intel Corporation. */ 3 4/* This provides a net_failover interface for paravirtual drivers to 5 * provide an alternate datapath by exporting APIs to create and 6 * destroy a upper 'net_failover' netdev. The upper dev manages the 7 * original paravirtual interface as a 'standby' netdev and uses the 8 * generic failover infrastructure to register and manage a direct --- 310 unchanged lines hidden (view full) --- 319}; 320 321#define FAILOVER_NAME "net_failover" 322#define FAILOVER_VERSION "0.1" 323 324static void nfo_ethtool_get_drvinfo(struct net_device *dev, 325 struct ethtool_drvinfo *drvinfo) 326{ |
327 strlcpy(drvinfo->driver, FAILOVER_NAME, sizeof(drvinfo->driver)); 328 strlcpy(drvinfo->version, FAILOVER_VERSION, sizeof(drvinfo->version)); | 327 strscpy(drvinfo->driver, FAILOVER_NAME, sizeof(drvinfo->driver)); 328 strscpy(drvinfo->version, FAILOVER_VERSION, sizeof(drvinfo->version)); |
329} 330 331static int nfo_ethtool_get_link_ksettings(struct net_device *dev, 332 struct ethtool_link_ksettings *cmd) 333{ 334 struct net_failover_info *nfo_info = netdev_priv(dev); 335 struct net_device *slave_dev; 336 --- 504 unchanged lines hidden --- | 329} 330 331static int nfo_ethtool_get_link_ksettings(struct net_device *dev, 332 struct ethtool_link_ksettings *cmd) 333{ 334 struct net_failover_info *nfo_info = netdev_priv(dev); 335 struct net_device *slave_dev; 336 --- 504 unchanged lines hidden --- |