From owner-svn-src-head@FreeBSD.ORG Thu May 14 13:28:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31E361FF; Thu, 14 May 2015 13:28:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FE201961; Thu, 14 May 2015 13:28:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EDST8O025766; Thu, 14 May 2015 13:28:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EDST1J025765; Thu, 14 May 2015 13:28:29 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505141328.t4EDST1J025765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 May 2015 13:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282899 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 13:28:30 -0000 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;