Date: Wed, 8 Jun 2016 13:14:52 +0000 (UTC) From: Andrew Rybchenko <arybchik@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301607 - head/sys/dev/sfxge Message-ID: <201606081314.u58DEqIm032408@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Wed Jun 8 13:14:52 2016 New Revision: 301607 URL: https://svnweb.freebsd.org/changeset/base/301607 Log: sfxge(4): host byte order is required for IP ID in TSO descriptors Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Wed Jun 8 12:46:54 2016 (r301606) +++ head/sys/dev/sfxge/sfxge_tx.c Wed Jun 8 13:14:52 2016 (r301607) @@ -992,7 +992,7 @@ static void tso_start(struct sfxge_txq * tso->protocol = TSO_MBUF_PROTO(mbuf); tso->nh_off = mbuf->m_pkthdr.l2hlen; tso->tcph_off = mbuf->m_pkthdr.l3hlen; - tso->packet_id = TSO_MBUF_PACKETID(mbuf); + tso->packet_id = ntohs(TSO_MBUF_PACKETID(mbuf)); #endif #if !SFXGE_TX_PARSE_EARLY @@ -1001,7 +1001,7 @@ static void tso_start(struct sfxge_txq * KASSERT(tso_iph(tso)->ip_p == IPPROTO_TCP, ("TSO required on non-TCP packet")); tso->tcph_off = tso->nh_off + 4 * tso_iph(tso)->ip_hl; - tso->packet_id = tso_iph(tso)->ip_id; + tso->packet_id = ntohs(tso_iph(tso)->ip_id); } else { KASSERT(tso->protocol == htons(ETHERTYPE_IPV6), ("TSO required on non-IP packet"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606081314.u58DEqIm032408>