From: David Ahern <dsa@cumulusnetworks.com>
To: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 4/5] net: Refactor inetpeer address struct
Date: Thu, 27 Aug 2015 15:52:39 -0700 [thread overview]
Message-ID: <55DF94B7.5000605@cumulusnetworks.com> (raw)
In-Reply-To: <1440710193-4824-5-git-send-email-dsa@cumulusnetworks.com>
On 8/27/15 2:16 PM, David Ahern wrote:
> @@ -124,12 +122,12 @@ static inline struct inet_peer *inet_getpeer_v6(struct inet_peer_base *base,
> static inline int inetpeer_addr_cmp(const struct inetpeer_addr *a,
> const struct inetpeer_addr *b)
> {
> - int i, n = (a->family == AF_INET ? 1 : 4);
> + int i, n = (a->family == AF_INET ? sizeof(a->a4) : sizeof(a->a6));
Forgot the / by sizeof(u32) (key size) in this version of the patches.
v2 coming.
>
> for (i = 0; i < n; i++) {
> - if (a->addr.a6[i] == b->addr.a6[i])
> + if (a->key[i] == b->key[i])
> continue;
> - if ((__force u32)a->addr.a6[i] < (__force u32)b->addr.a6[i])
> + if (a->key[i] < b->key[i])
> return -1;
> return 1;
> }
>
next prev parent reply other threads:[~2015-08-27 22:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 21:16 [PATCH net-next 0/5] net: Refactor inetpeer cache and add support for VRFs David Ahern
2015-08-27 21:16 ` [PATCH net-next 1/5] net: Introduce ipv4_addr_hash and use it for tcp metrics David Ahern
2015-08-27 21:16 ` [PATCH net-next 2/5] net: Add set,get helpers for inetpeer addresses David Ahern
2015-08-27 21:16 ` [PATCH net-next 3/5] net: Add helper function to compare " David Ahern
2015-08-28 14:03 ` David Laight
2015-08-27 21:16 ` [PATCH net-next 4/5] net: Refactor inetpeer address struct David Ahern
2015-08-27 22:52 ` David Ahern [this message]
2015-08-27 21:16 ` [PATCH net-next 5/5] net: Add support for VRFs to inetpeer cache David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55DF94B7.5000605@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.