Test-Label: iol-testing Test-Status: WARNING http://dpdk.org/patch/97384 _apply patch failure_ Submitter: Igor Ryzhov Date: Thursday, August 26 2021 15:19:11 Applied on: CommitID:43665e95e1277930dd43a20d879fe86ea874f3b6 Apply patch set 97384-97386 failed: Checking patch app/test/test_kni.c... Checking patch examples/kni/main.c... Checking patch kernel/linux/kni/kni_dev.h... Checking patch kernel/linux/kni/kni_misc.c... Checking patch lib/kni/rte_kni.c... error: while searching for: } int rte_kni_update_link(struct rte_kni *kni, unsigned int linkup) { char path[64]; char old_carrier[2]; const char *new_carrier; int old_linkup; int fd, ret; if (kni == NULL) return -1; snprintf(path, sizeof(path), "/sys/devices/virtual/net/%s/carrier", kni->name); fd = open(path, O_RDWR); if (fd == -1) { RTE_LOG(ERR, KNI, "Failed to open file: %s.\n", path); return -1; } ret = read(fd, old_carrier, 2); if (ret < 1) { close(fd); return -1; } old_linkup = (old_carrier[0] == '1'); new_carrier = linkup ? "1" : "0"; ret = write(fd, new_carrier, 1); if (ret < 1) { RTE_LOG(ERR, KNI, "Failed to write file: %s.\n", path); close(fd); return -1; } close(fd); return old_linkup; } void error: patch failed: lib/kni/rte_kni.c:784 Checking patch lib/kni/rte_kni.h... Checking patch lib/kni/rte_kni_common.h... Applied patch app/test/test_kni.c cleanly. Applied patch examples/kni/main.c cleanly. Applied patch kernel/linux/kni/kni_dev.h cleanly. Applied patch kernel/linux/kni/kni_misc.c cleanly. Applying patch lib/kni/rte_kni.c with 1 reject... Rejected hunk #1. Applied patch lib/kni/rte_kni.h cleanly. Applied patch lib/kni/rte_kni_common.h cleanly. diff a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c (rejected hunks) @@ -784,43 +784,25 @@ rte_kni_unregister_handlers(struct rte_kni *kni) } int -rte_kni_update_link(struct rte_kni *kni, unsigned int linkup) +rte_kni_update_link(struct rte_kni *kni, struct rte_eth_link *link) { - char path[64]; - char old_carrier[2]; - const char *new_carrier; - int old_linkup; - int fd, ret; + struct rte_kni_link_info link_info; if (kni == NULL) return -1; - snprintf(path, sizeof(path), "/sys/devices/virtual/net/%s/carrier", - kni->name); + snprintf(link_info.name, RTE_KNI_NAMESIZE, "%s", kni->name); + link_info.speed = link->link_speed; + link_info.duplex = link->link_duplex; + link_info.autoneg = link->link_autoneg; + link_info.status = link->link_status; - fd = open(path, O_RDWR); - if (fd == -1) { - RTE_LOG(ERR, KNI, "Failed to open file: %s.\n", path); + if (ioctl(kni_fd, RTE_KNI_IOCTL_LINK, &link_info) < 0) { + RTE_LOG(ERR, KNI, "Fail to update KNI link\n"); return -1; } - ret = read(fd, old_carrier, 2); - if (ret < 1) { - close(fd); - return -1; - } - old_linkup = (old_carrier[0] == '1'); - - new_carrier = linkup ? "1" : "0"; - ret = write(fd, new_carrier, 1); - if (ret < 1) { - RTE_LOG(ERR, KNI, "Failed to write file: %s.\n", path); - close(fd); - return -1; - } - - close(fd); - return old_linkup; + return 0; } void Checking patch app/test/test_kni.c... error: app/test/test_kni.c: does not match index https://lab.dpdk.org/results/dashboard/patchsets/18363/ UNH-IOL DPDK Community Lab