Date: Thu, 14 May 2015 13:28:29 +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: r282899 - head/sys/dev/sfxge Message-ID: <201505141328.t4EDST1J025765@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Thu May 14 13:28:29 2015 New Revision: 282899 URL: https://svnweb.freebsd.org/changeset/base/282899 Log: sfxge: add local variable with Rx descriptor flags Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/sfxge_rx.c Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Thu May 14 13:27:24 2015 (r282898) +++ head/sys/dev/sfxge/sfxge_rx.c Thu May 14 13:28:29 2015 (r282899) @@ -322,23 +322,24 @@ static void sfxge_rx_deliver(struct sfxge_softc *sc, struct sfxge_rx_sw_desc *rx_desc) { struct mbuf *m = rx_desc->mbuf; + int flags = rx_desc->flags; int csum_flags; /* Convert checksum flags */ - csum_flags = (rx_desc->flags & EFX_CKSUM_IPV4) ? + csum_flags = (flags & EFX_CKSUM_IPV4) ? (CSUM_IP_CHECKED | CSUM_IP_VALID) : 0; - if (rx_desc->flags & EFX_CKSUM_TCPUDP) + if (flags & EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - if (rx_desc->flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { + if (flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); /* The hash covers a 4-tuple for TCP only */ M_HASHTYPE_SET(m, - (rx_desc->flags & EFX_PKT_IPV4) ? - ((rx_desc->flags & EFX_PKT_TCP) ? + (flags & EFX_PKT_IPV4) ? + ((flags & EFX_PKT_TCP) ? M_HASHTYPE_RSS_TCP_IPV4 : M_HASHTYPE_RSS_IPV4) : - ((rx_desc->flags & EFX_PKT_TCP) ? + ((flags & EFX_PKT_TCP) ? M_HASHTYPE_RSS_TCP_IPV6 : M_HASHTYPE_RSS_IPV6)); } m->m_data += sc->rx_prefix_size;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505141328.t4EDST1J025765>