From owner-svn-src-head@freebsd.org Tue Nov 7 13:26:13 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 21A41E58B87; Tue, 7 Nov 2017 13:26:13 +0000 (UTC) (envelope-from mw@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 E25ED657DC; Tue, 7 Nov 2017 13:26:12 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA7DQBCa091349; Tue, 7 Nov 2017 13:26:11 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA7DQBJZ091348; Tue, 7 Nov 2017 13:26:11 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201711071326.vA7DQBJZ091348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 7 Nov 2017 13:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325512 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 325512 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: Tue, 07 Nov 2017 13:26:13 -0000 Author: mw Date: Tue Nov 7 13:26:11 2017 New Revision: 325512 URL: https://svnweb.freebsd.org/changeset/base/325512 Log: Change function validate_tx_req_id() to inline in ENA driver The function is in hot path of the driver (TX) and asking compiler for making this function inline was changed for consistency and higher readability. Submitted by: Michal Krawczyk Reviewed by: rlibby, byenduri_gmail.com Obtained from: Semihalf Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D12854 Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Tue Nov 7 13:20:41 2017 (r325511) +++ head/sys/dev/ena/ena.c Tue Nov 7 13:26:11 2017 (r325512) @@ -122,7 +122,7 @@ static void ena_destroy_all_io_queues(struct ena_adapt static int ena_create_io_queues(struct ena_adapter *); static int ena_tx_cleanup(struct ena_ring *); static int ena_rx_cleanup(struct ena_ring *); -static int validate_tx_req_id(struct ena_ring *, uint16_t); +static inline int validate_tx_req_id(struct ena_ring *, uint16_t); static void ena_rx_hash_mbuf(struct ena_ring *, struct ena_com_rx_ctx *, struct mbuf *); static struct mbuf* ena_rx_mbuf(struct ena_ring *, struct ena_com_rx_buf_info *, @@ -1165,7 +1165,7 @@ ena_destroy_all_io_queues(struct ena_adapter *adapter) ena_destroy_all_rx_queues(adapter); } -static int +static inline int validate_tx_req_id(struct ena_ring *tx_ring, uint16_t req_id) { struct ena_tx_buffer *tx_info = NULL;