Page MenuHomeFreeBSD

netmap: ixgbe: add support for jumbo frames
Needs ReviewPublic

Authored by vmaffione on Dec 1 2018, 6:16 PM.

Details

Reviewers
imp
sbruno
gnn
hrs
shurd
Group Reviewers
Intel Networking
Summary

To transmit and receive jumbo frames, it is necessary to specify packets that span
multiple hardware descriptors, and therefore multiple netmap slots. This is possible in
netmap by setting the NS_MOREFRAG flag in struct netmap_slot, for all the slots of
except for the last one.
This change adds the multi-slot (multi-descriptor) logic to the ixgbe rxsync and
txsync routines. The same logic is also used in the Linux ixgbe netmap driver.

Test Plan

Running tests with pkt-gen, with both regular and large MTU

`
  # for MTU in "1500 5000 9000"; do
  #     ifconfig ixgbe0 mtu $MTU
  #     ifconfig ixgbe1 mtu $MTU
  #     pkt-gen -i ixgbe0 -f tx -l 1400
  #     pkt-gen -i ixgbe1 -f rx # on a different terminal
  # done
`

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

vmaffione created this revision.Dec 1 2018, 6:16 PM
vmaffione updated this revision to Diff 51479.Dec 1 2018, 6:48 PM

Minor fixes.

vmaffione updated this revision to Diff 51491.Dec 2 2018, 8:42 AM

Forgot to upload updated patch.

vmaffione updated this revision to Diff 51493.Dec 2 2018, 10:27 AM

Minor fix.

vmaffione updated this revision to Diff 51494.Dec 2 2018, 11:15 AM

Add support for nm_config

shurd added a comment.Dec 5 2018, 3:16 PM

I didn't think this code was still in use... AFAIK, ixgbe uses the iflib netmap support now.

You're right. I realized that just now.

I guess I could try to modify iflib_netmap_txsync and iflib_netmap_rxsync.
This patch could still be useful for FreeBSD 11, where ixgbe does not use iflib (as far as I see from the code).

erj added a subscriber: erj.Jan 29 2019, 6:29 PM
In D18402#392608, @v.maffione_gmail.com wrote:

You're right. I realized that just now.
I guess I could try to modify iflib_netmap_txsync and iflib_netmap_rxsync.
This patch could still be useful for FreeBSD 11, where ixgbe does not use iflib (as far as I see from the code).

Yeah, ixgbe doesn't use iflib in 11.

sys/dev/netmap/ixgbe_netmap.h
476

the braces here are unnecessary