]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r295906
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 26 Feb 2016 00:09:50 +0000 (00:09 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 26 Feb 2016 00:09:50 +0000 (00:09 +0000)
commit45f7317a0ebe5914b2aa00baa244351cb74e73d2
tree2219a2b63f08956a2eb24dd4ec8b429d5e78885e
parentfc63bfe6940295ce261608ebac2c1cb4df32e841
MFC: r295906

Fix and clean up usage of DMA and TSO segments:
- At Intel it is believed that most of their products support "only"
  40 DMA segments so lower {EM,IGB}_MAX_SCATTER accordingly. Actually,
  40 is more than plenty to handle full size TSO packets so it doesn't
  make sense to further distinguish between MAC variants that really
  can do 64 DMA segments. Moreover, capping at 40 DMA segments limits
  the stack usage of {em,igb}_xmit() that - given the rare use of more
  than these - previously hardly was justifiable, while still being
  sufficient to avoid the problems seen with em(4) and EM_MAX_SCATTER
  set to 32.
- In igb(4), pass the actually supported TSO parameters up the stack.
  Previously, the defaults set in if_attach_internal() were applied,
  i. e. a maximum of 35 TSO segments, which made supporting more than
  these in the driver pointless. However, this might explain why no
  problems were seen with IGB_MAX_SCATTER at 64.
- In em(4), take the 5 m_pullup(9) invocations performed by em_xmit()
  in the TSO case into account when reporting TSO parameters upwards.
  In the worst case, each of these calls will add another mbuf and,
  thus, the requirement for an additional DMA segment. So for best
  performance, it doesn't make sense to advertize a maximum of TSO
  segments that typically will require defragmentation in em_xmit().
  Again, this leaves enough room to handle full size TSO packets.
- Drop TSO macros from if_lem.h given that corresponding MACS don't
  support TSO in the first place.

Reviewed by: erj, sbruno, jeffrey.e.pieper_intel.com
Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/stable/10@296073 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/e1000/if_em.c
sys/dev/e1000/if_em.h
sys/dev/e1000/if_igb.c
sys/dev/e1000/if_igb.h
sys/dev/e1000/if_lem.h