Page MenuHomeFreeBSD

netmap support for ixgbe SRIOV VFs (if_ixv)
ClosedPublic

Authored by pkelsey on Jun 27 2015, 6:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 6, 9:45 AM
Unknown Object (File)
Sun, Jun 30, 7:27 AM
Unknown Object (File)
Apr 26 2024, 6:07 AM
Unknown Object (File)
Dec 23 2023, 5:30 AM
Unknown Object (File)
Dec 6 2023, 12:32 PM
Unknown Object (File)
Nov 14 2023, 11:40 AM
Unknown Object (File)
Nov 9 2023, 1:23 AM
Unknown Object (File)
Oct 13 2023, 10:43 AM
Subscribers

Details

Summary

This patch adds netmap support for ixgbe SRIOV virtual functions (that
is, to if_ixv).

The existing ixgbe_netmap.h code had to be modified to handle the
minor differences between if_ix and if_ixv:

  • ixgbe_netmap_reg now invokes the stop and init routines supplied by the adapter context. Two new members, init_locked() and stop_locked() were added to the adapter context to provide for this.
  • hardware ring head and tail pointer updates must target different registers depending on whether the adapter is a VF or PF. The existing rxr->tail and txr->tail tail pointer register indexes already hide this detail and are used. The transmit head pointer write target is selected based on IXGBE_IS_VF().
  • ixgbe_netmap_attach() is no longer static so it can be accessed by if_ixv.c.
  • CRC stripping can only be configured in the PF and not on a per-VF basis, so set_crcstrip() is not invoked for VFs. This implementation accommodates arbitrary CRC stripping configuration in the PF by having the VFs assume CRC stripping is never enabled. If in fact CRC stripping is enabled in the PF, the reported packet lengths in the VF will be four bytes longer. As CRC stripping is only ever disabled in netmap mode as a performance optimization (there is no consumer of that information), reporting a length that includes a CRC when the CRC data is not present is not believed to be harmful.

This patch requires (and includes) the relocated receive tail pointer
initialization under review in D2922.

Depends on D2922.

Test Plan

Tested on an 82599 with one to four VFs passing TCP data.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pkelsey retitled this revision from to netmap support for ixgbe SRIOV VFs (if_ixv).
pkelsey updated this object.
pkelsey edited the test plan for this revision. (Show Details)
pkelsey added reviewers: adrian, erj, rstone.
pkelsey added a parent revision: D2922: Fix ixgbe SRIOV bugs.
gnn edited edge metadata.
This revision is now accepted and ready to land.Jun 28 2015, 6:47 PM
erj edited edge metadata.

Comments inline, but it's fine as-is.

sys/dev/ixgbe/if_ixv.c
1733 ↗(On Diff #6492)

I guess since rxr-tail is now set before this point, you could change this line to use that instead of IXGBE_VFRDT?

1736 ↗(On Diff #6492)

Same comment as line 1733.

sys/dev/netmap/ixgbe_netmap.h
314 ↗(On Diff #6492)

You could try setting txr->head like how we do txr->tail, and then use that here.

sys/dev/ixgbe/if_ixv.c
1733 ↗(On Diff #6492)

That's true. It is also true for if_ix.c. I'll roll that into a cleanup patch, possibly along with some CTS flag work, to follow this one.

1736 ↗(On Diff #6492)

Same reply as line 1733.

sys/dev/netmap/ixgbe_netmap.h
314 ↗(On Diff #6492)

I'll roll that into the follow-on patch mentioned in the reply to line 1733.

This revision was automatically updated to reflect the committed changes.