[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170613.171337.1098962047973045223.davem@davemloft.net>
Date: Tue, 13 Jun 2017 17:13:37 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: brakmo@...com
Cc: netdev@...r.kernel.org, kernel-team@...com, bmatheny@...com,
ast@...com, daniel@...earbox.net, dsa@...ulusnetworks.com
Subject: Re: [RFC PATCH net-next 04/15] bpf: Sample bpf program to set
SYN/SYN-ACK RTOs
From: Lawrence Brakmo <brakmo@...com>
Date: Tue, 13 Jun 2017 10:59:53 -0700
> +
> + // Check for TIMEOUT_INIT operation and IPv6 addresses
> + if (op == BPF_SOCKET_OPS_TIMEOUT_INIT &&
> + skops->family == AF_INET6) {
> +
> + // If the first 5.5 bytes of the IPv6 address are the same
> + // then both hosts are in the same datacenter
> + // so use an RTO of 10ms
> + if (skops->local_ip6[0] == skops->remote_ip6[0] &&
> + (skops->local_ip6[1] & 0xfff00000) ==
> + (skops->remote_ip6[1] & 0xfff00000))
> + rv = 10;
> + }
I know this is just a sample program, but please do not use C++ comments
in C code.
Thank you.
Powered by blists - more mailing lists