Commit Graph

6 Commits

Author SHA1 Message Date
Ryan Stone
9f8dca7d57 Correct a typo.
X-MFC-With:	r279458
2015-03-01 02:45:46 +00:00
Ryan Stone
1905e4a3fd Add main() for iovctl and hook iovctl into build
Differential Revision:	https://reviews.freebsd.org/D87
Reviewed by:		jhb
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:41 +00:00
Ryan Stone
d9266cbaef Add functions for parsing the iovctl config file
Add two functions for parsing the iovctl config file.  The config
file is parsed using libucl[1], which accepts most YAML files and
a superset of JSON.  The first function is an ad-hoc parser that
searches the file for the PF.DEVICE configuration value.  We need
to know that value in order to fetch the schema from the kernel,
and we need the schema in order to be able to fully parse the file.

The second function parses the config file and validates it
against a schema.  This function will exit with an error message
if any validation error occurs.  If it succeeds, the configuration
is returned as an nvlist suitable for passing to the kernel.

[1] https://github.com/vstakhov/libucl

Differential Revision:	https://reviews.freebsd.org/D86
Reviewed by:		jhb
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:34 +00:00
Ryan Stone
dba9ec3462 Add iovctl functions for validating config
Add an function to iovctl that validates the configuration against
a schema.  This function is able to assume that the parser has
done most of the validation already and it's only responsible for
applying default VF values specified in the config file, confirming
that all required parameters have been set and that no invalid VF
numbers have been specified.

Differential Revision:	https://reviews.freebsd.org/D85
Reviewed by:		bcr
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:28 +00:00
Ryan Stone
b3c0355681 Add manpage documenting iovctl config file format.
Differential Revision:	https://reviews.freebsd.org/D84
Reviewed by:		emaste, bcr, wblock
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:21 +00:00
Ryan Stone
8129906902 Add a manpage for iovctl(8)
Differential Revision:	https://reviews.freebsd.org/D83
Reviewed by:		wblock
MFC after: 		1 month
Sponsored by:		Sandvine Inc.
2015-03-01 00:52:15 +00:00