Skip to content

Commit

Permalink
kni: fix logging and header including problems
Browse files Browse the repository at this point in the history
Signed-off-by: ywc689 <[email protected]>
  • Loading branch information
ywc689 committed Dec 5, 2024
1 parent 18459fc commit 7eb35f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion include/dpdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@
#include <rte_rwlock.h>
#include <rte_timer.h>
#include <rte_jhash.h>
#include <rte_kni.h>
#include <rte_ip_frag.h>
#include <rte_eth_bond.h>
#include <rte_eth_bond_8023ad.h>
#include <rte_ethdev_driver.h>
#include "mbuf.h"
#ifndef CONFIG_KNI_VIRTIO_USER
#include <rte_kni.h>
#endif
#ifdef CONFIG_DPVS_PDUMP
#include <rte_pdump.h>
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/kni.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ int kni_add_dev(struct netif_port *dev, const char *kniname)
rb = rte_ring_create(ring_name, KNI_RX_RING_ELEMS,
rte_socket_id(), RING_F_SC_DEQ);
if (unlikely(!rb)) {
RTE_LOG(ERR, KNI, "%s: failed to create kni rx ring\n", __func__);
RTE_LOG(ERR, Kni, "%s: failed to create kni rx ring\n", __func__);
#ifdef CONFIG_KNI_VIRTIO_USER
virtio_kni_free(&dev->kni.kni);
#else
Expand Down Expand Up @@ -757,13 +757,13 @@ static inline int kni_addr_flow_allowed(const struct netif_port *dev)
if (dev->type != PORT_TYPE_GENERAL
&& dev->type != PORT_TYPE_VLAN
&& dev->type != PORT_TYPE_BOND_MASTER) {
RTE_LOG(WARNING, KNI, "%s: kni addr flow only supports physical (exclusive"
RTE_LOG(WARNING, Kni, "%s: kni addr flow only supports physical (exclusive"
" of bonding slaves), vlan, and bonding master devices\n", __func__);
return EDPVS_NOTSUPP;
}

if (!check_kni_addr_flow_support(dev)) {
RTE_LOG(WARNING, KNI, "%s: %s (driver: %s) doesn't support kni address flow, steer kni "
RTE_LOG(WARNING, Kni, "%s: %s (driver: %s) doesn't support kni address flow, steer kni "
"traffic onto slave workers\n", __func__, dev->name, dev->dev_info.driver_name);
return EDPVS_NOTSUPP;
}
Expand Down Expand Up @@ -1005,7 +1005,7 @@ int kni_ctrl_init(void)

err = sockopt_register(&kni_sockopts);
if (err != EDPVS_OK) {
RTE_LOG(ERR, KNI, "%s: fail to register kni_sockopts -- %s\n",
RTE_LOG(ERR, Kni, "%s: fail to register kni_sockopts -- %s\n",
__func__, dpvs_strerror(err));
return err;
}
Expand All @@ -1022,7 +1022,7 @@ int kni_ctrl_term(void)

err = sockopt_unregister(&kni_sockopts);
if (err != EDPVS_OK) {
RTE_LOG(ERR, KNI, "%s: fail to unregister kni_sockopts -- %s\n",
RTE_LOG(ERR, Kni, "%s: fail to unregister kni_sockopts -- %s\n",
__func__, dpvs_strerror(err));
return err;
}
Expand Down

0 comments on commit 7eb35f8

Please sign in to comment.