static void
netdev_linux_cache_cb(const struct rtnetlink_change *change,
- void *aux UNUSED)
+ void *aux OVS_UNUSED)
{
struct netdev_dev_linux *dev;
if (change) {
/* The arguments are marked as unused to prevent warnings on platforms where
* the Netlink interface isn't supported. */
static int
-setup_gre_netlink(const char *name UNUSED, struct gre_config *config UNUSED,
- bool create UNUSED)
+setup_gre_netlink(const char *name OVS_UNUSED,
+ struct gre_config *config OVS_UNUSED, bool create OVS_UNUSED)
{
#ifdef GRE_IOCTL_ONLY
return EOPNOTSUPP;
/* The arguments are marked as unused to prevent warnings on platforms where
* the Netlink interface isn't supported. */
static bool
-check_gre_device_netlink(const char *name UNUSED)
+check_gre_device_netlink(const char *name OVS_UNUSED)
{
#ifdef GRE_IOCTL_ONLY
return false;
/* Creates the netdev device of 'type' with 'name'. */
static int
-netdev_linux_create_system(const char *name, const char *type UNUSED,
+netdev_linux_create_system(const char *name, const char *type OVS_UNUSED,
const struct shash *args, struct netdev_dev **netdev_devp)
{
struct netdev_dev_linux *netdev_dev;
* buffers, across all readers. Therefore once data is read it will
* be unavailable to other reads for tap devices. */
static int
-netdev_linux_create_tap(const char *name, const char *type UNUSED,
+netdev_linux_create_tap(const char *name, const char *type OVS_UNUSED,
const struct shash *args, struct netdev_dev **netdev_devp)
{
struct netdev_dev_linux *netdev_dev;
}
static int
-netdev_linux_create_gre(const char *name, const char *type UNUSED,
+netdev_linux_create_gre(const char *name, const char *type OVS_UNUSED,
const struct shash *args, struct netdev_dev **netdev_devp)
{
struct netdev_dev_linux *netdev_dev;
/* The arguments are marked as unused to prevent warnings on platforms where
* the Netlink interface isn't supported. */
static int
-destroy_gre_netlink(const char *name UNUSED)
+destroy_gre_netlink(const char *name OVS_UNUSED)
{
#ifdef GRE_IOCTL_ONLY
return EOPNOTSUPP;
COVERAGE_INC(netdev_get_stats);
if (!(netdev_dev->cache_valid & VALID_IS_INTERNAL)) {
- netdev_dev->is_internal = !strcmp(netdev_get_type(netdev_),
- "tap");
-
+ netdev_dev->is_internal = !strcmp(netdev_get_type(netdev_), "tap");
if (!netdev_dev->is_internal) {
struct ethtool_drvinfo drvinfo;
* will appear to be swapped relative to the other ports since we are the
* one sending the data, not a remote computer. For consistency, we swap
* them back here. */
- if (netdev_dev->is_internal) {
+ if (!error && netdev_dev->is_internal) {
stats->rx_packets = raw_stats.tx_packets;
stats->tx_packets = raw_stats.rx_packets;
stats->rx_bytes = raw_stats.tx_bytes;
/* Adds 'router' as a default IP gateway. */
static int
-netdev_linux_add_router(struct netdev *netdev UNUSED, struct in_addr router)
+netdev_linux_add_router(struct netdev *netdev OVS_UNUSED, struct in_addr router)
{
struct in_addr any = { INADDR_ANY };
struct rtentry rt;
static void
netdev_linux_poll_cb(const struct rtnetlink_change *change,
- void *aux UNUSED)
+ void *aux OVS_UNUSED)
{
if (change) {
struct list *list = shash_find_data(&netdev_linux_notifiers,