automatic DPDK test reports
 help / color / mirror / Atom feed
From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: [dpdk-test-report] |WARNING| pw97384-97386 [PATCH] [v5, 3/3] app/test: fix return value of test_kni_link_change
Date: Thu, 26 Aug 2021 12:02:21 -0400 (EDT)	[thread overview]
Message-ID: <20210826160221.7D48888E6A@noxus.dpdklab.iol.unh.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 3241 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/97384

_apply patch failure_

Submitter: Igor Ryzhov <iryzhov@nfware.com>
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

                 reply	other threads:[~2021-08-26 16:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210826160221.7D48888E6A@noxus.dpdklab.iol.unh.edu \
    --to=dpdklab@iol.unh.edu \
    --cc=dpdk-test-reports@iol.unh.edu \
    --cc=test-report@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).