From owner-svn-src-all@freebsd.org Wed Jan 27 14:57:38 2016 Return-Path: Delivered-To: svn-src-all@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 D45D7A6FB5E; Wed, 27 Jan 2016 14:57:38 +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 A13A91F6D; Wed, 27 Jan 2016 14:57:38 +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 u0REvbtb084358; Wed, 27 Jan 2016 14:57:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0REvblF084357; Wed, 27 Jan 2016 14:57:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201601271457.u0REvblF084357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 27 Jan 2016 14:57:37 +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: r294918 - stable/10/sys/dev/mlx5/mlx5_en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 14:57:38 -0000 Author: hselasky Date: Wed Jan 27 14:57:37 2016 New Revision: 294918 URL: https://svnweb.freebsd.org/changeset/base/294918 Log: MFC r294317: Declare local variables at top of function. Sponsored by: Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D4939 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 Wed Jan 27 14:55:41 2016 (r294917) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Wed Jan 27 14:57:37 2016 (r294918) @@ -100,20 +100,23 @@ mlx5e_lro_update_hdr(struct mbuf *mb, st /* TODO: consider vlans, ip options, ... */ struct ether_header *eh; uint16_t eh_type; + uint16_t tot_len; struct ip6_hdr *ip6 = NULL; struct ip *ip4 = NULL; struct tcphdr *th; uint32_t *ts_ptr; + uint8_t l4_hdr_type; + int tcp_ack; eh = mtod(mb, struct ether_header *); eh_type = ntohs(eh->ether_type); - u8 l4_hdr_type = get_cqe_l4_hdr_type(cqe); - int tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) || + l4_hdr_type = get_cqe_l4_hdr_type(cqe); + tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) || (CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA == l4_hdr_type)); /* TODO: consider vlan */ - u16 tot_len = be32_to_cpu(cqe->byte_cnt) - ETHER_HDR_LEN; + tot_len = be32_to_cpu(cqe->byte_cnt) - ETHER_HDR_LEN; switch (eh_type) { case ETHERTYPE_IP: