From: Ben Hutchings <bhutchings@solarflare.com>
To: nirmu@dev.mellanox.co.il
Cc: netdev@vger.kernel.org, Nir Muchtar <nirmu@mellanox.com>
Subject: Re: [PATCH] ethtool: RX NFC - Convert ip address to big endian.
Date: Mon, 15 Aug 2011 17:00:16 +0100 [thread overview]
Message-ID: <1313424016.2731.1.camel@bwh-desktop> (raw)
In-Reply-To: <1313422846-6550-1-git-send-email-nirmu@dev.mellanox.co.il>
On Mon, 2011-08-15 at 18:40 +0300, nirmu@dev.mellanox.co.il wrote:
> From: Nir Muchtar <nirmu@dev.mellanox.co.il>
>
> Signed-off-by: Nir Muchtar <nirmu@mellanox.com>
> ---
> Unless there's a reason that I'm missing to why the user
> is expected to specify ip addresses in big endian format.
>
> rxclass.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/rxclass.c b/rxclass.c
> index b227901..98d035b 100644
> --- a/rxclass.c
> +++ b/rxclass.c
> @@ -704,7 +704,7 @@ static int rxclass_get_ulong(char *str, unsigned long long *val, int size)
> return 0;
> }
>
> -static int rxclass_get_ipv4(char *str, __be32 *val)
> +static int rxclass_get_ipv4(char *str, u32 *val)
> {
> if (!inet_pton(AF_INET, str, val))
> return -1;
[...]
inet_pton() does the conversion to big-endian format.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
prev parent reply other threads:[~2011-08-15 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 15:40 [PATCH] ethtool: RX NFC - Convert ip address to big endian nirmu
2011-08-15 16:00 ` Ben Hutchings [this message]
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=1313424016.2731.1.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=nirmu@dev.mellanox.co.il \
--cc=nirmu@mellanox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox