search for: xdp_rxq_info_reg_mem_model

Displaying 12 results from an estimated 12 matches for "xdp_rxq_info_reg_mem_model".

2023 May 12
4
[PATCH net v6] virtio_net: Fix error unwinding of XDP initialization
...+} + +static int virtnet_enable_queue_pair(struct virtnet_info *vi, int qp_index) +{ + struct net_device *dev = vi->dev; + int err; + + err = xdp_rxq_info_reg(&vi->rq[qp_index].xdp_rxq, dev, qp_index, + vi->rq[qp_index].napi.napi_id); + if (err < 0) + return err; + + err = xdp_rxq_info_reg_mem_model(&vi->rq[qp_index].xdp_rxq, + MEM_TYPE_PAGE_SHARED, NULL); + if (err < 0) + goto err_xdp_reg_mem_model; + + virtnet_napi_enable(vi->rq[qp_index].vq, &vi->rq[qp_index].napi); + virtnet_napi_tx_enable(vi, vi->sq[qp_index].vq, &vi->sq[qp_index].napi); + + return 0; +...
2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
...ic int virtnet_poll(struct napi_struct *napi, int budget) return received; } +static int virtnet_reg_xdp(struct xdp_rxq_info *xdp_rxq, + struct net_device *dev, u32 queue_index) +{ + int err; + + err = xdp_rxq_info_reg(xdp_rxq, dev, queue_index); + if (err < 0) + return err; + + err = xdp_rxq_info_reg_mem_model(xdp_rxq, MEM_TYPE_PAGE_SHARED, NULL); + if (err < 0) + xdp_rxq_info_unreg(xdp_rxq); + return err; +} + static int virtnet_open(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -1480,17 +1495,10 @@ static int virtnet_open(struct net_device *dev) if (!try_fill_recv...
2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
...ic int virtnet_poll(struct napi_struct *napi, int budget) return received; } +static int virtnet_reg_xdp(struct xdp_rxq_info *xdp_rxq, + struct net_device *dev, u32 queue_index) +{ + int err; + + err = xdp_rxq_info_reg(xdp_rxq, dev, queue_index); + if (err < 0) + return err; + + err = xdp_rxq_info_reg_mem_model(xdp_rxq, MEM_TYPE_PAGE_SHARED, NULL); + if (err < 0) + xdp_rxq_info_unreg(xdp_rxq); + return err; +} + static int virtnet_open(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -1480,17 +1495,10 @@ static int virtnet_open(struct net_device *dev) if (!try_fill_recv...
2023 May 10
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...xq, dev, i, vi->rq[i].napi.napi_id); >>>>>> if (err < 0) >>>>>> - return err; >>>>>> + goto err_xdp_info_reg; >>>>>> >>>>>> err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, >>>>>> MEM_TYPE_PAGE_SHARED, NULL); >>>>>> - if (err < 0) { >>>>>> - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); >>>>&...
2023 May 09
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...i->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id); > >>>> if (err < 0) > >>>> - return err; > >>>> + goto err_xdp_info_reg; > >>>> > >>>> err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, > >>>> MEM_TYPE_PAGE_SHARED, NULL); > >>>> - if (err < 0) { > >>>> - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); > >>>> -...
2023 Apr 28
1
[PATCH net v1 1/2] virtio_net: Fix error unwinding of XDP initialization
...t_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -1883,20 +1890,27 @@ static int virtnet_open(struct net_device *dev) err = xdp_rxq_info_reg(&vi->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id); if (err < 0) - return err; + goto err_xdp_info_reg; err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, MEM_TYPE_PAGE_SHARED, NULL); - if (err < 0) { - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); - return err; - } + if (err < 0) + goto err_xdp_reg_mem_model; virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi); virtnet_napi_tx_enabl...
2020 Jun 07
0
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
...return received; > } > > +static int virtnet_reg_xdp(struct xdp_rxq_info *xdp_rxq, > + struct net_device *dev, u32 queue_index) > +{ > + int err; > + > + err = xdp_rxq_info_reg(xdp_rxq, dev, queue_index); > + if (err < 0) > + return err; > + > + err = xdp_rxq_info_reg_mem_model(xdp_rxq, MEM_TYPE_PAGE_SHARED, NULL); > + if (err < 0) > + xdp_rxq_info_unreg(xdp_rxq); > + return err; > +} > + > static int virtnet_open(struct net_device *dev) > { > struct virtnet_info *vi = netdev_priv(dev); > @@ -1480,17 +1495,10 @@ static int virtnet_open(s...
2023 May 02
1
[PATCH net v2] virtio_net: Fix error unwinding of XDP initialization
...t_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -1883,20 +1890,27 @@ static int virtnet_open(struct net_device *dev) err = xdp_rxq_info_reg(&vi->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id); if (err < 0) - return err; + goto err_xdp_info_reg; err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, MEM_TYPE_PAGE_SHARED, NULL); - if (err < 0) { - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); - return err; - } + if (err < 0) + goto err_xdp_reg_mem_model; virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi); virtnet_napi_tx_enabl...
2023 May 02
1
[PATCH net v2] virtio_net: Fix error unwinding of XDP initialization
...*vi = netdev_priv(dev); > @@ -1883,20 +1890,27 @@ static int virtnet_open(struct net_device *dev) > > err = xdp_rxq_info_reg(&vi->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id); > if (err < 0) > - return err; > + goto err_xdp_info_reg; > > err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, > MEM_TYPE_PAGE_SHARED, NULL); > - if (err < 0) { > - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); > - return err; > - } > + if (err < 0) > + goto err_xdp_reg_mem_model; > > virtnet_napi_enable(vi->rq[i].vq, &amp...
2023 May 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...nfo *vi = netdev_priv(dev); > @@ -1883,20 +1890,26 @@ static int virtnet_open(struct net_device *dev) > > err = xdp_rxq_info_reg(&vi->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id); > if (err < 0) > - return err; > + goto err_xdp_info_reg; > > err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, > MEM_TYPE_PAGE_SHARED, NULL); > - if (err < 0) { > - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); > - return err; > - } > + if (err < 0) > + goto err_xdp_reg_mem_model; > > virtnet_napi_enable(vi->rq[i].vq, &v...
2023 May 03
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...t_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -1883,20 +1890,26 @@ static int virtnet_open(struct net_device *dev) err = xdp_rxq_info_reg(&vi->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id); if (err < 0) - return err; + goto err_xdp_info_reg; err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, MEM_TYPE_PAGE_SHARED, NULL); - if (err < 0) { - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); - return err; - } + if (err < 0) + goto err_xdp_reg_mem_model; virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi); virtnet_napi_tx_enabl...
2023 May 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...dev) >> >> err = xdp_rxq_info_reg(&vi->rq[i].xdp_rxq, dev, i, vi->rq[i].napi.napi_id); >> if (err < 0) >> - return err; >> + goto err_xdp_info_reg; >> >> err = xdp_rxq_info_reg_mem_model(&vi->rq[i].xdp_rxq, >> MEM_TYPE_PAGE_SHARED, NULL); >> - if (err < 0) { >> - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq); >> - return err; >> - }...