From owner-svn-src-stable@freebsd.org Thu Jan 14 16:09:11 2016 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 2678EA83CF8; Thu, 14 Jan 2016 16:09:11 +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 D53121269; Thu, 14 Jan 2016 16:09:10 +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 u0EG99dp057143; Thu, 14 Jan 2016 16:09:09 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0EG99Ro057141; Thu, 14 Jan 2016 16:09:09 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201601141609.u0EG99Ro057141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 Jan 2016 16:09:09 +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: r293998 - 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.20 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: Thu, 14 Jan 2016 16:09:11 -0000 Author: arybchik Date: Thu Jan 14 16:09:09 2016 New Revision: 293998 URL: https://svnweb.freebsd.org/changeset/base/293998 Log: MFC r293766 sfxge: remove obsolete efx_mac_hash_set() from common code This API has been replaced by efx_mac_multicast_list_set() and has no callers. Submitted by: Andy Moreton Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_mac.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Thu Jan 14 16:08:32 2016 (r293997) +++ stable/10/sys/dev/sfxge/common/efx.h Thu Jan 14 16:09:09 2016 (r293998) @@ -505,13 +505,6 @@ efx_mac_fcntl_get( __out unsigned int *fcntl_wantedp, __out unsigned int *fcntl_linkp); -#define EFX_MAC_HASH_BITS (1 << 8) - -extern __checkReturn efx_rc_t -efx_mac_hash_set( - __in efx_nic_t *enp, - __in_ecount(EFX_MAC_HASH_BITS) unsigned int const *bucket); - #if EFSYS_OPT_MAC_STATS Modified: stable/10/sys/dev/sfxge/common/efx_mac.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mac.c Thu Jan 14 16:08:32 2016 (r293997) +++ stable/10/sys/dev/sfxge/common/efx_mac.c Thu Jan 14 16:09:09 2016 (r293998) @@ -462,55 +462,6 @@ efx_mac_fcntl_get( *fcntl_wantedp = wanted; } -/* - * FIXME: efx_mac_hash_set() should be deleted once all its callers have been - * updated to use efx_mac_multicast_list_set(). - * Then efx_port_t.ep_multicst_hash could be made Falcon/Siena specific as - * well. - */ - __checkReturn efx_rc_t -efx_mac_hash_set( - __in efx_nic_t *enp, - __in_ecount(EFX_MAC_HASH_BITS) unsigned int const *bucket) -{ - efx_port_t *epp = &(enp->en_port); - efx_mac_ops_t *emop = epp->ep_emop; - efx_oword_t old_hash[2]; - unsigned int index; - efx_rc_t rc; - - EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); - EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); - - memcpy(old_hash, epp->ep_multicst_hash, sizeof (old_hash)); - - /* Set the lower 128 bits of the hash */ - EFX_ZERO_OWORD(epp->ep_multicst_hash[0]); - for (index = 0; index < 128; index++) { - if (bucket[index] != 0) - EFX_SET_OWORD_BIT(epp->ep_multicst_hash[0], index); - } - - /* Set the upper 128 bits of the hash */ - EFX_ZERO_OWORD(epp->ep_multicst_hash[1]); - for (index = 0; index < 128; index++) { - if (bucket[index + 128] != 0) - EFX_SET_OWORD_BIT(epp->ep_multicst_hash[1], index); - } - - if ((rc = emop->emo_reconfigure(enp)) != 0) - goto fail1; - - return (0); - -fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); - - memcpy(epp->ep_multicst_hash, old_hash, sizeof (old_hash)); - - return (rc); -} - __checkReturn efx_rc_t efx_mac_multicast_list_set( __in efx_nic_t *enp, @@ -912,6 +863,8 @@ fail1: #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA +#define EFX_MAC_HASH_BITS (1 << 8) + /* Compute the multicast hash as used on Falcon and Siena. */ static void falconsiena_mac_multicast_hash_compute(