[ovs-dev] [patch_v8 3/9] dpdk: Userspace Datapath: Introduce NAT Support.

Ben Pfaff blp at ovn.org
Fri Jun 2 23:32:15 UTC 2017


On Tue, May 30, 2017 at 10:49:27AM -0700, Darrell Ball wrote:
> This patch introduces NAT support for the userspace datapath.
> Most conntrack module changes are in this patch, with the
> exception of icmp related handling and recent orig tuple
> support.
> 
> The per packet scope of lookups for NAT and un_NAT is at
> the bucket level rather than global. One hash table is
> introduced to support create/delete handling. The create/delete
> events may be further optimized, if the need becomes clear.
> 
> Some NAT options with limited utility (persistent, random) are
> not supported yet, but will be supported in a later patch.
> 
> Signed-off-by: Darrell Ball <dlu998 at gmail.com>
> Acked-by: Flavio Leitner <fbl at sysclose.org>
> Acked-by: Daniele Di Proietto <diproiettod at ovn.org>

nat_range_hash() seems to have some problems: it has multiple statements
like this:
    memcpy(&port, &conn->nat_info->min_port, sizeof port);
where the destination is a 4-byte object but the source is a 2-byte
object.  I changed 'port' from uint32_t to uint16_t, which I think
fixes the problem.

I'm continuing to review the series.


More information about the dev mailing list