Commit Graph

10 Commits

Author SHA1 Message Date
Andre Oppermann
1b4381afbb Restructure the mbuf pkthdr to make it fit for upcoming capabilities and
features.  The changes in particular are:

o Remove rarely used "header" pointer and replace it with a 64bit protocol/
  layer specific union PH_loc for local use.  Protocols can flexibly overlay
  their own 8 to 64 bit fields to store information while the packet is
  worked on.

o Mechanically convert IP reassembly, IGMP/MLD and ATM to use pkthdr.PH_loc
  instead of pkthdr.header.

o Extend csum_flags to 64bits to allow for additional future offload
  information to be carried (e.g. iSCSI, IPsec offload, and others).

o Move the RSS hash type enumerator from abusing m_flags to its own 8bit
  rsstype field.  Adjust accessor macros.

o Add cosqos field to store Class of Service / Quality of Service information
  with the packet.  It is not yet supported in any drivers but allows us to
  get on par with Cisco/Juniper in routing applications (plus MPLS QoS) with
  a modernized ALTQ.

o Add four 8 bit fields l[2-5]hlen to store the relative header offsets
  from the start of the packet.  This is important for various offload
  capabilities and to relieve the drivers from having to parse the packet
  and protocol headers to find out location of checksums and other
  information.  Header parsing in drivers is a lot of copy-paste and
  unhandled corner cases which we want to avoid.

o Add another flexible 64bit union to map various additional persistent
  packet information, like ether_vtag, tso_segsz and csum fields.
  Depending on the csum_flags settings some fields may have different usage
  making it very flexible and adaptable to future capabilities.

o Restructure the CSUM flags to better signify their outbound (down the
  stack) and inbound (up the stack) use.  The CSUM flags used to be a bit
  chaotic and rather poorly documented leading to incorrect use in many
  places.  Bring clarity into their use through better naming.
  Compatibility mappings are provided to preserve the API.  The drivers
  can be corrected one by one and MFC'd without issue.

o The size of pkthdr stays the same at 48/56bytes (32/64bit architectures).

Sponsored by:	The FreeBSD Foundation
2013-08-24 19:51:18 +00:00
David C Somayajulu
e09b3321fa No need to set if_mtu since it automatically updated by ether_ifattach().
Use  if_initbaudrate() to set baudrate.
Add IFCAP_LINKSTATE to if_capabilities.

Submitted by:	David C Somayajulu <davidcs@freebsd.org>
Approved by:	George Neville-Neil <gnn@freebsd.org>
2013-05-08 18:25:46 +00:00
David C Somayajulu
088fc97186 1. Updated Copyright Information
2. Added Flash Read/Update Support
3. Fixed TSO Handling

Submitted by: David C Somayajulu (davidcs@freebsd.org)
Reviewed by: George Neville-Neil (gnn@freebsd.org)
Approved by: George Neville-Neil (gnn@freebsd.org)
2013-05-07 22:58:42 +00:00
Gleb Smirnoff
c6499eccad Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.
2012-12-04 09:32:43 +00:00
Bjoern A. Zeeb
0e701bc14c Do not announce IPv6 TSO support yet. The in-tree driver does not seem
to fully handle this yet.

Reviewed by:	davidcs
MFC after:	1 week
2012-04-23 21:49:11 +00:00
Kevin Lo
5bbe0c5357 ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again
Reviewed by:	yongari
2012-01-07 09:41:57 +00:00
John Baldwin
b02a80a7c5 Update recently added drivers to use the if_*addr_r*lock() wrapper
functions instead of using the IF_ADDR_LOCK directly.  The wrapper
functions are the supported interface for device drivers.

Reviewed by:	bz, philip
MFC after:	1 week
2012-01-05 18:32:37 +00:00
Dimitry Andric
7c864d7df9 In sys/dev/qlxgb/qla_misc.c, fix a copy/paste issue. Clang complained
the variable 'val' was uninitialized when used.  Instead, 'sig' should
have been printed.

Reviewed by:	davidcs
MFC after:	1 week
2012-01-03 20:51:26 +00:00
Bjoern A. Zeeb
dcc20f4b7f The maximum TSO frame size should be:
maximum IP datagram size (65535 bytes) +
	Ethernet header size (14 bytes) +
	2 * VLAN tag size (4 bytes) [1].

[1] We need to multiply by 2 to account for the double VLAN tag
    provision added in IEEE 802.1ad.

Submitted by:	David Somayajulu (david.somayajulu qlogic.com)
MFC after:	4 days
2011-11-16 02:00:55 +00:00
Bjoern A. Zeeb
0bc7cf6fde Add QLogic 10 Gigabit Ethernet & CNA Adapter Driver version 1.30
for 3200 and 8200 series cards.

Submitted by:	David C Somayajulu (david.somayajulu@qlogic.com),
		Qlogic Corporation
MFC After:	3 days
2011-11-03 21:20:22 +00:00