lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Jan 2018 23:19:04 -0800
From:   Martin KaFai Lau <kafai@...com>
To:     John Fastabend <john.fastabend@...il.com>
CC:     <borkmann@...earbox.net>, <ast@...nel.org>,
        <netdev@...r.kernel.org>
Subject: Re: [bpf-next PATCH v3 1/7] bpf: refactor sockmap sample program
 update for arg parsing

On Thu, Jan 11, 2018 at 09:06:17PM -0800, John Fastabend wrote:
> sockmap sample program takes arguments from cmd line but it reads them
> in using offsets into the array. Because we want to add more arguments
> in the future lets do proper argument handling.
> 
> Also refactor code to pull apart sock init and ping/pong test. This
> allows us to add new tests in the future.
> 
> Signed-off-by: John Fastabend <john.fastabend@...il.com>
One nit below.

Acked-by: Martin KaFai Lau <kafai@...com>

> ---
[ ... ]
> @@ -280,12 +333,21 @@ int main(int argc, char **argv)
>  		return err;
>  	}
>  
> -	err = sockmap_test_sockets(rate, dot);
> +	err = sockmap_init_sockets();
>  	if (err) {
>  		fprintf(stderr, "ERROR: test socket failed: %d\n", err);
> -		return err;
> +		goto out;
>  	}
> -	return 0;
> +
> +	err = forever_ping_pong(rate, verbose);
> +out:
> +	close(s1);
> +	close(s2);
> +	close(p1);
> +	close(p2);
> +	close(c1);
> +	close(c2);
close(cg_fd);

> +	return err;
>  }
>  
>  void running_handler(int a)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ