Re: [PATCH v2 net-next 2/4] vmxnet3: add support to get/set rx flow hash

From: Ronak Doshi
Date: Thu May 28 2020 - 15:29:43 EST



On 5/28/20, 12:21 PM, "Michal Kubecek" <mkubecek@xxxxxxx> wrote:

> On Thu, May 28, 2020 at 11:36:13AM -0700, Ronak Doshi wrote:
> > With vmxnet3 version 4, the emulation supports multiqueue(RSS) for
> > UDP and ESP traffic. A guest can enable/disable RSS for UDP/ESP over
> > IPv4/IPv6 by issuing commands introduced in this patch. ESP ipv6 is
> > not yet supported in this patch.
> >
> > This patch implements get_rss_hash_opts and set_rss_hash_opts
> > methods to allow querying and configuring different Rx flow hash
> > configurations.
> >
> > Signed-off-by: Ronak Doshi <doshir@xxxxxxxxxx>
> > ---
>
> This still suffers from the inconsistency between get and set handler
> I already pointed out in v1:
>
> - there is no way to change VMXNET3_RSS_FIELDS_TCPIP{4,6} bits
> - get_rxnfc() may return value that set_rxnfc() won't accept
> - get_rxnfc() may return different value than set_rxnfc() set
>
> Above, vmxnet3_get_rss_hash_opts() returns 0 or
> RXH_L4_B_0_1 | RXH_L4_B_2_3 | RXH_IP_SRC | RXH_IP_DST for any of
> {TCP,UDP}_V{4,6}_FLOW, depending on corresponding bit in rss_fields. But
> here you accept only all four bits for TCP (both v4 and v6) and either
> the two RXH_IP_* bits or all four for UDP.
>
> Michal

Hi Michal,

That is intentional as vmxnet3 device always expects TCP rss to be enabled
if rss is supported. If RSS is enabled, by default rss_fields has TCP/IP RSS
supported and cannot be disabled. Its only for UDP/ESP flows the config
can change. Hence, get_rss always reports TCP/IP RSS enabled, and set_rss
does not accept disabling TCP RSS. Hope this answers your concern.

Thanks,
Ronak