Page MenuHomeFreeBSD

iflib: Add optional RSS configuration queries
ClosedPublic

Authored by kbowling on Tue, Sep 15, 3:02 AM.
Tags
None
Referenced Files
F172590445: D59691.id186754.diff
Sat, Sep 19, 12:39 PM
F172492985: D59691.id186754.diff
Fri, Sep 18, 8:26 PM
Unknown Object (File)
Fri, Sep 18, 5:55 PM
Unknown Object (File)
Fri, Sep 18, 7:31 AM
Unknown Object (File)
Thu, Sep 17, 3:14 PM
Unknown Object (File)
Wed, Sep 16, 10:46 PM
Unknown Object (File)
Wed, Sep 16, 6:12 PM
Unknown Object (File)
Wed, Sep 16, 8:50 AM

Details

Summary
Dispatch SIOCGIFRSSKEY and SIOCGIFRSSHASH through IFDI_PRIV_IOCTL under
the context lock.  This lets drivers report their programmed RSS state
without adding an ifdi method or changing the ioctl ABI.  Drivers without
a provider return EOPNOTSUPP; keep that result quiet in the ixgbe and ice
private handlers and independent of bnxt control readiness.

In hn(4), treat unsupported queries and RSS_FUNC_NONE as normal reasons
to suppress synthetic receive hash metadata.  Keep diagnostics for other
errors and invalid configurations.  Also suppress hash metadata when
reconfiguring synthetic RSS fails, since the VF and synthetic settings
cannot then be assumed to agree.  Correct the hash-query diagnostic name.

MFC after:      2 weeks
Sponsored by:   BBOX.io

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Tue, Sep 15, 3:02 AM

This lets drivers report their programmed RSS state without adding an ifdi method or changing the ioctl ABI.

Is that the correct way to handle this? RSS state is applicable to enough network interfaces that it doesn't seem like it's appropriate to lump in the private driver ioctl handler.

sys/dev/bnxt/bnxt_en/if_bnxt.c
4501 ↗(On Diff #186754)

Why not just change the catch-all to EOPNOTSUPP?

In fact, why is this needed? All nics should be using the same key / hash since last fall, and that key is exported via sysctls..

kbowling retitled this revision from iflib: Forward optional RSS configuration queries to drivers to 1743ca1cfbe481e4c088d357709e16ae2bcb41fa.

@erj thanks that is cleaner

@gallatin I tagged you in a slew of reviews to finish the conversion. There is still relevance to this revised diff, hn wants to know that the configured key and hash settings match because packets can arrive on the synthetic interface and the vf. There is also a corner case for 82599/X540 ixv where the RSS key is PF/hypervisor owned.. the Windows PF driver provides it.

kbowling retitled this revision from 1743ca1cfbe481e4c088d357709e16ae2bcb41fa to iflib: Add optional RSS configuration queries.Fri, Sep 18, 9:38 AM