From owner-svn-src-stable-10@freebsd.org Tue Aug 15 12:54:20 2017 Return-Path: Delivered-To: svn-src-stable-10@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 7DF76DD240D; Tue, 15 Aug 2017 12:54:20 +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 mx1.freebsd.org (Postfix) with ESMTPS id 3CB446E8A5; Tue, 15 Aug 2017 12:54:20 +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 v7FCsJUY047462; Tue, 15 Aug 2017 12:54:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7FCsJns047461; Tue, 15 Aug 2017 12:54:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708151254.v7FCsJns047461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 15 Aug 2017 12:54: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: r322538 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 322538 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-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2017 12:54:20 -0000 Author: hselasky Date: Tue Aug 15 12:54:19 2017 New Revision: 322538 URL: https://svnweb.freebsd.org/changeset/base/322538 Log: MFC r322251: Make sure the received IP header gets 32-bit aligned for short packets in the mlx5en(4) driver. Approved by: re (kib) Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Aug 15 12:30:11 2017 (r322537) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Aug 15 12:54:19 2017 (r322538) @@ -358,9 +358,11 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget) rq->stats.wqe_err++; goto wq_ll_pop; } - - if (MHLEN >= byte_cnt && + if ((MHLEN - MLX5E_NET_IP_ALIGN) >= byte_cnt && (mb = m_gethdr(M_NOWAIT, MT_DATA)) != NULL) { + /* get IP header aligned */ + mb->m_data += MLX5E_NET_IP_ALIGN; + bcopy(rq->mbuf[wqe_counter].data, mtod(mb, caddr_t), byte_cnt); } else {