Thread (25 messages) 25 messages, 3 authors, 2018-02-26

Re: [PATCH iproute2-next v3 2/8] iplink: Correctly report error when network device isn't found

flat view

From: Serhey Popovych <hidden>
Date: 2018-02-25 12:07:17

David Ahern wrote:
On 2/22/18 6:02 AM, Serhey Popovych wrote:
quoted
@@ -650,6 +658,9 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
 			bool drv = strcmp(*argv, "xdpdrv") == 0;
 			bool offload = strcmp(*argv, "xdpoffload") == 0;
 
+			if (offload)
+				has_dev(*dev, dev_index);
+
I think this is actually the wrong direction. seems to me argv should be
passed to xdp_parse rather than the generic, drv, offload bool's. That
function can then the check on which option it is and has the knowledge
about whether a device is needed or not.
Okay, I probably will prepare another change instead that accounts your
suggestions. Will add it to v4 later.
quoted
 			NEXT_ARG();
 			if (xdp_parse(&argc, &argv, req, dev_index,
 				      generic, drv, offload))
  

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help