summaryrefslogtreecommitdiff
path: root/drivers/net/softnic/parser.c
diff options
context:
space:
mode:
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-07-25 18:10:03 +0100
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-07-25 19:27:34 +0200
commit552e3f72d49ec91d0cec250cb392b23aaf3757c1 (patch)
tree97fb154349eba4a9605452d8cde137fc87d28bd7 /drivers/net/softnic/parser.c
parentc73369e6d19af0696f8af7846ff42e3173d6f724 (diff)
downloaddpdk-552e3f72d49ec91d0cec250cb392b23aaf3757c1.zip
dpdk-552e3f72d49ec91d0cec250cb392b23aaf3757c1.tar.gz
dpdk-552e3f72d49ec91d0cec250cb392b23aaf3757c1.tar.xz
net/softnic: add command for tmgr shaper profile
Add support to create Traffic Manager (TMGR) shaper profile through firmware CLI script. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Diffstat (limited to 'drivers/net/softnic/parser.c')
-rw-r--r--drivers/net/softnic/parser.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/softnic/parser.c b/drivers/net/softnic/parser.c
index 7087b87..a8688a2 100644
--- a/drivers/net/softnic/parser.c
+++ b/drivers/net/softnic/parser.c
@@ -93,6 +93,24 @@ softnic_parser_read_arg_bool(const char *p)
}
int
+softnic_parser_read_int32(int32_t *value, const char *p)
+{
+ char *next;
+ int32_t val;
+
+ p = skip_white_spaces(p);
+ if (!isdigit(*p))
+ return -EINVAL;
+
+ val = strtol(p, &next, 10);
+ if (p == next)
+ return -EINVAL;
+
+ *value = val;
+ return 0;
+}
+
+int
softnic_parser_read_uint64(uint64_t *value, const char *p)
{
char *next;