search for: virtnet_rq_stats_desc

Displaying 20 results from an estimated 21 matches for "virtnet_rq_stats_desc".

2018 Jan 17
1
[PATCH v2 net-next] virtio_net: Add ethtool stats
...rtnet_sq_stats, m) +#define VIRTNET_RQ_STAT(m) offsetof(struct virtnet_rq_stats, m) + +static const struct virtnet_stat_desc virtnet_sq_stats_desc[] = { + { "packets", VIRTNET_SQ_STAT(packets) }, + { "bytes", VIRTNET_SQ_STAT(bytes) }, +}; + +static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { + { "packets", VIRTNET_RQ_STAT(packets) }, + { "bytes", VIRTNET_RQ_STAT(bytes) }, +}; + +#define VIRTNET_SQ_STATS_LEN ARRAY_SIZE(virtnet_sq_stats_desc) +#define VIRTNET_RQ_STATS_LEN ARRAY_SIZE(virtnet_rq_stats_desc) + /* Internal representation of a send virtqueue */ str...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...virtnet_sq_stats_desc[] = { { "xdp_tx", VIRTNET_SQ_STAT(xdp_tx) }, { "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, { "kicks", VIRTNET_SQ_STAT(kicks) }, + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, }; static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { @@ -211,6 +213,9 @@ struct virtnet_info { /* Work struct for config space updates */ struct work_struct config_work; + /* Work struct for resetting the virtio-net driver. */ + struct work_struct reset_work; + /* Does the affinity hint is set for virtqueues? */ bool affinity_hint_set...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...virtnet_sq_stats_desc[] = { { "xdp_tx", VIRTNET_SQ_STAT(xdp_tx) }, { "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, { "kicks", VIRTNET_SQ_STAT(kicks) }, + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, }; static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { @@ -211,6 +213,9 @@ struct virtnet_info { /* Work struct for config space updates */ struct work_struct config_work; + /* Work struct for resetting the virtio-net driver. */ + struct work_struct reset_work; + /* Does the affinity hint is set for virtqueues? */ bool affinity_hint_set...
2019 Oct 07
0
[PATCH RFC net-next 1/2] drivers: net: virtio_net: Add tx_timeout stats field
...{ "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, > > { "kicks", VIRTNET_SQ_STAT(kicks) }, > > + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, > > }; > > > > static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { > > @@ -1721,7 +1723,7 @@ static void virtnet_stats(struct net_device *dev, > > int i; > > > > for (i = 0; i < vi->max_queue_pairs; i++) { > > - u64 tpackets, tbytes, rpackets, rbytes, rdrops; > > + u64 tpackets, tb...
2019 Oct 06
7
[PATCH RFC net-next 0/2] drivers: net: virtio_net: Implement
From: Julio Faracco <jcfaracco at gmail.com> Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. To enable it, driver should have .ndo_tx_timeout implemented. This serie has two commits: In the past, we implemented a function to recover driver state when this kind of event
2019 Oct 06
7
[PATCH RFC net-next 0/2] drivers: net: virtio_net: Implement
From: Julio Faracco <jcfaracco at gmail.com> Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. To enable it, driver should have .ndo_tx_timeout implemented. This serie has two commits: In the past, we implemented a function to recover driver state when this kind of event
2019 Nov 26
0
[net-next V3 2/2] drivers: net: virtio_net: Implement a dev_watchdog handler
...t_sq_stats_desc[] = { { "xdp_tx", VIRTNET_SQ_STAT(xdp_tx) }, { "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, { "kicks", VIRTNET_SQ_STAT(kicks) }, + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, }; static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { @@ -211,6 +213,9 @@ struct virtnet_info { /* Work struct for config space updates */ struct work_struct config_work; + /* Work struct for resetting the virtio-net driver. */ + struct work_struct reset_work; + /* Does the affinity hint is set for virtqueues? */ bool affinity_hint_set...
2019 Nov 22
0
[PATCH] drivers: net: virtio_net: Implement a dev_watchdog handler
...virtnet_sq_stats_desc[] = { { "xdp_tx", VIRTNET_SQ_STAT(xdp_tx) }, { "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, { "kicks", VIRTNET_SQ_STAT(kicks) }, + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, }; static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { @@ -211,6 +213,9 @@ struct virtnet_info { /* Work struct for config space updates */ struct work_struct config_work; + /* Work struct for resetting the virtio-net driver. */ + struct work_struct reset_work; + /* Does the affinity hint is set for virtqueues? */ bool affinity_hint_set...
2019 Nov 22
0
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...{ "xdp_tx", VIRTNET_SQ_STAT(xdp_tx) }, > { "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, > { "kicks", VIRTNET_SQ_STAT(kicks) }, > + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, > }; > > static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { > @@ -211,6 +213,9 @@ struct virtnet_info { > /* Work struct for config space updates */ > struct work_struct config_work; > > + /* Work struct for resetting the virtio-net driver. */ > + struct work_struct reset_work; > + > /* Does the affinity hint is set for...
2018 Jul 31
0
[PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats
...amp; (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) { receive_buf(vi, rq, buf, len, NULL, xdp_xmit, &stats); - stats.rx.packets++; + stats.packets++; } } @@ -1321,12 +1313,12 @@ static int virtnet_receive(struct receive_queue *rq, int budget, size_t offset = virtnet_rq_stats_desc[i].offset; u64 *item; - item = (u64 *)((u8 *)&rq->stats.items + offset); - *item += *(u64 *)((u8 *)&stats.rx + offset); + item = (u64 *)((u8 *)&rq->stats + offset); + *item += *(u64 *)((u8 *)&stats + offset); } u64_stats_update_end(&rq->stats.syncp); - re...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
Commit 5b8f3c8d30a6 ("virtio_net: Add XDP related stats") tries to count TX XDP stats in virtnet_receive(). This will cause several issues: - virtnet_xdp_sq() was called without checking whether or not XDP is set. This may cause out of bound access when there's no enough txq for XDP. - Stats were updated even if there's no XDP/XDP_TX. Fixing this by reusing
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
Commit 5b8f3c8d30a6 ("virtio_net: Add XDP related stats") tries to count TX XDP stats in virtnet_receive(). This will cause several issues: - virtnet_xdp_sq() was called without checking whether or not XDP is set. This may cause out of bound access when there's no enough txq for XDP. - Stats were updated even if there's no XDP/XDP_TX. Fixing this by reusing
2023 Jul 10
10
[PATCH vhost v11 00/10] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use
2023 Aug 10
12
[PATCH vhost v13 00/12] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use
2023 Aug 10
12
[PATCH vhost v13 00/12] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use
2019 Nov 22
0
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...ot;, VIRTNET_SQ_STAT(xdp_tx_drops) }, > > > { "kicks", VIRTNET_SQ_STAT(kicks) }, > > > + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, > > > }; > > > > > > static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { > > > @@ -211,6 +213,9 @@ struct virtnet_info { > > > /* Work struct for config space updates */ > > > struct work_struct config_work; > > > > > > + /* Work struct for resetting the virtio-net driver. */ > > > + struct...
2019 Nov 23
1
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...T(xdp_tx_drops) }, > > > > { "kicks", VIRTNET_SQ_STAT(kicks) }, > > > > + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, > > > > }; > > > > > > > > static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { > > > > @@ -211,6 +213,9 @@ struct virtnet_info { > > > > /* Work struct for config space updates */ > > > > struct work_struct config_work; > > > > > > > > + /* Work struct for resetting the virtio-net driver. */ &gt...
2019 Nov 22
4
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...{ "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, > > { "kicks", VIRTNET_SQ_STAT(kicks) }, > > + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, > > }; > > > > static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { > > @@ -211,6 +213,9 @@ struct virtnet_info { > > /* Work struct for config space updates */ > > struct work_struct config_work; > > > > + /* Work struct for resetting the virtio-net driver. */ > > + struct work_struct reset_work; > &...
2019 Nov 22
4
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...{ "xdp_tx_drops", VIRTNET_SQ_STAT(xdp_tx_drops) }, > > { "kicks", VIRTNET_SQ_STAT(kicks) }, > > + { "tx_timeouts", VIRTNET_SQ_STAT(tx_timeouts) }, > > }; > > > > static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { > > @@ -211,6 +213,9 @@ struct virtnet_info { > > /* Work struct for config space updates */ > > struct work_struct config_work; > > > > + /* Work struct for resetting the virtio-net driver. */ > > + struct work_struct reset_work; > &...
2019 Nov 26
9
[net-next V3 0/2] drivers: net: virtio_net: implement
This series add two important features. One of them changes the .ndo_tx_timeout to include an extra parameter to identify the stuck queue. Many drivers are using a nester loop to identify which queue is stooped/stucked. This is a redundant work since dev_watchdog is doing exactly the same thing. This is so interesting for other drivers to in terms of code optimization. The second part (second