From owner-svn-src-stable@freebsd.org Mon Mar 26 21:04:48 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E7CBF6BB15; Mon, 26 Mar 2018 21:04:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B951E74414; Mon, 26 Mar 2018 21:04:47 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4313123C2; Mon, 26 Mar 2018 21:04:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2QL4ltO037114; Mon, 26 Mar 2018 21:04:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2QL4lA3037111; Mon, 26 Mar 2018 21:04:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201803262104.w2QL4lA3037111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Mar 2018 21:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331590 - stable/11/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 331590 X-SVN-Commit-Repository: base 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.25 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, 26 Mar 2018 21:04:48 -0000 Author: hselasky Date: Mon Mar 26 21:04:47 2018 New Revision: 331590 URL: https://svnweb.freebsd.org/changeset/base/331590 Log: MFC r330659: Avoid more LFENCE/SFENCe on x86 in mlx5en(4), by using the FreeBSD native fences. Submitted by: kib@ Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Mar 26 21:03:33 2018 (r331589) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Mar 26 21:04:47 2018 (r331590) @@ -1256,7 +1256,7 @@ mlx5e_sq_send_nops_locked(struct mlx5e_sq *sq, int can } /* send a single NOP */ mlx5e_send_nop(sq, 1); - wmb(); + atomic_thread_fence_rel(); } done: /* Check if we need to write the doorbell */ Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Mon Mar 26 21:03:33 2018 (r331589) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Mon Mar 26 21:04:47 2018 (r331590) @@ -429,7 +429,7 @@ mlx5e_poll_tx_cq(struct mlx5e_sq *sq, int budget) mlx5_cqwq_update_db_record(&sq->cq.wq); /* Ensure cq space is freed before enabling more cqes */ - wmb(); + atomic_thread_fence_rel(); sq->cc = sqcc; Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Mon Mar 26 21:03:33 2018 (r331589) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_txrx.c Mon Mar 26 21:04:47 2018 (r331590) @@ -38,7 +38,7 @@ mlx5e_get_cqe(struct mlx5e_cq *cq) return (NULL); /* ensure cqe content is read after cqe ownership bit */ - rmb(); + atomic_thread_fence_acq(); return (cqe); }