Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions samples/net/echo_client/prj_qemu_x86.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_NETWORKING=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
Expand Down
5 changes: 3 additions & 2 deletions subsys/net/ip/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ enum net_verdict net_conn_input(enum net_ip_protocol proto, struct net_pkt *pkt)
s16_t best_rank = -1;
u16_t src_port, dst_port;
u16_t chksum;
struct net_if *pkt_iface = net_pkt_iface(pkt);

#if defined(CONFIG_NET_CONN_CACHE)
enum net_verdict verdict;
Expand Down Expand Up @@ -996,7 +997,7 @@ enum net_verdict net_conn_input(enum net_ip_protocol proto, struct net_pkt *pkt)
goto drop;
}

net_stats_update_per_proto_recv(net_pkt_iface(pkt), proto);
net_stats_update_per_proto_recv(pkt_iface, proto);

return NET_OK;
}
Expand Down Expand Up @@ -1029,7 +1030,7 @@ enum net_verdict net_conn_input(enum net_ip_protocol proto, struct net_pkt *pkt)
}

drop:
net_stats_update_per_proto_drop(net_pkt_iface(pkt), proto);
net_stats_update_per_proto_drop(pkt_iface, proto);

return NET_DROP;
}
Expand Down
4 changes: 2 additions & 2 deletions subsys/net/ip/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,10 +2041,10 @@ static enum net_verdict handle_na_input(struct net_pkt *pkt)
goto drop;
}

net_pkt_unref(pkt);

net_stats_update_ipv6_nd_sent(net_pkt_iface(pkt));

net_pkt_unref(pkt);

return NET_OK;

drop:
Expand Down
4 changes: 2 additions & 2 deletions subsys/net/ip/net_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ extern struct net_stats net_stats;

#define UPDATE_STAT_GLOBAL(cmd) (net_##cmd)
#define UPDATE_STAT(_iface, _cmd) \
{ (UPDATE_STAT_GLOBAL(_cmd)); SET_STAT(_iface->_cmd); }

{ NET_ASSERT(_iface); (UPDATE_STAT_GLOBAL(_cmd)); \
SET_STAT(_iface->_cmd); }
/* Core stats */

static inline void net_stats_update_processing_error(struct net_if *iface)
Expand Down