rust-dpdk
rust-dpdk copied to clipboard
DPDK 패치 보내기
trafficstars
TODO 아래 패치를 메일링 리스트로 보내기
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 774c721b3..712209637 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -593,6 +593,7 @@ rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id)
{
port_id = rte_eth_find_next(port_id);
while (port_id < RTE_MAX_ETHPORTS &&
+ rte_eth_devices[port_id].data &&
rte_eth_devices[port_id].data->owner.id != owner_id)
port_id = rte_eth_find_next(port_id + 1);
@@ -697,7 +698,8 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)
if (rte_eth_is_valid_owner_id(owner_id)) {
for (port_id = 0; port_id < RTE_MAX_ETHPORTS; port_id++)
- if (rte_eth_devices[port_id].data->owner.id == owner_id)
+ if (rte_eth_devices[port_id].data &&
+ rte_eth_devices[port_id].data->owner.id == owner_id)
memset(&rte_eth_devices[port_id].data->owner, 0,
sizeof(struct rte_eth_dev_owner));
RTE_ETHDEV_LOG(NOTICE,
Dpdk버그를 밞을줄은 몰랐는데.... 우리는 워커라운드가 있나요?
원래.. owner를 해제하고 재사용을 해야 하지만 우선은 leak 하도록 해 두었습니다 ㅠ