Re: [PATCH v2 net-next] net: move inet_dport/inet_num in sock_common

Eric Dumazet
2012-11-28T18:20:23Z

On Wed, 2012-11-28 at 04:56 -0800, Eric Dumazet wrote:

> +#define INET_MATCH(__sk, __net, __cookie, __saddr, __daddr, __ports, __dif) \
> + ((inet_sk(__sk)->inet_portpair == (__ports)) && \
> + (inet_sk(__sk)->inet_addrpair == (__addrpair)) && \
> + (!(__sk)->sk_bound_dev_if || \
> + ((__sk)->sk_bound_dev_if == (__dif))) && \
> + net_eq(sock_net(__sk), (__net)))
> +#define INET_TW_MATCH(__sk, __net, __cookie, __saddr, __daddr, __ports, __dif)\
> + ((inet_twsk(__sk)->tw_portpair == (__ports)) && \
> + (inet_twsk(__sk)->tw_addrpair == (__addrpair)) && \
> + (!(__sk)->sk_bound_dev_if || \
> + ((__sk)->sk_bound_dev_if == (__dif))) && \
> + net_eq(sock_net(__sk), (__net)))

Last minute change in a param name __cookie / __addrpair

I reverted this change as the 32bit part is not using the 'cookie', so
keeping __the cookie name makes sense.

I'll fix this and add performance results in the changelog.