Re: [virtio-dev] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Heng Qi
在 2023/2/22 下午2:21, Michael S. Tsirkin 写道: On Wed, Feb 22, 2023 at 10:34:39AM +0800, Heng Qi wrote: The user will figure out how to mitigate when such QoS is not available. Either to run in best-effort mode or mitigate differently. Yes, our cloud security and cloud network team will

[virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Heng Qi
Hi, Jason. Long time no see. :) 在 2023/2/22 上午11:22, Jason Wang 写道: 在 2023/2/22 01:50, Michael S. Tsirkin 写道: On Sat, Feb 18, 2023 at 10:37:15PM +0800, Heng Qi wrote: +\subparagraph{Security risks between encapsulated packets and RSS} +There may be potential security risks when encapsulated

[virtio-dev] Re: [PATCH v6] virtio-net: support the virtqueue coalescing moderation

2023-02-21 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 04:13:06AM +, Parav Pandit wrote: > > > From: Heng Qi > > Sent: Tuesday, February 21, 2023 10:22 PM > > > +\item[VIRTIO_NET_F_VQ_NOTF_COAL(52)] Device supports virtqueue > > notification coalescing. > > + > s/notification/notifications > should be plural as multiple

Re: [virtio-dev] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 10:34:39AM +0800, Heng Qi wrote: > > The user will figure out how to mitigate when such QoS is not available. > > Either to run in best-effort mode or mitigate differently. > > Yes, our cloud security and cloud network team will configure and use inner > hash on dpdk.

[virtio-dev] RE: [PATCH v6] virtio-net: support the virtqueue coalescing moderation

2023-02-21 Thread Parav Pandit
> From: Heng Qi > Sent: Tuesday, February 21, 2023 10:22 PM > +\item[VIRTIO_NET_F_VQ_NOTF_COAL(52)] Device supports virtqueue > notification coalescing. > + s/notification/notifications should be plural as multiple notifications are coalesced like the below description of

[virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Jason Wang
在 2023/2/22 01:50, Michael S. Tsirkin 写道: On Sat, Feb 18, 2023 at 10:37:15PM +0800, Heng Qi wrote: +\subparagraph{Security risks between encapsulated packets and RSS} +There may be potential security risks when encapsulated packets using RSS to +select queues for placement. When a user inside

Re: [virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Heng Qi
在 2023/2/22 上午7:18, Michael S. Tsirkin 写道: On Tue, Feb 21, 2023 at 10:32:11PM +, Parav Pandit wrote: From: Michael S. Tsirkin Sent: Tuesday, February 21, 2023 4:46 PM What is this information driver can't observe? It sees all the packets after all, we are not stripping tunneling

[virtio-dev] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 6:18 PM > > The question of discussion was, > > Scenario: > > 1. device advertises the ability to hash on the inner packet header. > > 2. device prefers that driver enable it only when it needs to use this extra > packet parser in

[virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 10:32:11PM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Tuesday, February 21, 2023 4:46 PM > > > > What is this information driver can't observe? It sees all the packets > > after all, > > we are not stripping tunneling headers. > Just the tunnel

[virtio-dev] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 4:46 PM > > What is this information driver can't observe? It sees all the packets after > all, > we are not stripping tunneling headers. Just the tunnel type. If/when that tunnel header is stripped, it gets complicated where

[virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 09:36:06PM +, Parav Pandit wrote: > > So you are saying either live with the problem (this is best effort yes?) > Yes to best effort usage. For sure something can be done to mitigate? How about randomizing the key for example? That's in just like 1 minute of thinking.

[virtio-dev] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 4:24 PM > > On Tue, Feb 21, 2023 at 07:29:20PM +, Parav Pandit wrote: > > > > When a specific receive queue is shared to receive packets of > > > > multiple > > > tunnels, there is no quality of service for packets of multiple

[virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 07:29:20PM +, Parav Pandit wrote: > > > When a specific receive queue is shared to receive packets of multiple > > tunnels, there is no quality of service for packets of multiple tunnels. > > > > "shared to receive" is not grammatical either :) > > > "Shared by

[virtio-dev] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 12:06 PM > > On Tue, Feb 21, 2023 at 04:20:59AM +, Parav Pandit wrote: > > > > > From: Heng Qi > > > Sent: Saturday, February 18, 2023 9:37 AM > > > > > If the tunnel is used to encapsulate the packets, the hash > > >

[virtio-dev] Re: [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 05:59:52PM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Tuesday, February 21, 2023 12:52 PM > > > > On Tue, Feb 21, 2023 at 05:50:09PM +, Parav Pandit wrote: > > > > > > > > > > From: Michael S. Tsirkin > > > > Sent: Tuesday, February 21, 2023

[virtio-dev] RE: [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 12:52 PM > > On Tue, Feb 21, 2023 at 05:50:09PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Tuesday, February 21, 2023 12:42 PM > > > > > > > > What does "bits (for the driver)" mean? It made sense

RE: [virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 12:44 PM > > On Tue, Feb 21, 2023 at 05:40:51PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Tuesday, February 21, 2023 12:14 PM > > > > The part that I am missing is, how do to reuse > > > >

[virtio-dev] Re: [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 05:50:09PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Tuesday, February 21, 2023 12:42 PM > > > > > > What does "bits (for the driver)" mean? It made sense together with > > > "read-only", but I would drop "(for the driver)" as well. > > > >

[virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Sat, Feb 18, 2023 at 10:37:15PM +0800, Heng Qi wrote: > +\subparagraph{Security risks between encapsulated packets and RSS} > +There may be potential security risks when encapsulated packets using RSS to > +select queues for placement. When a user inside a tunnel tries to control the >

[virtio-dev] RE: [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 12:42 PM > > > > What does "bits (for the driver)" mean? It made sense together with > > "read-only", but I would drop "(for the driver)" as well. > > Ouch Parav are you making search and replace changes without reading the >

Re: [virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 05:40:51PM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Tuesday, February 21, 2023 12:14 PM > > > The part that I am missing is, how do to reuse virtio_net_hash_config and > > > say > > ignore all the existing fields related to rss, but only

[virtio-dev] Re: [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 04:37:16PM +0100, Cornelia Huck wrote: > On Fri, Feb 17 2023, Parav Pandit wrote: > > > Device configuration fields are read only. Avoid duplicating this > > description for multiple fields. > > > > Instead describe it one time and do it in the driver requirements > >

RE: [virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Tuesday, February 21, 2023 12:14 PM > > The part that I am missing is, how do to reuse virtio_net_hash_config and > > say > ignore all the existing fields related to rss, but only consider > hash_tunnel_types? > > Like a union? The answer is, don't. Just lay

[virtio-dev] RE: [virtio-comment] RE: [virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Heng Qi > Sent: Tuesday, February 21, 2023 12:17 PM > > 在 2023/2/22 上午12:50, Parav Pandit 写道: > >> From: Heng Qi > >> Sent: Tuesday, February 21, 2023 11:44 AM > >>> Patch-1 to introduce the feature bit, description, and link to CVQ > dependency. > >>> Patch-2 for its link in

Re: [virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 04:50:56PM +, Parav Pandit wrote: > > > From: Heng Qi > > Sent: Tuesday, February 21, 2023 11:44 AM > > > > Patch-1 to introduce the feature bit, description, and link to CVQ > > > dependency. > > > Patch-2 for its link in virtio_net_config structure and

[virtio-dev] Re: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2023 at 04:20:59AM +, Parav Pandit wrote: > > > From: Heng Qi > > Sent: Saturday, February 18, 2023 9:37 AM > > > If the tunnel is used to encapsulate the packets, the hash calculated using > > the > s/hash calculated/hash is calculated > > > outer header of the receive

RE: [virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Heng Qi > Sent: Tuesday, February 21, 2023 11:44 AM > > Patch-1 to introduce the feature bit, description, and link to CVQ > > dependency. > > Patch-2 for its link in virtio_net_config structure and description. > > Patch-3 for new command touching control VQ pieces. > > Yes, and you

[virtio-dev] Re: [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only

2023-02-21 Thread Cornelia Huck
On Fri, Feb 17 2023, Parav Pandit wrote: > Device configuration fields are read only. Avoid duplicating this > description for multiple fields. > > Instead describe it one time and do it in the driver requirements > section. > > Fixes: https://github.com/oasis-tcs/virtio-spec/issues/161 >

[virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: Heng Qi > Sent: Tuesday, February 21, 2023 8:34 AM > > Even without a queue overflow, this shared receive queue may not have a > balanced number of packets. > > For example, tunnel-2 occupied 90% of the queue and left only 10% for > tunnel-1. > > So, your example is right (and extreme),

Re: [virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Heng Qi
在 2023/2/21 下午8:47, Parav Pandit 写道: From: virtio-comm...@lists.oasis-open.org On Behalf Of Heng Qi Also, a feature bit VIRTIO_NET_F_HASH_REPORT_TUNNEL are added to report an encapsulation type, and the feature depends on VIRTIO_NET_F_HASH_REPORT. As we discussed that tunnel type alone is

[virtio-dev] Re: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Heng Qi
在 2023/2/21 下午8:47, Parav Pandit 写道: From: virtio-comm...@lists.oasis-open.org On Behalf Of Heng Qi Also, a feature bit VIRTIO_NET_F_HASH_REPORT_TUNNEL are added to report an encapsulation type, and the feature depends on VIRTIO_NET_F_HASH_REPORT. As we discussed that tunnel type alone is

[virtio-dev] RE: [PATCH v3 0/2] virtio-net: Improve dev config layout

2023-02-21 Thread Parav Pandit
> From: Parav Pandit > Sent: Friday, February 17, 2023 10:45 AM > Patch summary: > patch-1: consolidate read only field at one place in driver requirements > patch-2: define device configuration layout before describing its fields. > > changelog: > v2->v3: > - split into two patches > - move

[virtio-dev] RE: [virtio-comment] RE: [PATCH v9] virtio-net: support inner header hash

2023-02-21 Thread Parav Pandit
> From: virtio-comm...@lists.oasis-open.org open.org> On Behalf Of Heng Qi > >> Also, a feature bit VIRTIO_NET_F_HASH_REPORT_TUNNEL are added to > >> report an encapsulation type, and the feature depends on > >> VIRTIO_NET_F_HASH_REPORT. > > As we discussed that tunnel type alone is not

Re: [virtio-dev] Re: [PATCH v5] virtio-net: support the virtqueue coalescing moderation

2023-02-21 Thread Heng Qi
在 2023/2/21 下午7:48, David Edmondson 写道: On Tuesday, 2023-02-21 at 16:38:52 +08, Heng Qi wrote: ... +A device MAY set the coalescing parameter to a value close to a power of 2 value. What is this about? If it is intended to indicate that a device may use a value different to that passed by

[virtio-dev] Re: [PATCH v5] virtio-net: support the virtqueue coalescing moderation

2023-02-21 Thread David Edmondson
On Tuesday, 2023-02-21 at 16:38:52 +08, Heng Qi wrote: > ... > +A device MAY set the coalescing parameter to a value close to a power of 2 > value. What is this about? If it is intended to indicate that a device may use a value different to that passed by the driver, more text to describe that

[virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-02-21 Thread Viresh Kumar
The current model of memory mapping at the back-end works fine with Qemu, where a standard call to mmap() for the respective file descriptor, passed from front-end, is generally all we need to do before the front-end can start accessing the guest memory. There are other complex cases though,