]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: ignore error in configuring SR-IOV VFs
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 28 Apr 2025 01:59:16 +0000 (10:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 30 Apr 2025 06:47:19 +0000 (15:47 +0900)
The configuration can easily fail when the target virtual function
does not exist, and there is nothing networkd can do in such case.
Also, it is overkill to make the physical interface entered to the
failed state in such case. Let's warn but ignore the failure.

src/network/networkd-sriov.c

index 78d8cefe7cf6801937e798d25aa51b216251a00a..b1a5830d45f8148c291a274a6950eb8aa573f9b3 100644 (file)
@@ -16,11 +16,8 @@ static int sr_iov_handler(sd_netlink *rtnl, sd_netlink_message *m, Request *req,
         assert(link);
 
         r = sd_netlink_message_get_errno(m);
-        if (r < 0 && r != -EEXIST) {
-                log_link_message_error_errno(link, m, r, "Could not set up SR-IOV");
-                link_enter_failed(link);
-                return 1;
-        }
+        if (r < 0)
+                log_link_message_warning_errno(link, m, r, "Failed to set up SR-IOV virtual function, ignoring");
 
         if (link->sr_iov_messages == 0) {
                 log_link_debug(link, "SR-IOV configured");