Displaying 15 results from an estimated 15 matches for "has_rss_hash_report".
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...not sure I follow the reasoning. Because then hdr_len might be
> > sizeof(virtio_net_hdr_mrg_rxbuf), but sizeof(virtio_net_common_hdr) is
> > larger. So the same issue remains?
> >
> static int virtnet_probe(struct virtio_device *vdev)
> {
> [...]
> if (vi->has_rss_hash_report) {
> vi->hdr_len = sizeof(struct virtio_net_hdr_v1_hash); /* hdr_len will
> be 20 bytes */
> }
> else if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF) ||
> virtio_has_feature(vdev, VIRTIO_F_VERSION_1))
> vi-&g...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...is a typo, will correct it.
> I'm not sure I follow the reasoning. Because then hdr_len might be
> sizeof(virtio_net_hdr_mrg_rxbuf), but sizeof(virtio_net_common_hdr) is
> larger. So the same issue remains?
>
static int virtnet_probe(struct virtio_device *vdev)
{
[...]
if (vi->has_rss_hash_report) {
vi->hdr_len = sizeof(struct virtio_net_hdr_v1_hash); /* hdr_len will
be 20 bytes */
}
else if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF) ||
virtio_has_feature(vdev, VIRTIO_F_VERSION_1))
vi->hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf);
else
vi->hdr_len = sizeof(...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...c void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
> if (unlikely(!skb))
> return;
>
> - hdr = skb_vnet_hdr(skb);
> + common_hdr = skb_vnet_common_hdr(skb);
> if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report)
> - virtio_skb_set_hash((const struct virtio_net_hdr_v1_hash *)hdr, skb);
> + virtio_skb_set_hash(&common_hdr->hash_v1_hdr, skb);
>
> - if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
> + mrg_hdr = &common_hdr->mrg_hdr;...
2023 Apr 13
1
[PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command
...this may not be in line with SPEC, it may cause problem on the devices
that can work normally at present.
Thanks.
> names[total_vqs - 1] = "control";
> }
>
> @@ -4122,6 +4128,7 @@ static int virtnet_probe(struct virtio_device *vdev)
> if (vi->has_rss || vi->has_rss_hash_report)
> virtnet_init_default_rss(vi);
>
> + init_completion(&vi->completion);
> enable_rx_mode_work(vi);
>
> /* serialize netdev register + virtio_device_ready() with ndo_open() */
> --
> 2.25.1
>
2023 Apr 14
1
[PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command
...buggy implementation is suboptimal.
Thanks
>
> Thanks.
>
>
> > names[total_vqs - 1] = "control";
> > }
> >
> > @@ -4122,6 +4128,7 @@ static int virtnet_probe(struct virtio_device *vdev)
> > if (vi->has_rss || vi->has_rss_hash_report)
> > virtnet_init_default_rss(vi);
> >
> > + init_completion(&vi->completion);
> > enable_rx_mode_work(vi);
> >
> > /* serialize netdev register + virtio_device_ready() with ndo_open() */
> > --
> > 2.25.1
> >...
2023 Aug 21
3
[PATCH net-next v3] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...short packet %i\n", dev->name, len);
@@ -1597,9 +1606,9 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
if (unlikely(!skb))
return;
- hdr = skb_vnet_hdr(skb);
+ hdr = skb_vnet_common_hdr(skb);
if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report)
- virtio_skb_set_hash((const struct virtio_net_hdr_v1_hash *)hdr, skb);
+ virtio_skb_set_hash(&hdr->hash_v1_hdr, skb);
if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
skb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -2105,7 +2114,7 @@ static int xmit_skb(struct send_queue *sq,...
2023 May 24
1
[PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue
...virtnet_config_changed_work);
+ INIT_WORK(&vi->rx_mode_work, virtnet_rx_mode_work);
spin_lock_init(&vi->refill_lock);
if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) {
@@ -4110,6 +4155,8 @@ static int virtnet_probe(struct virtio_device *vdev)
if (vi->has_rss || vi->has_rss_hash_report)
virtnet_init_default_rss(vi);
+ enable_rx_mode_work(vi);
+
/* serialize netdev register + virtio_device_ready() with ndo_open() */
rtnl_lock();
@@ -4207,6 +4254,8 @@ static void virtnet_remove(struct virtio_device *vdev)
/* Make sure no work handler is accessing the device. */
flu...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...ket %i\n", dev->name, len);
@@ -1597,18 +1606,19 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
if (unlikely(!skb))
return;
- hdr = skb_vnet_hdr(skb);
+ common_hdr = skb_vnet_common_hdr(skb);
if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report)
- virtio_skb_set_hash((const struct virtio_net_hdr_v1_hash *)hdr, skb);
+ virtio_skb_set_hash(&common_hdr->hash_v1_hdr, skb);
- if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
+ mrg_hdr = &common_hdr->mrg_hdr;
+ if (mrg_hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID...
2023 Apr 13
3
[PATCH net-next V2 0/2] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use sleep instead of busy polling. In this
version, I take a step back: the hardening part is not implemented and
leave for future investigation. We use to aggree to use interruptible
sleep but it
2023 Apr 17
2
[PATCH net-next V2 1/2] virtio-net: convert rx mode setting to use workqueue
...spin_lock_init(&vi->refill_lock);
> > > >
> > > > if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) {
> > > > @@ -4077,6 +4122,8 @@ static int virtnet_probe(struct virtio_device *vdev)
> > > > if (vi->has_rss || vi->has_rss_hash_report)
> > > > virtnet_init_default_rss(vi);
> > > >
> > > > + enable_rx_mode_work(vi);
> > > > +
> > > > /* serialize netdev register + virtio_device_ready() with ndo_open() */
> > > > rtnl_lock();
>...
2023 May 24
2
[PATCH V3 net-next 0/2] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use cond_resched() in the waiting loop. Before
doing this we need first make sure the cvq command is not executed in
atomic environment, so we need first convert rx mode handling to a
workqueue.
Please
2023 Jul 20
2
[PATCH net-next v4 0/2] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use cond_resched() in the waiting loop. Before
doing this we need first make sure the cvq command is not executed in
atomic environment, so we need first convert rx mode handling to a
workqueue.
Note that,
2023 Aug 15
1
[PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...; > if (unlikely(!skb))
> > > > return;
> > > >
> > > > - hdr = skb_vnet_hdr(skb);
> > > > + common_hdr = skb_vnet_common_hdr(skb);
> > > > if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report)
> > > > - virtio_skb_set_hash((const struct virtio_net_hdr_v1_hash *)hdr, skb);
> > > > + virtio_skb_set_hash(&common_hdr->hash_v1_hdr, skb);
> > > >
> > > > - if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID...
2023 Aug 15
1
[PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...; > if (unlikely(!skb))
> > > > return;
> > > >
> > > > - hdr = skb_vnet_hdr(skb);
> > > > + common_hdr = skb_vnet_common_hdr(skb);
> > > > if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report)
> > > > - virtio_skb_set_hash((const struct virtio_net_hdr_v1_hash *)hdr, skb);
> > > > + virtio_skb_set_hash(&common_hdr->hash_v1_hdr, skb);
> > > >
> > > > - if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID...
2022 Dec 26
4
[PATCH 0/4] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use sleep + timeout instead of busy polling.
Please review.
Thanks
Changes since RFC:
- switch to use BAD_RING in virtio_break_device()
- check virtqueue_is_broken() after being woken up
- use