From: Ben Hutchings <bhutchings@solarflare.com>
To: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>, Lorandi <rafaello@br.ibm.com>
Subject: Re: [PATCH 1/1 net-2.6] Re-enable IP when MTU > 68
Date: Fri, 29 Aug 2008 16:05:08 +0100 [thread overview]
Message-ID: <20080829150506.GO7908@solarflare.com> (raw)
In-Reply-To: <48B80D6B.5030007@linux.vnet.ibm.com>
Breno Leitao wrote:
[...]
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index 91d3d96..758b4f6 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -1048,6 +1048,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
> IN_DEV_CONF_SET(in_dev, NOXFRM, 1);
> IN_DEV_CONF_SET(in_dev, NOPOLICY, 1);
> }
> + } else if (event == NETDEV_CHANGEMTU) {
> + /* Re-enabling IP */
> + if (dev->mtu > 68)
[...]
Should be >= to match the other tests. And it would really be cleaner to
use something like
static inline bool inetdev_valid_mtu(unsigned mtu)
{
return mtu >= 68;
}
rather than repeating the magic number.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2008-08-29 15:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 14:53 [PATCH 1/1 net-2.6] Re-enable IP when MTU > 68 Breno Leitao
2008-08-29 15:05 ` Ben Hutchings [this message]
2008-08-29 15:23 ` Breno Leitao
2008-08-29 20:33 ` David Miller
2008-08-30 17:57 ` Breno Leitao
2008-09-03 0:29 ` David Miller
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=20080829150506.GO7908@solarflare.com \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=leitao@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=rafaello@br.ibm.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 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.