summaryrefslogtreecommitdiffstats
path: root/sys/dev/qlxgb
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2013-08-24 19:51:18 +0000
committerandre <andre@FreeBSD.org>2013-08-24 19:51:18 +0000
commite3737c33e77ed583376ee2f2b90d7f232650d182 (patch)
tree800974ecd8993a32d93e99d748ceee7bdcc92f2b /sys/dev/qlxgb
parent79d40bcf2d33796830bd39a0791e82ba2fc2b42c (diff)
downloadFreeBSD-src-e3737c33e77ed583376ee2f2b90d7f232650d182.zip
FreeBSD-src-e3737c33e77ed583376ee2f2b90d7f232650d182.tar.gz
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
Diffstat (limited to 'sys/dev/qlxgb')
-rw-r--r--sys/dev/qlxgb/qla_hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/qlxgb/qla_hw.c b/sys/dev/qlxgb/qla_hw.c
index c866cf5..ea20b63 100644
--- a/sys/dev/qlxgb/qla_hw.c
+++ b/sys/dev/qlxgb/qla_hw.c
@@ -1000,9 +1000,9 @@ qla_hw_send(qla_host_t *ha, bus_dma_segment_t *segs, int nsegs,
(mp->m_pkthdr.len > ha->max_frame_size)){
/* TBD: copy into private buffer and send it */
device_printf(dev,
- "%s: (nsegs[%d, %d, 0x%x] > Q8_TX_MAX_SEGMENTS)\n",
+ "%s: (nsegs[%d, %d, 0x%b] > Q8_TX_MAX_SEGMENTS)\n",
__func__, nsegs, mp->m_pkthdr.len,
- mp->m_pkthdr.csum_flags);
+ (int)mp->m_pkthdr.csum_flags, CSUM_BITS);
qla_dump_buf8(ha, "qla_hw_send: wrong pkt",
mtod(mp, char *), mp->m_len);
return (EINVAL);
OpenPOWER on IntegriCloud