Thread (16 messages) 16 messages, 4 authors, 2018-01-02

Re: [patch iproute2 v3 3/4] tc: Add -bs option to batch mode

flat view

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: 2017-12-27 19:56:12

On Mon, Dec 25, 2017 at 05:46:57PM +0900, Chris Mi wrote:
quoted hunk ↗ jump to hunk
@@ -267,6 +287,7 @@ int main(int argc, char **argv)
 {
 	int ret;
 	char *batch_file = NULL;
+	int batch_size = 1;
 
 	while (argc > 1) {
 		if (argv[1][0] != '-')
@@ -297,6 +318,14 @@ int main(int argc, char **argv)
 			if (argc <= 1)
 				usage();
 			batch_file = argv[1];
+		} else if (matches(argv[1], "-batchsize") == 0 ||
+				matches(argv[1], "-bs") == 0) {
+			argc--;	argv++;
+			if (argc <= 1)
+				usage();
+			batch_size = atoi(argv[1]);
+			if (batch_size > MSG_IOV_MAX)
+				batch_size = MSG_IOV_MAX;
what about
if (batch_size < 1)
	batch_size = 1;
 		} else if (matches(argv[1], "-netns") == 0) {
 			NEXT_ARG();
 			if (netns_switch(argv[1]))
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help