Displaying 20 results from an estimated 37 matches for "rcu_dereference_bh".
2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...gt; int err;
> struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
> bool kick = !skb->xmit_more;
> bool use_napi = sq->napi.weight;
>
> + /* If VF is present and up then redirect packets
> + * called with rcu_read_lock_bh
> + */
> + vf_netdev = rcu_dereference_bh(vi->vf_netdev);
> + if (vf_netdev && netif_running(vf_netdev) &&
> + !netpoll_tx_running(dev) &&
> + is_unicast_ether_addr(eth_hdr(skb)->h_dest))
> + return virtnet_vf_xmit(dev, vf_netdev, skb);
> +
A question here.
If I read the code correctl...
2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...gt; int err;
> struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
> bool kick = !skb->xmit_more;
> bool use_napi = sq->napi.weight;
>
> + /* If VF is present and up then redirect packets
> + * called with rcu_read_lock_bh
> + */
> + vf_netdev = rcu_dereference_bh(vi->vf_netdev);
> + if (vf_netdev && netif_running(vf_netdev) &&
> + !netpoll_tx_running(dev) &&
> + is_unicast_ether_addr(eth_hdr(skb)->h_dest))
> + return virtnet_vf_xmit(dev, vf_netdev, skb);
> +
A question here.
If I read the code correctl...
2018 Jan 23
0
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...v_queue *txq = netdev_get_tx_queue(dev, qnum);
>> ????? bool kick = !skb->xmit_more;
>> ????? bool use_napi = sq->napi.weight;
>> ? +??? /* If VF is present and up then redirect packets
>> +???? * called with rcu_read_lock_bh
>> +???? */
>> +??? vf_netdev = rcu_dereference_bh(vi->vf_netdev);
>> +??? if (vf_netdev && netif_running(vf_netdev) &&
>> +??????? !netpoll_tx_running(dev) &&
>> +??????? is_unicast_ether_addr(eth_hdr(skb)->h_dest))
>> +??????? return virtnet_vf_xmit(dev, vf_netdev, skb);
>> +
>
> A...
2018 Feb 16
0
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...e_skb_any(skb);
+ return NETDEV_TX_OK;
+}
+
+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->active_netdev);
+ if (!xmit_dev || !virtnet_bypass_xmit_ready(xmit_dev)) {
+ xmit_dev = rcu_dereference_bh(vbi->backup_netdev);
+ if (!xmit_dev || !virtnet_bypass_xmit_ready(xmit_dev))
+ return virtnet_bypass_drop_xmit(skb, dev);
+ }
+
+ skb->dev = xmit_dev;
+ skb->queue_mappin...
2018 Apr 05
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...& 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->active_netdev);
+ if (!xmit_dev || !virtnet_bypass_xmit_ready(xmit_dev)) {
+ xmit_dev = rcu_dereference_bh(vbi->backup_netdev);
+ if (!xmit_dev || !virtnet_bypass_xmit_ready(xmit_dev))
+ return virtnet_bypass_drop_xmit(skb, dev);
+ }
+
+ skb->dev = xmit_dev;
+ skb->queue_mappin...
2018 Jan 12
7
[RFC PATCH net-next v2 0/2] Enable virtio to act as a backup for a passthru device
This patch series extends virtio_net to take over VF datapath by
simulating a transparent bond without creating any additional netdev.
I understand that there are some comments suggesting an alternate model
that is based on 3 driver model(virtio_net, VF driver, a new driver
virt_bond that acts as a master to virtio_net and VF).
Would like to get some feedback on the right way to solve the live
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...> +static netdev_tx_t failover_start_xmit(struct sk_buff *skb,
> + struct net_device *dev)
> +{
> + struct failover_info *finfo = netdev_priv(dev);
> + struct net_device *xmit_dev;
> +
> + /* Try xmit via primary netdev followed by standby netdev */
> + xmit_dev = rcu_dereference_bh(finfo->primary_dev);
> + if (!xmit_dev || !failover_xmit_ready(xmit_dev)) {
> + xmit_dev = rcu_dereference_bh(finfo->standby_dev);
> + if (!xmit_dev || !failover_xmit_ready(xmit_dev))
> + return failover_drop_xmit(skb, dev);
> + }
> +
> + skb->dev = xmit_dev;
>...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...> +static netdev_tx_t failover_start_xmit(struct sk_buff *skb,
> + struct net_device *dev)
> +{
> + struct failover_info *finfo = netdev_priv(dev);
> + struct net_device *xmit_dev;
> +
> + /* Try xmit via primary netdev followed by standby netdev */
> + xmit_dev = rcu_dereference_bh(finfo->primary_dev);
> + if (!xmit_dev || !failover_xmit_ready(xmit_dev)) {
> + xmit_dev = rcu_dereference_bh(finfo->standby_dev);
> + if (!xmit_dev || !failover_xmit_ready(xmit_dev))
> + return failover_drop_xmit(skb, dev);
> + }
> +
> + skb->dev = xmit_dev;
>...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...ptive. "bi" is too short
to know what that is right away.
>+ struct net_device *xmit_dev;
Don't mix "dev" and "netdev" in one .c file. Just use "dev" for all.
>+
>+ /* Try xmit via active netdev followed by backup netdev */
>+ xmit_dev = rcu_dereference_bh(bi->active_netdev);
>+ if (!xmit_dev || !bypass_xmit_ready(xmit_dev)) {
>+ xmit_dev = rcu_dereference_bh(bi->backup_netdev);
>+ if (!xmit_dev || !bypass_xmit_ready(xmit_dev))
>+ return bypass_drop_xmit(skb, dev);
>+ }
>+
>+ skb->dev = xmit_dev;
>+ skb->queue_...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...ptive. "bi" is too short
to know what that is right away.
>+ struct net_device *xmit_dev;
Don't mix "dev" and "netdev" in one .c file. Just use "dev" for all.
>+
>+ /* Try xmit via active netdev followed by backup netdev */
>+ xmit_dev = rcu_dereference_bh(bi->active_netdev);
>+ if (!xmit_dev || !bypass_xmit_ready(xmit_dev)) {
>+ xmit_dev = rcu_dereference_bh(bi->backup_netdev);
>+ if (!xmit_dev || !bypass_xmit_ready(xmit_dev))
>+ return bypass_drop_xmit(skb, dev);
>+ }
>+
>+ skb->dev = xmit_dev;
>+ skb->queue_...
2018 Apr 10
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...t;tx_dropped);
+ dev_kfree_skb_any(skb);
+ return NETDEV_TX_OK;
+}
+
+netdev_tx_t bypass_start_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+ struct bypass_info *bi = netdev_priv(dev);
+ struct net_device *xmit_dev;
+
+ /* Try xmit via active netdev followed by backup netdev */
+ xmit_dev = rcu_dereference_bh(bi->active_netdev);
+ if (!xmit_dev || !bypass_xmit_ready(xmit_dev)) {
+ xmit_dev = rcu_dereference_bh(bi->backup_netdev);
+ if (!xmit_dev || !bypass_xmit_ready(xmit_dev))
+ return bypass_drop_xmit(skb, dev);
+ }
+
+ skb->dev = xmit_dev;
+ skb->queue_mapping = qdisc_skb_cb(skb)->...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...kb_any(skb);
+ return NETDEV_TX_OK;
+}
+
+static netdev_tx_t failover_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+{
+ struct failover_info *finfo = netdev_priv(dev);
+ struct net_device *xmit_dev;
+
+ /* Try xmit via primary netdev followed by standby netdev */
+ xmit_dev = rcu_dereference_bh(finfo->primary_dev);
+ if (!xmit_dev || !failover_xmit_ready(xmit_dev)) {
+ xmit_dev = rcu_dereference_bh(finfo->standby_dev);
+ if (!xmit_dev || !failover_xmit_ready(xmit_dev))
+ return failover_drop_xmit(skb, dev);
+ }
+
+ skb->dev = xmit_dev;
+ skb->queue_mapping = qdisc_skb_cb(s...
2018 May 22
0
[PATCH net-next v11 3/5] net: Introduce net_failover driver
...kb);
+ return NETDEV_TX_OK;
+}
+
+static netdev_tx_t net_failover_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+{
+ struct net_failover_info *nfo_info = netdev_priv(dev);
+ struct net_device *xmit_dev;
+
+ /* Try xmit via primary netdev followed by standby netdev */
+ xmit_dev = rcu_dereference_bh(nfo_info->primary_dev);
+ if (!xmit_dev || !net_failover_xmit_ready(xmit_dev)) {
+ xmit_dev = rcu_dereference_bh(nfo_info->standby_dev);
+ if (!xmit_dev || !net_failover_xmit_ready(xmit_dev))
+ return net_failover_drop_xmit(skb, dev);
+ }
+
+ skb->dev = xmit_dev;
+ skb->queue_mappin...
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be
used by hypervisor to indicate that virtio_net interface should act as
a backup for another device with the same MAC address.
Ppatch 2 is in response to the community request for a 3 netdev
solution. However, it creates some issues we'll get into in a moment.
It extends virtio_net to use alternate datapath when available
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be
used by hypervisor to indicate that virtio_net interface should act as
a backup for another device with the same MAC address.
Ppatch 2 is in response to the community request for a 3 netdev
solution. However, it creates some issues we'll get into in a moment.
It extends virtio_net to use alternate datapath when available
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...ilover_start_xmit(struct sk_buff *skb,
>> + struct net_device *dev)
>> +{
>> + struct failover_info *finfo = netdev_priv(dev);
>> + struct net_device *xmit_dev;
>> +
>> + /* Try xmit via primary netdev followed by standby netdev */
>> + xmit_dev = rcu_dereference_bh(finfo->primary_dev);
>> + if (!xmit_dev || !failover_xmit_ready(xmit_dev)) {
>> + xmit_dev = rcu_dereference_bh(finfo->standby_dev);
>> + if (!xmit_dev || !failover_xmit_ready(xmit_dev))
>> + return failover_drop_xmit(skb, dev);
>> + }
>> +
>> + s...
2018 Apr 11
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...er master dev.
>
>
>> + struct net_device *xmit_dev;
> Don't mix "dev" and "netdev" in one .c file. Just use "dev" for all.
OK.
>
>
>
>> +
>> + /* Try xmit via active netdev followed by backup netdev */
>> + xmit_dev = rcu_dereference_bh(bi->active_netdev);
>> + if (!xmit_dev || !bypass_xmit_ready(xmit_dev)) {
>> + xmit_dev = rcu_dereference_bh(bi->backup_netdev);
>> + if (!xmit_dev || !bypass_xmit_ready(xmit_dev))
>> + return bypass_drop_xmit(skb, dev);
>> + }
>> +
>> + skb->d...
2018 May 07
0
[PATCH net-next v10 2/4] net: Introduce generic failover module
...kb);
+ return NETDEV_TX_OK;
+}
+
+static netdev_tx_t net_failover_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+{
+ struct net_failover_info *nfo_info = netdev_priv(dev);
+ struct net_device *xmit_dev;
+
+ /* Try xmit via primary netdev followed by standby netdev */
+ xmit_dev = rcu_dereference_bh(nfo_info->primary_dev);
+ if (!xmit_dev || !net_failover_xmit_ready(xmit_dev)) {
+ xmit_dev = rcu_dereference_bh(nfo_info->standby_dev);
+ if (!xmit_dev || !net_failover_xmit_ready(xmit_dev))
+ return net_failover_drop_xmit(skb, dev);
+ }
+
+ skb->dev = xmit_dev;
+ skb->queue_mappin...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...vi->sq[qnum];
+ struct net_device *vf_netdev;
int err;
struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
bool kick = !skb->xmit_more;
bool use_napi = sq->napi.weight;
+ /* if VF is present and up then redirect packets
+ * called with rcu_read_lock_bh
+ */
+ vf_netdev = rcu_dereference_bh(vi->vf_netdev);
+ if (vf_netdev && netif_running(vf_netdev) && !netpoll_tx_running(dev))
+ return virtnet_vf_xmit(dev, vf_netdev, skb);
+
/* Free up any pending old buffers before queueing new ones. */
free_old_xmit_skbs(sq);
@@ -1456,10 +1509,41 @@ static int virtnet_set_...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...vi->sq[qnum];
+ struct net_device *vf_netdev;
int err;
struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum);
bool kick = !skb->xmit_more;
bool use_napi = sq->napi.weight;
+ /* if VF is present and up then redirect packets
+ * called with rcu_read_lock_bh
+ */
+ vf_netdev = rcu_dereference_bh(vi->vf_netdev);
+ if (vf_netdev && netif_running(vf_netdev) && !netpoll_tx_running(dev))
+ return virtnet_vf_xmit(dev, vf_netdev, skb);
+
/* Free up any pending old buffers before queueing new ones. */
free_old_xmit_skbs(sq);
@@ -1456,10 +1509,41 @@ static int virtnet_set_...