Skip to content

Commit

Permalink
Fix byte order.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonkey committed Mar 29, 2018
1 parent 89993cb commit 9bbe5d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/lb_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
rte_atomic32_add(&real_srv->refcnt, 1); \
conn->real_service = real_srv; \
conn->local_ipaddr = local_addr; \
conn->conntrack_state = 0; \
conn->conntrack_flags = 0; \
} while (0)

static inline int
Expand Down Expand Up @@ -193,6 +195,9 @@ lb_connection_update_real_service(struct lb_connection_table *table,
conn->rsig, (void *)conn);
TAILQ_INSERT_TAIL(&table->conn_expire_tbl_percore[lcore_id], conn,
next);
conn->real_service = real_service;
conn->conntrack_flags = 0;
conn->conntrack_state = 0;
}
LB_VS_CONN_INC(conn->real_service->virt_service);
LB_RS_CONN_INC(conn->real_service);
Expand Down
2 changes: 1 addition & 1 deletion core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ packet_handle(struct rte_mbuf *pkt) {
l3_packet:
iph = (struct ipv4_hdr *)((char *)ethh + ETHER_HDR_LEN);
if (lb_netdev_chk_ipv4(iph->dst_addr) == IS_MYADDR ||
IS_IPV4_MCAST(iph->dst_addr)) {
IS_IPV4_MCAST(rte_be_to_cpu_32(iph->dst_addr))) {
if (lcore_event_notify(rte_get_master_lcore(), kni_packet_event_cb,
pkt) < 0) {
goto drop_packet;
Expand Down

0 comments on commit 9bbe5d8

Please sign in to comment.