From owner-svn-src-stable@freebsd.org Mon Jan 2 09:39:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08E8FC9B0EF; Mon, 2 Jan 2017 09:39:21 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D68741FAC; Mon, 2 Jan 2017 09:39:20 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v029dKbl006671; Mon, 2 Jan 2017 09:39:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v029dJYs006667; Mon, 2 Jan 2017 09:39:19 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201701020939.v029dJYs006667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 2 Jan 2017 09:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r311086 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 09:39:21 -0000 Author: arybchik Date: Mon Jan 2 09:39:19 2017 New Revision: 311086 URL: https://svnweb.freebsd.org/changeset/base/311086 Log: MFC r310756 sfxge(4): do not use enum type when values are bitmask ICC complains that enumerated type mixed with another type. Found by DPDK upstream build sanity check. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/ef10_rx.c stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_rx.c stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/ef10_rx.c Mon Jan 2 09:38:20 2017 (r311085) +++ stable/10/sys/dev/sfxge/common/ef10_rx.c Mon Jan 2 09:39:19 2017 (r311086) @@ -297,13 +297,13 @@ efx_mcdi_rss_context_set_flags( MCDI_IN_POPULATE_DWORD_4(req, RSS_CONTEXT_SET_FLAGS_IN_FLAGS, RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN, - (type & (1U << EFX_RX_HASH_IPV4)) ? 1 : 0, + (type & EFX_RX_HASH_IPV4) ? 1 : 0, RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN, - (type & (1U << EFX_RX_HASH_TCPIPV4)) ? 1 : 0, + (type & EFX_RX_HASH_TCPIPV4) ? 1 : 0, RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN, - (type & (1U << EFX_RX_HASH_IPV6)) ? 1 : 0, + (type & EFX_RX_HASH_IPV6) ? 1 : 0, RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN, - (type & (1U << EFX_RX_HASH_TCPIPV6)) ? 1 : 0); + (type & EFX_RX_HASH_TCPIPV6) ? 1 : 0); efx_mcdi_execute(enp, &req); Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Mon Jan 2 09:38:20 2017 (r311085) +++ stable/10/sys/dev/sfxge/common/efx.h Mon Jan 2 09:39:19 2017 (r311086) @@ -1867,12 +1867,12 @@ typedef enum efx_rx_hash_alg_e { EFX_RX_HASHALG_TOEPLITZ } efx_rx_hash_alg_t; -typedef enum efx_rx_hash_type_e { - EFX_RX_HASH_IPV4 = 0, - EFX_RX_HASH_TCPIPV4, - EFX_RX_HASH_IPV6, - EFX_RX_HASH_TCPIPV6, -} efx_rx_hash_type_t; +#define EFX_RX_HASH_IPV4 (1U << 0) +#define EFX_RX_HASH_TCPIPV4 (1U << 1) +#define EFX_RX_HASH_IPV6 (1U << 2) +#define EFX_RX_HASH_TCPIPV6 (1U << 3) + +typedef unsigned int efx_rx_hash_type_t; typedef enum efx_rx_hash_support_e { EFX_RX_HASH_UNAVAILABLE = 0, /* Hardware hash not inserted */ Modified: stable/10/sys/dev/sfxge/common/efx_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_rx.c Mon Jan 2 09:38:20 2017 (r311085) +++ stable/10/sys/dev/sfxge/common/efx_rx.c Mon Jan 2 09:39:19 2017 (r311086) @@ -731,12 +731,12 @@ siena_rx_scale_mode_set( case EFX_RX_HASHALG_TOEPLITZ: EFX_RX_TOEPLITZ_IPV4_HASH(enp, insert, - type & (1 << EFX_RX_HASH_IPV4), - type & (1 << EFX_RX_HASH_TCPIPV4)); + type & EFX_RX_HASH_IPV4, + type & EFX_RX_HASH_TCPIPV4); EFX_RX_TOEPLITZ_IPV6_HASH(enp, - type & (1 << EFX_RX_HASH_IPV6), - type & (1 << EFX_RX_HASH_TCPIPV6), + type & EFX_RX_HASH_IPV6, + type & EFX_RX_HASH_TCPIPV6, rc); if (rc != 0) goto fail1; Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Mon Jan 2 09:38:20 2017 (r311085) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Mon Jan 2 09:39:19 2017 (r311086) @@ -1135,8 +1135,8 @@ sfxge_rx_start(struct sfxge_softc *sc) nitems(sc->rx_indir_table))) != 0) goto fail; (void)efx_rx_scale_mode_set(sc->enp, EFX_RX_HASHALG_TOEPLITZ, - (1 << EFX_RX_HASH_IPV4) | (1 << EFX_RX_HASH_TCPIPV4) | - (1 << EFX_RX_HASH_IPV6) | (1 << EFX_RX_HASH_TCPIPV6), B_TRUE); + EFX_RX_HASH_IPV4 | EFX_RX_HASH_TCPIPV4 | + EFX_RX_HASH_IPV6 | EFX_RX_HASH_TCPIPV6, B_TRUE); if ((rc = efx_rx_scale_key_set(sc->enp, toep_key, sizeof(toep_key))) != 0)