]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - devlink/devlink.c
replace SNAPSHOT with auto-generated version string
[mirror_iproute2.git] / devlink / devlink.c
index ce2e46766617cd2fc62b7160c47af4d54d9624cc..0982faef7d88eef07e1d2ff79035a492d62d7662 100644 (file)
@@ -34,7 +34,7 @@
 #include <sys/socket.h>
 #include <sys/types.h>
 
-#include "SNAPSHOT.h"
+#include "version.h"
 #include "list.h"
 #include "mnlg.h"
 #include "json_print.h"
@@ -1156,6 +1156,8 @@ static int trap_action_get(const char *actionstr,
                *p_action = DEVLINK_TRAP_ACTION_DROP;
        } else if (strcmp(actionstr, "trap") == 0) {
                *p_action = DEVLINK_TRAP_ACTION_TRAP;
+       } else if (strcmp(actionstr, "mirror") == 0) {
+               *p_action = DEVLINK_TRAP_ACTION_MIRROR;
        } else {
                pr_err("Unknown trap action \"%s\"\n", actionstr);
                return -EINVAL;
@@ -2356,6 +2358,11 @@ static const struct param_val_conv param_val_conv[] = {
                .vstr = "flash",
                .vuint = DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
        },
+       {
+               .name = "fw_load_policy",
+               .vstr = "disk",
+               .vuint = DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK,
+       },
        {
                .name = "reset_dev_on_drv_probe",
                .vstr = "unknown",
@@ -7080,6 +7087,8 @@ static const char *trap_type_name(uint8_t type)
                return "drop";
        case DEVLINK_TRAP_TYPE_EXCEPTION:
                return "exception";
+       case DEVLINK_TRAP_TYPE_CONTROL:
+               return "control";
        default:
                return "<unknown type>";
        }
@@ -7092,6 +7101,8 @@ static const char *trap_action_name(uint8_t action)
                return "drop";
        case DEVLINK_TRAP_ACTION_TRAP:
                return "trap";
+       case DEVLINK_TRAP_ACTION_MIRROR:
+               return "mirror";
        default:
                return "<unknown action>";
        }
@@ -7166,9 +7177,9 @@ static int cmd_trap_show_cb(const struct nlmsghdr *nlh, void *data)
 
 static void cmd_trap_help(void)
 {
-       pr_err("Usage: devlink trap set DEV trap TRAP [ action { trap | drop } ]\n");
+       pr_err("Usage: devlink trap set DEV trap TRAP [ action { trap | drop | mirror } ]\n");
        pr_err("       devlink trap show [ DEV trap TRAP ]\n");
-       pr_err("       devlink trap group set DEV group GROUP [ action { trap | drop } ]\n");
+       pr_err("       devlink trap group set DEV group GROUP [ action { trap | drop | mirror } ]\n");
        pr_err("                              [ policer POLICER ] [ nopolicer ]\n");
        pr_err("       devlink trap group show [ DEV group GROUP ]\n");
        pr_err("       devlink trap policer set DEV policer POLICER [ rate RATE ] [ burst BURST ]\n");
@@ -7595,7 +7606,7 @@ int main(int argc, char **argv)
 
                switch (opt) {
                case 'V':
-                       printf("devlink utility, iproute2-ss%s\n", SNAPSHOT);
+                       printf("devlink utility, iproute2-%s\n", version);
                        ret = EXIT_SUCCESS;
                        goto dl_free;
                case 'f':