Roland,
This is the QLogic Virtual NIC driver patch series which has been tested
against your for-2.6.26 and for-2.6.27 branches. We intended these patches to
make it to the 2.6.26 kernel, but if it is too late for the 2.6.26 merge window
please consider them for 2.6.27.
This patch series adds the QLogic Virtual NIC (VNIC) driver which works in
conjunction with the the QLogic Ethernet Virtual I/O Controller (EVIC) hardware.
The VNIC driver along with the QLogic EVIC's two 10 Gigabit ethernet ports,
enables Infiniband clusters to connect to Ethernet networks. This driver also
works with the earlier version of the I/O Controller, the VEx.
The QLogic VNIC driver creates virtual ethernet interfaces and tunnels the
Ethernet data to/from the EVIC over Infiniband using an Infiniband reliable
connection.
The driver compiles cleanly with sparse endianness checking enabled. We have
also tested the driver with lockdep checking enabled.
We have run these patches through checkpatch.pl and the only warnings are
related to lines slightly longer than 80 columns in some of the statements.
The driver itself has has been tested with long duration iperf, netperf TCP,
UDP streams.
---
[PATCH 01/13] QLogic VNIC: Driver - netdev implementation
[PATCH 02/13] QLogic VNIC: Netpath - abstraction of connection to EVIC/VEx
[PATCH 03/13] QLogic VNIC: Implementation of communication protocol with EVIC/VEx
[PATCH 04/13] QLogic VNIC: Implementation of Control path of communication protocol
[PATCH 05/13] QLogic VNIC: Implementation of Data path of communication protocol
[PATCH 06/13] QLogic VNIC: IB core stack interaction
[PATCH 07/13] QLogic VNIC: Handling configurable parameters of the driver
[PATCH 08/13] QLogic VNIC: sysfs interface implementation for the driver
[PATCH 09/13] QLogic VNIC: IB Multicast for Ethernet broadcast/multicast
[PATCH 10/13] QLogic VNIC: Driver Statistics collection
[PATCH 11/13] QLogic VNIC: Driver ...From: Poornima Kamath <poornima.kamath@qlogic.com> This patch adds the driver utility file which mainly contains utility macros for debugging of QLogic VNIC driver. Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_util.h | 251 ++++++++++++++++++++++++++ 1 files changed, 251 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_util.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_util.h b/drivers/infiniband/ulp/qlgc_vnic/vnic_util.h new file mode 100644 index 0000000..4d7d540 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_util.h @@ -0,0 +1,251 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ...
On Wed, 30 Apr 2008 22:51:26 +0530 Many of these are already in standard macros pr_info, pr_err etc. --
From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Kconfig and Makefile for the QLogic VNIC driver. Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/Kconfig | 28 ++++++++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/Makefile | 13 +++++++++++++ 2 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/Kconfig create mode 100644 drivers/infiniband/ulp/qlgc_vnic/Makefile diff --git a/drivers/infiniband/ulp/qlgc_vnic/Kconfig b/drivers/infiniband/ulp/qlgc_vnic/Kconfig new file mode 100644 index 0000000..6a08770 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/Kconfig @@ -0,0 +1,28 @@ +config INFINIBAND_QLGC_VNIC + tristate "QLogic VNIC - Support for QLogic Ethernet Virtual I/O Controller" + depends on INFINIBAND && NETDEVICES && INET + ---help--- + Support for the QLogic Ethernet Virtual I/O Controller + (EVIC). In conjunction with the EVIC, this provides virtual + ethernet interfaces and transports ethernet packets over + InfiniBand so that you can communicate with Ethernet networks + using your IB device. + +config INFINIBAND_QLGC_VNIC_DEBUG + bool "QLogic VNIC Verbose debugging" + depends on INFINIBAND_QLGC_VNIC + default n + ---help--- + This option causes verbose debugging code to be compiled + into the QLogic VNIC driver. The output can be turned on via the + vnic_debug module parameter. + +config INFINIBAND_QLGC_VNIC_STATS + bool "QLogic VNIC Statistics" + depends on INFINIBAND_QLGC_VNIC + default n + ---help--- + This option compiles statistics collecting code into the + data path of the QLogic VNIC driver to help in profiling and fine + tuning. This adds some overhead in the interest of gathering + data. diff --git a/drivers/infiniband/ulp/qlgc_vnic/Makefile b/drivers/infiniband/ulp/qlgc_vnic/Makefile new file mode 100644 index 0000000..509dd67 --- ...
> +config INFINIBAND_QLGC_VNIC_DEBUG > + bool "QLogic VNIC Verbose debugging" > + depends on INFINIBAND_QLGC_VNIC > + default n > + ---help--- > + This option causes verbose debugging code to be compiled > + into the QLogic VNIC driver. The output can be turned on via the > + vnic_debug module parameter. If you have runtime control of this, I suggest making it default to on, like mthca does with: config INFINIBAND_MTHCA_DEBUG bool "Verbose debugging output" if EMBEDDED depends on INFINIBAND_MTHCA default y otherwise distros will leave the option off and it becomes a pain to debug problems because you force users to do compiles. --
From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> This patch modifies the toplevel Infiniband Kconfig and Makefile to include QLogic VNIC as new ULP. Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/Kconfig | 2 ++ drivers/infiniband/Makefile | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index a5dc78a..0775df5 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -53,4 +53,6 @@ source "drivers/infiniband/ulp/srp/Kconfig" source "drivers/infiniband/ulp/iser/Kconfig" +source "drivers/infiniband/ulp/qlgc_vnic/Kconfig" + endif # INFINIBAND diff --git a/drivers/infiniband/Makefile b/drivers/infiniband/Makefile index ed35e44..845271e 100644 --- a/drivers/infiniband/Makefile +++ b/drivers/infiniband/Makefile @@ -9,3 +9,4 @@ obj-$(CONFIG_INFINIBAND_NES) += hw/nes/ obj-$(CONFIG_INFINIBAND_IPOIB) += ulp/ipoib/ obj-$(CONFIG_INFINIBAND_SRP) += ulp/srp/ obj-$(CONFIG_INFINIBAND_ISER) += ulp/iser/ +obj-$(CONFIG_INFINIBAND_QLGC_VNIC) += ulp/qlgc_vnic/ --
From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> This patch implements the netpath layer of QLogic VNIC. Netpath is an abstraction of a connection to EVIC. It primarily includes the implementation which maintains the timers to monitor the status of the connection to EVIC/VEx. Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.c | 112 +++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.h | 80 ++++++++++++++++ 2 files changed, 192 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.c new file mode 100644 index 0000000..820b996 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.c @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ...
From: Usha Srinivasan <usha.srinivasan@qlogic.com> Implementation of ethernet broadcasting and multicasting for QLogic VNIC interface by making use of underlying IB multicasting. Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.c | 332 +++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.h | 76 +++++ 2 files changed, 408 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.c new file mode 100644 index 0000000..044d447 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.c @@ -0,0 +1,332 @@ +/* + * Copyright (c) 2008 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR ...
> +#define SET_MCAST_STATE_INVALID \
> +do { \
> + viport->mc_info.state = MCAST_STATE_INVALID; \
> + viport->mc_info.mc = NULL; \
> + memset(&viport->mc_info.mgid, 0, sizeof(union ib_gid)); \
> +} while (0);
Seems like this could be profitably implemented in C instead of CPP.
> + spin_lock_irqsave(&viport->mc_info.lock, flags);
> + viport->mc_info.state = MCAST_STATE_INVALID;
> + spin_unlock_irqrestore(&viport->mc_info.lock, flags);
This pattern makes me uneasy about the locking... setting the state
member will already be atomic, so what do you think you're protecting
against here by taking the lock?
- R.
--
From: Amar Mudrankit <amar.mudrankit@qlogic.com> Collection of statistics about QLogic VNIC interfaces is implemented in this patch. Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_stats.c | 234 ++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_stats.h | 497 +++++++++++++++++++++++++ 2 files changed, 731 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_stats.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_stats.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_stats.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_stats.c new file mode 100644 index 0000000..cebcc26 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_stats.c @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * ...
> +#else /*CONFIG_INIFINIBAND_VNIC_STATS*/
> +
> +static inline void vnic_connected_stats(struct vnic *vnic)
> +{
> + ;
> +}
there are an awful lot of stubs here. Do you really expect anyone to
set CONFIG_INFINIBAND_QLGC_VNIC_STATS=n?
- R.
--
Roland, Sorry, missed this comment from the first round of review. Yes, the default behavior we want is to disable the statistics collection as some of the statistics collection is in the data transfer path and hence this code can add overheads. These statistics are more for performance debugging/tuning. Regards, Ram --
From: Amar Mudrankit <amar.mudrankit@qlogic.com> The sysfs interface for the QLogic VNIC driver is implemented through this patch. Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_sys.c | 1127 +++++++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_sys.h | 62 + 2 files changed, 1189 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_sys.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_sys.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_sys.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_sys.c new file mode 100644 index 0000000..7e70b0c --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_sys.c @@ -0,0 +1,1127 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT ...
On Wed, 30 Apr 2008 22:49:55 +0530 NO 1. Most of this shouldn't be done via sysfs (rx_csum, tx_csum, ...) 2. Sysfs is one value per file not name=value --
From: Poornima Kamath <poornima.kamath@qlogic.com> This patch adds the files that handle various configurable parameters of the VNIC driver ---- configuration of virtual NIC, control, data connections to the EVIC and general IB connection parameters. Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_config.c | 380 ++++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_config.h | 242 +++++++++++++++ 2 files changed, 622 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_config.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_config.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_config.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_config.c new file mode 100644 index 0000000..86d99b6 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_config.c @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR ...
> + ib_get_cached_gid(config->ibdev, config->port, 0, > + &config->path_info.path.sgid); Again, looks like a sleepable context so please use ib_query_gid() instead. --
From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> The patch implements the interaction of the QLogic VNIC driver with the underlying core infiniband stack. Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_ib.c | 1046 ++++++++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_ib.h | 206 ++++++ 2 files changed, 1252 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_ib.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_ib.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_ib.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_ib.c new file mode 100644 index 0000000..3bf6455 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_ib.c @@ -0,0 +1,1046 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * ...
> +#include <rdma/ib_cache.h> > + ret = ib_find_cached_pkey(viport_config->ibdev, > + viport_config->port, > + be16_to_cpu(viport_config->path_info.path. > + pkey), > + &attr->pkey_index); I think this can just be replaced with ib_find_pkey()... there is a call to kmalloc(... GFP_KERNEL) just a couple of lines about, so you are in a context where sleeping is allowed. As I said before we want to get rid of the caching infrastructure so please don't add new users. --
From: Poornima Kamath <poornima.kamath@qlogic.com> Implementation of the statemachine for the protocol used while communicating with the EVIC. The patch also implements the viport abstraction which represents the virtual ethernet port on EVIC. Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_viport.c | 1233 ++++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_viport.h | 176 +++ 2 files changed, 1409 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_viport.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_viport.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_viport.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_viport.c new file mode 100644 index 0000000..e44e31b --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_viport.c @@ -0,0 +1,1233 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, ...
From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> QLogic Virtual NIC Driver. This patch implements netdev registration, netdev functions and state maintenance of the QLogic Virtual NIC corresponding to the various events associated with the QLogic Ethernet Virtual I/O Controller (EVIC/VEx) connection. Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_main.c | 1052 ++++++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_main.h | 167 ++++ 2 files changed, 1219 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_main.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_main.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_main.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_main.c new file mode 100644 index 0000000..393c79a --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_main.c @@ -0,0 +1,1052 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ...
> From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com>
>
> QLogic Virtual NIC Driver. This patch implements netdev registration,
> netdev functions and state maintenance of the QLogic Virtual NIC
> corresponding to the various events associated with the QLogic Ethernet
> Virtual I/O Controller (EVIC/VEx) connection.
>
> Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com>
> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com>
For the next submission please clean up the From and Signed-off-by
lines. As it stands now you are saying that you (Ramachandra K) are the
author of the patch, and that Poornima and Amar signed off on it (ie
forwarded it), but you as the person sending the email did not sign off
on it.
> +#include <rdma/ib_cache.h>
I would like to kill off the caching support in the IB core, so adding
new users of the API is not desirable. However your code doesn't seem
to call any functions from this header anyway, so I guess you can just
delete the include.
> +void vnic_stop_xmit(struct vnic *vnic, struct netpath *netpath)
> +{
> + VNIC_FUNCTION("vnic_stop_xmit()\n");
> + if (netpath == vnic->current_path) {
> + if (vnic->xmit_started) {
> + netif_stop_queue(vnic->netdevice);
> + vnic->xmit_started = 0;
> + }
> +
> + vnic_stop_xmit_stats(vnic);
> + }
> +}
Do you have sufficient locking here? Could vnic->current_path or
vnic->xmit_started change after they are tested, leading to bad results?
Also do you get anything from having a xmit_started flag that you
couldn't get just by testing with netif_queue_stopped()?
> + vnic = (struct vnic *)device->priv;
All this device->priv should probably be using netdev_priv() instead,
and without a cast (since a cast from void * is not needed).
> + if (jiffies > netpath->connect_time +
> + vnic->config->no_path_timeout) {
want to use time_after() for jiffies comparison to avoid problems with
jiffies wrap.
> + vnic->netdevice = alloc_netdev((int) ...Roland, Thanks for the review. Your comments make sense and we will fix the things you pointed out. Please see some clarifications in-line. I will make sure to sign off on all patches. Should I also drop the From line for the patches which I developed, since I am mailing them myself ? I am using the Signed-off-by line to indicate the people who were You are right, xmit_started might not be required and we will look at the locking This is being used as part of the driver internal statistics collection to keep track of the time elapsed between a message arriving from the EVIC indicating that it has done an RDMA write of an Ethernet packet to the driver memory and the driver giving the packet to the network stack. Will fix the variable name. Regards, Ram --
> I will make sure to sign off on all patches. Should I also drop the From line > for the patches which I developed, since I am mailing them myself ? It doesn't hurt to include a From: line if it is the same as the one for the email itself, but it isn't necessary. When I import a patch the last From: line will be used. > I am using the Signed-off-by line to indicate the people who were > involved in the development of the patches at some stage. That's fine. You can read Documentation/SubmittingPatches to see the precise legal meaning of Signed-off-by, and make sure that it applies to everyone whose signoff you are including. You can also add less formal text like "X <z@foo> helped develop this patch" in the changelog entry. > > > +extern cycles_t recv_ref; > > > > seems like too generic a name to make global. What the heck are you > > using cycle_t to keep track of anyway? > > > > This is being used as part of the driver internal statistics > collection to keep track of the time > elapsed between a message arriving from the EVIC indicating that it > has done an RDMA write of > an Ethernet packet to the driver memory and the driver giving the packet > to the network stack. cycles don't track time (eg x86 TSC might stop for a while). Do you *really* need to use cycles, or are jiffies a better replacement? - R. --
From: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> This patch implements the actual data transfer part of the communication protocol with the EVIC/VEx. RDMA of ethernet packets is implemented in here. Signed-off-by: Poornima Kamath <poornima.kamath@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_data.c | 1473 +++++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_data.h | 206 +++ drivers/infiniband/ulp/qlgc_vnic/vnic_trailer.h | 103 ++ 3 files changed, 1782 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_data.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_data.h create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_trailer.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_data.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_data.c new file mode 100644 index 0000000..599e716 --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_data.c @@ -0,0 +1,1473 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS ...
From: Poornima Kamath <poornima.kamath@qlogic.com> This patch adds the files that define the control packet formats and implements various control messages that are exchanged as part of the communication protocol with the EVIC/VEx. Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Signed-off-by: Amar Mudrankit <amar.mudrankit@qlogic.com> --- drivers/infiniband/ulp/qlgc_vnic/vnic_control.c | 2288 ++++++++++++++++++++ drivers/infiniband/ulp/qlgc_vnic/vnic_control.h | 180 ++ .../infiniband/ulp/qlgc_vnic/vnic_control_pkt.h | 368 +++ 3 files changed, 2836 insertions(+), 0 deletions(-) create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_control.c create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_control.h create mode 100644 drivers/infiniband/ulp/qlgc_vnic/vnic_control_pkt.h diff --git a/drivers/infiniband/ulp/qlgc_vnic/vnic_control.c b/drivers/infiniband/ulp/qlgc_vnic/vnic_control.c new file mode 100644 index 0000000..470f22e --- /dev/null +++ b/drivers/infiniband/ulp/qlgc_vnic/vnic_control.c @@ -0,0 +1,2288 @@ +/* + * Copyright (c) 2006 QLogic, Inc. All rights reserved. + * + * 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 from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * ...
> This is the QLogic Virtual NIC driver patch series which has been tested > against your for-2.6.26 and for-2.6.27 branches. We intended these patches to > make it to the 2.6.26 kernel, but if it is too late for the 2.6.26 merge window > please consider them for 2.6.27. Yes, *WAY* too late for 2.6.26, given that today is the last day of the merge window, and that things that get merged need to be ready before the merge window opens. > The driver compiles cleanly with sparse endianness checking enabled. We have > also tested the driver with lockdep checking enabled. > > We have run these patches through checkpatch.pl and the only warnings are > related to lines slightly longer than 80 columns in some of the statements. All good news. Will review and I hope get this into 2.6.27. - R. --
