aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mlx5
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2016-01-19 10:17:24 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2016-01-19 10:17:24 +0000
commit1558d49bb146956e99190fc4d4f05e30b564ee7d (patch)
treec8e47feb437d7c096b16914eec3ac7ae1e6f6aaf /sys/dev/mlx5
parent4d3b91a762484464dd59adefd7e73a57eafae578 (diff)
downloadsrc-1558d49bb146956e99190fc4d4f05e30b564ee7d.tar.gz
src-1558d49bb146956e99190fc4d4f05e30b564ee7d.zip
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
Notes
Notes: svn path=/head/; revision=294317
Diffstat (limited to 'sys/dev/mlx5')
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_rx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
index 059b5efd4245..3dfd54a7b1a6 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
@@ -100,20 +100,23 @@ mlx5e_lro_update_hdr(struct mbuf *mb, struct mlx5_cqe64 *cqe)
/* 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: