After restoring the remote states, the return value of ioctl() is not
checked. Therefore, users cannot know whether the remote state is
restored successfully.
This patch add log for restoring failure.
Fixes:
4810d3af8343 ("net/tap: restore state of remote device when closing")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
if (internals->remote_if_index) {
/* Restore initial remote state */
- ioctl(internals->ioctl_sock, SIOCSIFFLAGS,
+ int ret = ioctl(internals->ioctl_sock, SIOCSIFFLAGS,
&internals->remote_initial_flags);
+ if (ret)
+ TAP_LOG(ERR, "restore remote state failed: %d", ret);
+
}
rte_mempool_free(internals->gso_ctx_mp);