[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4e481399-fc1a-4190-54eb-5364ea210792@mellanox.com>
Date: Tue, 2 Jan 2018 22:19:08 +0800
From: Chris Mi <chrism@...lanox.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Cc: netdev@...r.kernel.org, gerlitz.or@...il.com,
stephen@...workplumber.org, dsahern@...il.com
Subject: Re: [patch iproute2 v3 3/4] tc: Add -bs option to batch mode
> On Mon, Dec 25, 2017 at 05:46:57PM +0900, Chris Mi wrote:
>> @@ -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;
Done.
>
>> } else if (matches(argv[1], "-netns") == 0) {
>> NEXT_ARG();
>> if (netns_switch(argv[1]))
Powered by blists - more mailing lists