search for: netif_carrier_ok

Displaying 20 results from an estimated 74 matches for "netif_carrier_ok".

2012 Jan 12
9
Re: [PATCH] add netconsole support for xen-netfront
...ikely(frags > MAX_SKB_FRAGS + 1)) { > @@ -498,12 +499,12 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) > goto drop; > } > > - spin_lock_irq(&np->tx_lock); > + spin_lock_irqsave(&np->tx_lock, flags); > > if (unlikely(!netif_carrier_ok(dev) || > (frags > 1 && !xennet_can_sg(dev)) || > netif_needs_gso(skb, netif_skb_features(skb)))) { > - spin_unlock_irq(&np->tx_lock); > + spin_unlock_irqrestore(&np->tx_lock, flags); > goto drop; > } > > @@ -574,7 +575,7 @@...
2007 Apr 18
1
[Bridge] [PATCH] fix 802.3ad multicast
Hi Stephen, there was a bug in bridging bonds. multicast packets needed for 802.3ad netif_carrier_ok() were dropped. attached patch works for me. Cheers, Vlad. -------------- next part -------------- A non-text attachment was scrubbed... Name: fix_br_multicast.patch Type: text/x-patch Size: 1344 bytes Desc: not available Url : http://lists.linux-foundation.org/pipermail/bridge/attachments/2006...
2013 Feb 06
0
[PATCH 1/4] xen/netback: shutdown the ring if it contains garbage.
...c index b7d41f8..b8c5193 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -343,17 +343,22 @@ err: return err; } -void xenvif_disconnect(struct xenvif *vif) +void xenvif_carrier_off(struct xenvif *vif) { struct net_device *dev = vif->dev; - if (netif_carrier_ok(dev)) { - rtnl_lock(); - netif_carrier_off(dev); /* discard queued packets */ - if (netif_running(dev)) - xenvif_down(vif); - rtnl_unlock(); - xenvif_put(vif); - } + + rtnl_lock(); + netif_carrier_off(dev); /* discard queued packets */ + if (netif_running(dev)) + xenvif_down(vif); + rtnl_un...
2013 May 21
1
[PATCH net-next V2 2/2] xen-netfront: split event channels support for Xen frontend driver
...v_id; - struct netfront_info *np = netdev_priv(dev); + struct netfront_info *np = dev_id; + struct net_device *dev = np->netdev; unsigned long flags; spin_lock_irqsave(&np->tx_lock, flags); + xennet_tx_buf_gc(dev); + spin_unlock_irqrestore(&np->tx_lock, flags); - if (likely(netif_carrier_ok(dev))) { - xennet_tx_buf_gc(dev); - /* Under tx_lock: protects access to rx shared-ring indexes. */ - if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx)) + return IRQ_HANDLED; +} + +static irqreturn_t xennet_rx_interrupt(int irq, void *dev_id) +{ + struct netfront_info *np = dev_id; + struct net_...
2018 May 22
0
[PATCH net-next v11 3/5] net: Introduce net_failover driver
...nux/rtnetlink.h> +#include <linux/if_vlan.h> +#include <linux/pci.h> +#include <net/sch_generic.h> +#include <uapi/linux/if_arp.h> +#include <net/net_failover.h> + +static bool net_failover_xmit_ready(struct net_device *dev) +{ + return netif_running(dev) && netif_carrier_ok(dev); +} + +static int net_failover_open(struct net_device *dev) +{ + struct net_failover_info *nfo_info = netdev_priv(dev); + struct net_device *primary_dev, *standby_dev; + int err; + + primary_dev = rtnl_dereference(nfo_info->primary_dev); + if (primary_dev) { + err = dev_open(primary_dev);...
2011 May 23
5
[PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe().
...robe(struct hv_device *dev) return ret; } - /* - * If carrier is still off ie we did not get a link status callback, - * update it if necessary - */ - /* - * FIXME: We should use a atomic or test/set instead to avoid getting - * out of sync with the device's link status - */ - if (!netif_carrier_ok(net)) - if (!device_info.link_state) - netif_carrier_on(net); + netif_carrier_on(net); memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN); -- 1.6.3.2
2011 May 23
5
[PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe().
...robe(struct hv_device *dev) return ret; } - /* - * If carrier is still off ie we did not get a link status callback, - * update it if necessary - */ - /* - * FIXME: We should use a atomic or test/set instead to avoid getting - * out of sync with the device's link status - */ - if (!netif_carrier_ok(net)) - if (!device_info.link_state) - netif_carrier_on(net); + netif_carrier_on(net); memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN); -- 1.6.3.2
2018 May 07
0
[PATCH net-next v10 2/4] net: Introduce generic failover module
...+#include <net/sch_generic.h> +#include <uapi/linux/if_arp.h> +#include <net/net_failover.h> + +static LIST_HEAD(net_failover_list); +static DEFINE_SPINLOCK(net_failover_lock); + +static bool net_failover_xmit_ready(struct net_device *dev) +{ + return netif_running(dev) && netif_carrier_ok(dev); +} + +static int net_failover_open(struct net_device *dev) +{ + struct net_failover_info *nfo_info = netdev_priv(dev); + struct net_device *primary_dev, *standby_dev; + int err; + + primary_dev = rtnl_dereference(nfo_info->primary_dev); + if (primary_dev) { + err = dev_open(primary_dev);...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...FY_DONE; >> > > > +} >> > > > +EXPORT_SYMBOL_GPL(bypass_slave_unregister); >> > > > + >> > > > +static bool bypass_xmit_ready(struct net_device *dev) >> > > > +{ >> > > > + return netif_running(dev) && netif_carrier_ok(dev); >> > > > +} >> > > > + >> > > > +static int bypass_slave_link_change(struct net_device *slave_netdev) >> > > > +{ >> > > > + struct net_device *bypass_netdev, *active_netdev, *backup_netdev; >> > > > + s...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...FY_DONE; >> > > > +} >> > > > +EXPORT_SYMBOL_GPL(bypass_slave_unregister); >> > > > + >> > > > +static bool bypass_xmit_ready(struct net_device *dev) >> > > > +{ >> > > > + return netif_running(dev) && netif_carrier_ok(dev); >> > > > +} >> > > > + >> > > > +static int bypass_slave_link_change(struct net_device *slave_netdev) >> > > > +{ >> > > > + struct net_device *bypass_netdev, *active_netdev, *backup_netdev; >> > > > + s...
2018 Apr 18
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...> +done: >>>> + return NOTIFY_DONE; >>>> +} >>>> +EXPORT_SYMBOL_GPL(bypass_slave_unregister); >>>> + >>>> +static bool bypass_xmit_ready(struct net_device *dev) >>>> +{ >>>> + return netif_running(dev) && netif_carrier_ok(dev); >>>> +} >>>> + >>>> +static int bypass_slave_link_change(struct net_device *slave_netdev) >>>> +{ >>>> + struct net_device *bypass_netdev, *active_netdev, *backup_netdev; >>>> + struct bypass_ops *bypass_ops; >>>...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...> > + >> > +done: >> > + return NOTIFY_DONE; >> > +} >> > +EXPORT_SYMBOL_GPL(bypass_slave_unregister); >> > + >> > +static bool bypass_xmit_ready(struct net_device *dev) >> > +{ >> > + return netif_running(dev) && netif_carrier_ok(dev); >> > +} >> > + >> > +static int bypass_slave_link_change(struct net_device *slave_netdev) >> > +{ >> > + struct net_device *bypass_netdev, *active_netdev, *backup_netdev; >> > + struct bypass_ops *bypass_ops; >> > + struct bypass_...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...> > + >> > +done: >> > + return NOTIFY_DONE; >> > +} >> > +EXPORT_SYMBOL_GPL(bypass_slave_unregister); >> > + >> > +static bool bypass_xmit_ready(struct net_device *dev) >> > +{ >> > + return netif_running(dev) && netif_carrier_ok(dev); >> > +} >> > + >> > +static int bypass_slave_link_change(struct net_device *slave_netdev) >> > +{ >> > + struct net_device *bypass_netdev, *active_netdev, *backup_netdev; >> > + struct bypass_ops *bypass_ops; >> > + struct bypass_...
2018 Apr 18
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...t; > +} > >> > > > +EXPORT_SYMBOL_GPL(bypass_slave_unregister); > >> > > > + > >> > > > +static bool bypass_xmit_ready(struct net_device *dev) > >> > > > +{ > >> > > > + return netif_running(dev) && netif_carrier_ok(dev); > >> > > > +} > >> > > > + > >> > > > +static int bypass_slave_link_change(struct net_device *slave_netdev) > >> > > > +{ > >> > > > + struct net_device *bypass_netdev, *active_netdev, *backup_netdev; &g...
2018 Feb 16
0
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...uct net_device *bypass_netdev; }; struct padded_vnet_hdr { @@ -2255,6 +2280,11 @@ static const struct net_device_ops virtnet_netdev = { .ndo_features_check = passthru_features_check, }; +static bool virtnet_bypass_xmit_ready(struct net_device *dev) +{ + return netif_running(dev) && netif_carrier_ok(dev); +} + static void virtnet_config_changed_work(struct work_struct *work) { struct virtnet_info *vi = @@ -2647,6 +2677,601 @@ static int virtnet_validate(struct virtio_device *vdev) return 0; } +static void +virtnet_bypass_child_open(struct net_device *dev, + struct net_device *chil...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...c netdev_tx_t virtnet_bypass_drop_xmit(struct sk_buff *skb, + struct net_device *dev) +{ + atomic_long_inc(&dev->tx_dropped); + dev_kfree_skb_any(skb); + return NETDEV_TX_OK; +} + +static bool virtnet_bypass_xmit_ready(struct net_device *dev) +{ + return netif_running(dev) && netif_carrier_ok(dev); +} + +static netdev_tx_t virtnet_bypass_start_xmit(struct sk_buff *skb, + struct net_device *dev) +{ + struct virtnet_bypass_info *vbi = netdev_priv(dev); + struct net_device *xmit_dev; + + /* Try xmit via active netdev followed by backup netdev */ + xmit_dev = rcu_dereference_bh(vbi...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...failover slave:%s unregistered\n", > + slave_dev->name); > + > +done: > + return NOTIFY_DONE; > +} > +EXPORT_SYMBOL_GPL(failover_slave_unregister); > + > +static bool failover_xmit_ready(struct net_device *dev) > +{ > + return netif_running(dev) && netif_carrier_ok(dev); > +} > + > +static int failover_slave_link_change(struct net_device *slave_dev) > +{ > + struct net_device *failover_dev, *primary_dev, *standby_dev; > + struct failover_ops *failover_ops; > + struct failover_info *finfo; > + > + if (!netif_is_failover_slave(slave_d...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...failover slave:%s unregistered\n", > + slave_dev->name); > + > +done: > + return NOTIFY_DONE; > +} > +EXPORT_SYMBOL_GPL(failover_slave_unregister); > + > +static bool failover_xmit_ready(struct net_device *dev) > +{ > + return netif_running(dev) && netif_carrier_ok(dev); > +} > + > +static int failover_slave_link_change(struct net_device *slave_dev) > +{ > + struct net_device *failover_dev, *primary_dev, *standby_dev; > + struct failover_ops *failover_ops; > + struct failover_info *finfo; > + > + if (!netif_is_failover_slave(slave_d...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...etdev, "bypass slave:%s unregistered\n", >+ slave_netdev->name); >+ >+done: >+ return NOTIFY_DONE; >+} >+EXPORT_SYMBOL_GPL(bypass_slave_unregister); >+ >+static bool bypass_xmit_ready(struct net_device *dev) >+{ >+ return netif_running(dev) && netif_carrier_ok(dev); >+} >+ >+static int bypass_slave_link_change(struct net_device *slave_netdev) >+{ >+ struct net_device *bypass_netdev, *active_netdev, *backup_netdev; >+ struct bypass_ops *bypass_ops; >+ struct bypass_info *bi; >+ >+ if (!netif_is_bypass_slave(slave_netdev)) >+...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...etdev, "bypass slave:%s unregistered\n", >+ slave_netdev->name); >+ >+done: >+ return NOTIFY_DONE; >+} >+EXPORT_SYMBOL_GPL(bypass_slave_unregister); >+ >+static bool bypass_xmit_ready(struct net_device *dev) >+{ >+ return netif_running(dev) && netif_carrier_ok(dev); >+} >+ >+static int bypass_slave_link_change(struct net_device *slave_netdev) >+{ >+ struct net_device *bypass_netdev, *active_netdev, *backup_netdev; >+ struct bypass_ops *bypass_ops; >+ struct bypass_info *bi; >+ >+ if (!netif_is_bypass_slave(slave_netdev)) >+...