datapath: Exit immediately on invalid arg

Return codes are used to indicate that an invalid parameter was
encountered. However, these return codes are not checked in the
main function. Mitigate this issue by exiting immediately upon
encountering an issue.

Change-Id: I40151679ccee056ac078fcfbaaf6e29ef914bb02
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Kevin Traynor <kevin.traynor@intel.com>
Reviewed-by: Mark B. Kavanagh <mark.b.kavanagh@intel.com>
datapath: Refactor ovdk_args code

Refactor the file some amount to better document the workings of
functions, and to group related functions together. Remove some
unnecessary includes.

Change-Id: I106e7efa0bcef557b707653c6c21f2d2c3e46c1a
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Kevin Traynor <kevin.traynor@intel.com>
Reviewed-by: Mark B. Kavanagh <mark.b.kavanagh@intel.com>
datapath: Improve error msg for invalid opts

The value of an option is printed when said option is invalid.
However, there are two issues with this:

* 'getopt' (and 'getopt_long') do not return the option itself
  when the option is invalid, but it was assumed that they did.
* It doesn't handle error conditions for long options in any way.

Fix both of these issues.

Change-Id: I1bc8e3cdaeac198d32329324b1a99f0f1fdf32ca
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Kevin Traynor <kevin.traynor@intel.com>
Reviewed-by: Mark B. Kavanagh <mark.b.kavanagh@intel.com>