From owner-svn-src-head@freebsd.org Sat Oct 14 23:25:46 2017 Return-Path: Delivered-To: svn-src-head@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 04B83E2F5A4; Sat, 14 Oct 2017 23:25:46 +0000 (UTC) (envelope-from rlibby@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 C5E4583A6A; Sat, 14 Oct 2017 23:25:45 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9ENPiHY068918; Sat, 14 Oct 2017 23:25:44 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9ENPiXG068917; Sat, 14 Oct 2017 23:25:44 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201710142325.v9ENPiXG068917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sat, 14 Oct 2017 23:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324621 - head/sys/dev/mlx4/mlx4_en X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 324621 X-SVN-Commit-Repository: base 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.23 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: Sat, 14 Oct 2017 23:25:46 -0000 Author: rlibby Date: Sat Oct 14 23:25:44 2017 New Revision: 324621 URL: https://svnweb.freebsd.org/changeset/base/324621 Log: mlx4: use enum constants instead of const vars for case exprs Follow up from r324201 to fix compilation with gcc, which complains about non-ICE case expressions. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D12675 Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c ============================================================================== --- head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Sat Oct 14 19:02:52 2017 (r324620) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c Sat Oct 14 23:25:44 2017 (r324621) @@ -558,26 +558,28 @@ mlx4_en_rx_mb(struct mlx4_en_priv *priv, struct mlx4_e static __inline int mlx4_en_rss_hash(__be16 status, int udp_rss) { - const __be16 status_all = cpu_to_be16( + enum { + status_all = cpu_to_be16( MLX4_CQE_STATUS_IPV4 | MLX4_CQE_STATUS_IPV4F | MLX4_CQE_STATUS_IPV6 | MLX4_CQE_STATUS_TCP | - MLX4_CQE_STATUS_UDP); - const __be16 status_ipv4_tcp = cpu_to_be16( + MLX4_CQE_STATUS_UDP), + status_ipv4_tcp = cpu_to_be16( MLX4_CQE_STATUS_IPV4 | - MLX4_CQE_STATUS_TCP); - const __be16 status_ipv6_tcp = cpu_to_be16( + MLX4_CQE_STATUS_TCP), + status_ipv6_tcp = cpu_to_be16( MLX4_CQE_STATUS_IPV6 | - MLX4_CQE_STATUS_TCP); - const __be16 status_ipv4_udp = cpu_to_be16( + MLX4_CQE_STATUS_TCP), + status_ipv4_udp = cpu_to_be16( MLX4_CQE_STATUS_IPV4 | - MLX4_CQE_STATUS_UDP); - const __be16 status_ipv6_udp = cpu_to_be16( + MLX4_CQE_STATUS_UDP), + status_ipv6_udp = cpu_to_be16( MLX4_CQE_STATUS_IPV6 | - MLX4_CQE_STATUS_UDP); - const __be16 status_ipv4 = cpu_to_be16(MLX4_CQE_STATUS_IPV4); - const __be16 status_ipv6 = cpu_to_be16(MLX4_CQE_STATUS_IPV6); + MLX4_CQE_STATUS_UDP), + status_ipv4 = cpu_to_be16(MLX4_CQE_STATUS_IPV4), + status_ipv6 = cpu_to_be16(MLX4_CQE_STATUS_IPV6) + }; status &= status_all; switch (status) {