From: Christoph Hellwig <hch@infradead.org>
To: Roland Dreier <roland@topspin.com>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH][6/12][RFC/v1] Add IPoIB (IP-over-InfiniBand) driver
Date: Thu, 18 Nov 2004 20:00:18 +0000 [thread overview]
Message-ID: <20041118200017.GA26976@infradead.org> (raw)
In-Reply-To: <200411181046.Jj0jsF5E2KmiGN8f@topspin.com>
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ linux-bk/drivers/infiniband/ulp/ipoib/Makefile 2004-11-18 10:43:32.592783399 -0800
> @@ -0,0 +1,14 @@
> +EXTRA_CFLAGS += -Idrivers/infiniband/include
Please avoid -I statements for kernel code wherever possible. Just
put the Infiniband Kernel Internal API into $(TOPDIR)/include/infiniband/
> +obj-$(CONFIG_INFINIBAND_IPOIB) += ib_ipoib.o
> +
> +ib_ipoib-objs := \
> + ipoib_main.o \
> + ipoib_ib.o \
> + ipoib_multicast.o \
> + ipoib_verbs.o \
> + ipoib_vlan.o
> +
> +ifeq ($(CONFIG_INFINIBAND_IPOIB_DEBUG),y)
> + ib_ipoib-objs += ipoib_fs.o
> +endif
This should read more like:
ib_ipoib-y += ipoib_main.o ipoib_ib.o \
ipoib_multicast.o \
ipoib_verbs.o ipoib_vlan.o
ib_ipoib-$(CONFIG_INFINIBAND_IPOIB_DEBUG) += ipoib_fs.o
obj-$(CONFIG_INFINIBAND_IPOIB) += ib_ipoib.o
Also ib_ipoib is a rather strange name, the double ib doesn't make
much sense.
> + * This software is available to you under a choice of one of two
> + * licenses. You may choose to be licensed under the terms of the GNU
> + * General Public License (GPL) Version 2, available at
> + * <http://www.fsf.org/copyleft/gpl.html>, or the OpenIB.org BSD
> + * license, available in the LICENSE.TXT file accompanying this
> + * software. These details are also available at
> + * <http://openib.org/license.html>.
Please don't refer to licenses at urls as they can changed easily.
There's a toplevel COPYING file you can reference, and if you want
additional license bits I'd suggets to keep them simple enough to
be in the file header. Or better just stop the dual-licensing sillyness -
you'll copy code from other parts of the kernel sooner or later that
are GPL-only.
> +#define IPOIB_PATH(neigh) (*(struct ipoib_path **) ((neigh)->ha + 24))
Please make this and inline so you have proper typechecking.
(And give it a less shouting name)
>
> +
> +extern struct workqueue_struct *ipoib_workqueue;
> +
> +/* list of IPoIB network devices */
> +extern struct semaphore ipoib_device_mutex;
> +extern struct list_head ipoib_device_list;
Please try to avoid global lists. Looking at the code this is used
in two places:
(1) the debugging pseudo fs
(2) ipoib_remove_one
the latter would be much better served with a per ib_device list anyway,
and for (1) there must be a better way than the global list either.
> + pci_unmap_single(priv->ca->dma_device,
> + pci_unmap_addr(&priv->rx_ring[wr_id],
> + mapping),
> + IPOIB_BUF_SIZE,
> + PCI_DMA_FROMDEVICE);
Please don't use PCI dma calls in highlevel protocol handlers. At least
use the dma_* calls or even better restructure the code to avoid dma
mapping outside the HCA driver.
next prev parent reply other threads:[~2004-11-18 20:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200411181046.6Dz1IPtDKfpgSXN9@topspin.com>
2004-11-18 18:46 ` [PATCH][6/12][RFC/v1] Add IPoIB (IP-over-InfiniBand) driver Roland Dreier
2004-11-18 18:48 ` Roland Dreier
2004-11-18 20:00 ` Christoph Hellwig [this message]
2004-11-18 20:07 ` Roland Dreier
2004-11-22 15:14 ` Roland Dreier
2004-11-22 15:34 ` Christoph Hellwig
2004-11-22 15:37 ` Roland Dreier
2004-11-22 18:55 ` Roland Dreier
2004-11-22 20:04 ` Christoph Hellwig
2004-11-22 20:16 ` Roland Dreier
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=20041118200017.GA26976@infradead.org \
--to=hch@infradead.org \
--cc=netdev@oss.sgi.com \
--cc=roland@topspin.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;
as well as URLs for NNTP newsgroup(s).