From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] mlx4/IB: Add set_4k_mtu module parameter.
Date: Tue, 12 Jan 2010 09:05:06 -0800 [thread overview]
Message-ID: <adabpgzp83h.fsf@roland-alpha.cisco.com> (raw)
In-Reply-To: <20100112120901.GA7161@vlad-laptop> (Vladimir Sokolovsky's message of "Tue, 12 Jan 2010 14:09:02 +0200")
I'm not thrilled about this patch.
> +module_param_named(set_4k_mtu, mlx4_ib_set_4k_mtu, int, 0444);
> +MODULE_PARM_DESC(set_4k_mtu, "attempt to set 4K MTU to all ConnectX ports");
What does "attempt to set 4K MTU" mean? Try to set the MTU cap to 4K?
What happens if it fails? Is there any reason not to just let the MTU
cap be 4K all time?
Having this be a module parameter really seems like a bad idea for the
future....
> + if (mlx4_ib_set_4k_mtu)
> + ((__be32 *) mailbox->buf)[0] |= cpu_to_be32((1 << 22) |
> + (1 << 21) |
> + (5 << 12) |
> + (2 << 4));
Is there any way for this to write this with fewer unexplained magic numbers?
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-01-12 17:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 12:09 [PATCH] mlx4/IB: Add set_4k_mtu module parameter Vladimir Sokolovsky
2010-01-12 17:05 ` Roland Dreier [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=adabpgzp83h.fsf@roland-alpha.cisco.com \
--to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox