RE: [net-2.6 PATCH 7/10] Neterion: New driver: Main entry points

Previous thread: [net-2.6 PATCH 8/10] Neterion: New driver: Ethtool related by Ramkrishna Vepa on Wednesday, March 25, 2009 - 1:13 am. (1 message)

Next thread: [net-2.6 PATCH 6/10] Neterion: New driver: Traffic & alarm handler by Ramkrishna Vepa on Wednesday, March 25, 2009 - 1:13 am. (1 message)
From: Ramkrishna Vepa
Date: Wednesday, March 25, 2009 - 1:13 am

This patch implements all the driver entry point functions.
- Definition of all module loadable paramters.
- Implementation of all driver entry point functions.
- Changes from previous submission -
 - Incorporated following review comments from Ben Hutchings
	- NAPI is always enabled (no option to turn it OFF).
	- Loadable parameters
	 rx_steering_type: This loadable option is removed. 
	 ring_blocks: This loadable option is removed.
	 The driver default settings work well in most if not all cases. 
	 Another patch to configure these parameters with ethtool will be
	 released in the future.
 - LRO has been deprecated in favour of GRO - Bill Fink & Dave Miller's comment
 - Fixed sparse warnings - Reported by Andi Kleen
 - Removed unused variables 

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
---
diff -Nurp patch_6/drivers/net/vxge/vxge-main.c patch_7/drivers/net/vxge/vxge-main.c
--- patch_6/drivers/net/vxge/vxge-main.c	1969-12-31 16:00:00.000000000 -0800
+++ patch_7/drivers/net/vxge/vxge-main.c	2009-03-24 13:34:33.000000000 -0700
@@ -0,0 +1,4844 @@
+/******************************************************************************
+* This software may be used and distributed according to the terms of
+* the GNU General Public License (GPL), incorporated herein by reference.
+* Drivers based on or derived from this code fall under the GPL and must
+* retain the authorship, copyright and license notice.  This file is not
+* a complete program and may only be used when the entire operating
+* system is licensed under the GPL.
+* See the file COPYING in this distribution for more information.
+*
+* vxge-main.c: Driver for Neterion Inc's X3100 Series 10GbE PCIe I/O
+*              Virtualized Server Adapter.
+* Copyright(c) 2002-2009 Neterion Inc.
+*
+* The module loadable parameters that are supported by the driver and a brief
+* ...
From: Stephen Hemminger
Date: Wednesday, March 25, 2009 - 8:30 am

On 25 Mar 2009 00:13:33 -0800

Module parameters are a method of last resort. Module parameters are
a pain for customers because they are hard to configure, and only work
on one device driver. They should not be used if anything else is available.

Therefore the following can be replaced by existing ethtool hooks
	gro	    -> ethtool_get_gro, ethtool_set_gro
        tx/rx_pause -> ethtool_get_pauseparm, ethtool_set_pauseparm

I would like to see the following added to ethtool, go ahead and propose
some additions to ethtool that do what you need for addr_learn_en and
tx_steering_type.

Not sure what exec_mode does but why not call it 'debug'

The intr_type parameter should be unnecessary, assuming the driver does
the right thing based on bus methods.  If you are worried about buggy MSIX
hardware, then please do a simulated irq to test IRQ routing.
        
Most drivers just use the NAPI weight to control the parameter you
are setting with ring_indicate_max_pkts. The weight value is changeable
at runtime with sysfs.
--

From: Ramkrishna Vepa
Date: Wednesday, March 25, 2009 - 4:26 pm

Stephen,
[Ram] Agreed. The reason we have some of these options is due to
customer feedback who want the interface to come up on a boot with a
configuration that is different from the driver default. This may be a
feature that we could add to ethtool, by giving an option to change
[Ram] We have an ethtool option already for this parameter but needed
the configuration to persist over a boot as noted above. Do you have a
[Ram] Here's a proposal/wish list. Please let me know what you feel -

addr_len_en - enable/disable/query

tx_steering - 
	Steering options - mac + vlan id, priority, multi queue
	Configuration - enable/disable/query
Note: Ideally the same scheme needs to be used for both rx & tx but to
make this work for all nics, allow the steering option to be configured
independently for each direction.

Here is a list of other ethtool hooks required for IOV management. The
sysfs interface is ideal for the management but unfortunately is not
recommended for large amounts of data.

Get number of device mac addresses supported
Get number of device vlans supported
Get device vlan id table
Get device mac address table

Get number of virtual functions
Get virtual function stats
Get number of virtual function mac addresses
Get number of virtual function vlans
Get virtual function vlan id table
[Ram] Yes, this is a debug option. When enabled, and if an error
condition occurs, the driver will mask all interrupts, not clear the
source of the alarm and gracefully stop all io's. A diagnostic dump of
[Ram]Will do. It was left for historical reasons in the event one may
[Ram] Agreed. Will make the change.

Thanks,
Ram
--

From: Ramkrishna Vepa
Date: Wednesday, March 25, 2009 - 4:47 pm

[Ram] I should have described this option better! This option is used in
the Xen and other virtual environments to learn the mac address of the
interface on guest OS and then programme the receive steering logic to
steer the received packets to respective VF. This is to avoid having the
nic in promiscuous mode for obvious reasons.

Ram
--

Previous thread: [net-2.6 PATCH 8/10] Neterion: New driver: Ethtool related by Ramkrishna Vepa on Wednesday, March 25, 2009 - 1:13 am. (1 message)

Next thread: [net-2.6 PATCH 6/10] Neterion: New driver: Traffic & alarm handler by Ramkrishna Vepa on Wednesday, March 25, 2009 - 1:13 am. (1 message)