]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - devlink/devlink.c
devlink: Introduce devlink port flavour virtual
[mirror_iproute2.git] / devlink / devlink.c
index f48ff6c2d0ff5d4fa21e2e047f14b393fb93bdc4..67e6e64181f96c9ccac986cff6bad3a3643173f2 100644 (file)
@@ -3066,11 +3066,13 @@ static int cmd_dev_flash(struct dl *dl)
                /* In child, just execute the flash and pass returned
                 * value through pipe once it is done.
                 */
+               int cc;
+
                close(pipe_r);
                err = _mnlg_socket_send(dl->nlg, nlh);
-               write(pipe_w, &err, sizeof(err));
+               cc = write(pipe_w, &err, sizeof(err));
                close(pipe_w);
-               exit(0);
+               exit(cc != sizeof(err));
        }
        close(pipe_w);
 
@@ -3148,6 +3150,8 @@ static const char *port_flavour_name(uint16_t flavour)
                return "pcipf";
        case DEVLINK_PORT_FLAVOUR_PCI_VF:
                return "pcivf";
+       case DEVLINK_PORT_FLAVOUR_VIRTUAL:
+               return "virtual";
        default:
                return "<unknown flavour>";
        }
@@ -6930,6 +6934,8 @@ static const char *trap_metadata_name(const struct nlattr *attr)
        switch (attr->nla_type) {
        case DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT:
                return "input_port";
+       case DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE:
+               return "flow_action_cookie";
        default:
                return "<unknown metadata type>";
        }