Date: Tue, 19 Jan 2016 10:17:24 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294317 - head/sys/dev/mlx5/mlx5_en Message-ID: <201601191017.u0JAHOMJ042171@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Tue Jan 19 10:17:24 2016 New Revision: 294317 URL: https://svnweb.freebsd.org/changeset/base/294317 Log: Declare local variables at top of function. Reviewed by: gnn Sponsored by: Mellanox Technologies MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D4939 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Jan 19 10:11:51 2016 (r294316) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Jan 19 10:17:24 2016 (r294317) @@ -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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601191017.u0JAHOMJ042171>