Skip to content

Commit

Permalink
tc: fix compile problem in debug and old dpdk versions reported by ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ywc689 committed Mar 19, 2021
1 parent f1645e5 commit a7eac97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,7 @@ static int netif_deliver_mbuf(struct netif_port *dev, lcoreid_t cid,
*/
if (dev->flag & NETIF_PORT_FLAG_FORWARD2KNI) {
struct rte_mbuf *mbuf_copied = mbuf_copy(mbuf, pktmbuf_pool[dev->socket]);
if (likely(mbuf_copied))
if (likely(mbuf_copied != NULL))
kni_ingress(mbuf_copied, dev);
else
RTE_LOG(WARNING, NETIF, "%s: failed to copy mbuf for kni\n", __func__);
Expand Down
4 changes: 2 additions & 2 deletions src/tc/cls_match.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ static int match_classify(struct tc_cls *cls, struct rte_mbuf *mbuf,
char cls_id[16], qsch_id[16];

if (ip6h) {
inet_ntop(AF_INET6, &ip6h->saddr, sip, sizeof(sip));
inet_ntop(AF_INET6, &ip6h->daddr, dip, sizeof(dip));
inet_ntop(AF_INET6, &ip6h->ip6_src, sip, sizeof(sip));
inet_ntop(AF_INET6, &ip6h->ip6_dst, dip, sizeof(dip));
} else {
inet_ntop(AF_INET, &iph->saddr, sip, sizeof(sip));
inet_ntop(AF_INET, &iph->daddr, dip, sizeof(dip));
Expand Down

0 comments on commit a7eac97

Please sign in to comment.