lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+sq2Cdjn1n5WF4=JMahTcWSPaKiVB4kP9st1X7fFWJMTHX9TA@mail.gmail.com>
Date:   Tue, 14 Jan 2020 15:59:00 +0530
From:   Sunil Kovvuri <sunil.kovvuri@...il.com>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     Linux Netdev List <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kubakici@...pl>,
        Sunil Goutham <sgoutham@...vell.com>,
        Prakash Brahmajyosyula <bprakash@...vell.com>
Subject: Re: [PATCH v2 15/17] octeontx2-pf: ethtool RSS config support

On Tue, Jan 14, 2020 at 3:49 PM Michal Kubecek <mkubecek@...e.cz> wrote:
>
> On Tue, Jan 14, 2020 at 12:32:18PM +0530, sunil.kovvuri@...il.com wrote:
> > From: Sunil Goutham <sgoutham@...vell.com>
> >
> > Added support to show or configure RSS hash key, indirection table,
> > 2,4 tuple via ethtool. Also added debug msg_level support
> > to dump messages when HW reports errors in packet received
> > or transmitted.
> >
> > Signed-off-by: Prakash Brahmajyosyula <bprakash@...vell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
> > ---
> [...]
> > +static int otx2_set_rss_hash_opts(struct otx2_nic *pfvf,
> > +                               struct ethtool_rxnfc *nfc)
> > +{
> > +     struct otx2_rss_info *rss = &pfvf->hw.rss_info;
> > +     u32 rxh_l4 = RXH_L4_B_0_1 | RXH_L4_B_2_3;
> > +     u32 rss_cfg = rss->flowkey_cfg;
> > +
> > +     if (!rss->enable)
> > +             netdev_err(pfvf->netdev, "RSS is disabled, cmd ignored\n");
> > +
> > +     /* Mimimum is IPv4 and IPv6, SIP/DIP */
> > +     if (!(nfc->data & RXH_IP_SRC) || !(nfc->data & RXH_IP_DST))
> > +             return -EINVAL;
> > +
> > +     switch (nfc->flow_type) {
> > +     case TCP_V4_FLOW:
> > +     case TCP_V6_FLOW:
> > +             /* Different config for v4 and v6 is not supported.
> > +              * Both of them have to be either 4-tuple or 2-tuple.
> > +              */
> > +             if ((nfc->data & rxh_l4) == rxh_l4)
> > +                     rss_cfg |= NIX_FLOW_KEY_TYPE_TCP;
> > +             else
> > +                     rss_cfg &= ~NIX_FLOW_KEY_TYPE_TCP;
> > +             break;
>
> IMHO it would be cleaner to reject requests with only one bit set than
> to silently clear the bit (same for UDP and SCTP). You also shouldn't
> silently ignore unsupported bits.
>
> Michal Kubecek
>

Okay, will check this.

Thanks,
Sunil.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ