X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=test%2Ftest%2Ftest_kni.c;h=b956727554437acd4ec0a58aec7314a207fb1fa2;hb=e32cb57973fc311b4b5f60ae5dac37d99e48c94d;hp=309741cb353e741e4b55864075fce718427c3518;hpb=7d3b1ec47fae5b2d972e05d0ee37bb7a1731b085;p=dpdk.git diff --git a/test/test/test_kni.c b/test/test/test_kni.c index 309741cb35..b956727554 100644 --- a/test/test/test_kni.c +++ b/test/test/test_kni.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -92,7 +93,7 @@ static const struct rte_eth_conf port_conf = { .hw_ip_checksum = 0, .hw_vlan_filter = 0, .jumbo_frame = 0, - .hw_strip_crc = 0, + .hw_strip_crc = 1, }, .txmode = { .mq_mode = ETH_DCB_NONE, @@ -132,7 +133,7 @@ test_kni_lookup_mempool(void) } /* Callback for request of changing MTU */ static int -kni_change_mtu(uint8_t port_id, unsigned new_mtu) +kni_change_mtu(uint16_t port_id, unsigned int new_mtu) { printf("Change MTU of port %d to %u\n", port_id, new_mtu); kni_pkt_mtu = new_mtu; @@ -362,7 +363,7 @@ test_kni_register_handler_mp(void) } static int -test_kni_processing(uint8_t port_id, struct rte_mempool *mp) +test_kni_processing(uint16_t port_id, struct rte_mempool *mp) { int ret = 0; unsigned i; @@ -387,7 +388,7 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp) conf.core_id = 1; conf.force_bind = 1; conf.mbuf_size = MAX_PACKET_SZ; - conf.group_id = (uint16_t)port_id; + conf.group_id = port_id; ops = kni_ops; ops.port_id = port_id; @@ -472,7 +473,7 @@ static int test_kni(void) { int ret = -1; - uint8_t nb_ports, port_id; + uint16_t nb_ports, port_id; struct rte_kni *kni; struct rte_mempool *mp; struct rte_kni_conf conf; @@ -538,7 +539,7 @@ test_kni(void) rte_eth_dev_info_get(port_id, &info); conf.addr = info.pci_dev->addr; conf.id = info.pci_dev->id; - conf.group_id = (uint16_t)port_id; + conf.group_id = port_id; conf.mbuf_size = MAX_PACKET_SZ; ops = kni_ops; @@ -567,7 +568,7 @@ test_kni(void) rte_eth_dev_info_get(port_id, &info); conf.addr = info.pci_dev->addr; conf.id = info.pci_dev->id; - conf.group_id = (uint16_t)port_id; + conf.group_id = port_id; conf.mbuf_size = MAX_PACKET_SZ; ops = kni_ops;