Accelerated network drivers
Subsystems (3)
cover Accelerated network drivers
This patch set provides the standard net driver and accelerated network driver plug-ins for Solarflare range of 10G network cards. The accelerated network plug-ins make use of the modifications contributed to netfront and netback last year.
The four patches are as follows:
Patch 1: standard Linux net driver (provides module "sfc") Patch 2: resource manager driver (provides module "sfc_resource") Patch 3: netfront plug-in module (provides module "sfc_netfront" and "sfc_netutil")
Patch 4: netback plug-in module (provides module "sfc_netback")
Thanks,
Kieran
Quoted 4 lines · Kieran Mansley
This patch set provides the standard net driver and accelerated network driver plug-ins for Solarflare range of 10G network cards. The accelerated network plug-ins make use of the modifications contributed to netfront and netback last year.
Patches 1 and 2 haven't materialised. Are they very large?
-- Keir
Quoted 8 lines · Keir Fraser
Quoted 4 lines · Kieran Mansley
This patch set provides the standard net driver and accelerated network driver plug-ins for Solarflare range of 10G network cards. The accelerated network plug-ins make use of the modifications contributed to netfront and netback last year.
Patches 1 and 2 haven't materialised. Are they very large?
Yes, I'd assumed they're queued for list moderator approval.
Kieran
Quoted 5 lines · Kieran Mansley
This patch set provides the standard net driver and accelerated network driver plug-ins for Solarflare range of 10G network cards. The accelerated network plug-ins make use of the modifications contributed to netfront and netback last year.
Quoted 7 lines
The four patches are as follows:
Patch 1: standard Linux net driver (provides module "sfc") Patch 2: resource manager driver (provides module "
sfc_resource") Patch 3: netfront plug-in module (provides module "sfc_netfront" and "sfc_netutil")
Patch 4: netback plug-in module (provides module "sfc_netback")
As the first two patches haven't made it to the list (probably above the mailing list's configured attachment size) I've put a tar of all four patches up here:
https://support.solarflare.com/xen/sfc_patches.tar.gz
https://support.solarflare.com/xen/MD5SUMS
Kieran
Quoted 6 lines · Kieran Mansley
Quoted 5 lines · Kieran Mansley
This patch set provides the standard net driver and accelerated network driver plug-ins for Solarflare range of 10G network cards. The accelerated network plug-ins make use of the modifications contributed to netfront and netback last year.
Quoted 7 lines
Quoted 7 lines
The four patches are as follows:
Patch 1: standard Linux net driver (provides module "sfc") Patch 2: resource manager driver (provides module "
sfc_resource") Patch 3: netfront plug-in module (provides module "sfc_netfront" and "sfc_netutil")
Patch 4: netback plug-in module (provides module "sfc_netback")
Hi Kieran,
I attempted to build this on ia64 and ran into several issues:
drivers/net/sfc/txc43128_phy.c:txc43128_phy_check_hw()
doesn't build w/o CONFIG_SRC_DEBUGFS - not ia64 specific
drivers/net/sfc/sfc_resource/falcon.c
has warnings using %llx for uint64_t
drivers/xen/sfc_netback/accel_solarflare.c:get_victim_filter()
uses x86 specific rdtscl(), apparently for random number
drivers/xen/sfc_netfront/sysdep.h
ef_vi_dma_addr_t undefined for ia64 w/ GNUC (the default)
sfc_netfront and sfc_netback apparently both define max_pages and debugfs_create_u64(), making it impossible to build them both statically.
Thanks,
Alex
Signature · 1 line
Alex Williamson HP Open Source & Linux Org.
Quoted 15 lines · Alex Williamson
Quoted 6 lines · Kieran Mansley
Quoted 5 lines · Kieran Mansley
This patch set provides the standard net driver and accelerated network driver plug-ins for Solarflare range of 10G network cards. The accelerated network plug-ins make use of the modifications contributed to netfront and netback last year.
Quoted 7 lines
Quoted 7 lines
The four patches are as follows:
Patch 1: standard Linux net driver (provides module "sfc") Patch 2: resource manager driver (provides module "
sfc_resource") Patch 3: netfront plug-in module (provides module "sfc_netfront" and "sfc_netutil")
Patch 4: netback plug-in module (provides module "sfc_netback")
Quoted 3 lines
Hi Kieran,
I attempted to build this on ia64 and ran into several issues:
Apologies for the problems you've seen. You've clearly hit something of a sweet spot (or should that be sour-spot?) for compiling in ways I don't do as routinely as I should.
I've attached a set of patches that should resolve all the problems you describe. Unfortunately until I can test more thoroughly on our IA64 hardware I've marked the acceleration modules as requiring CONFIG_X86, so this will prevent these modules from being used on IA64 systems for the time being.
The patches are as follows:
sfc_net_static_compile
- fix the namespace clash problem from the module paramenters when
compiling the plugins statically into the kernel.
debugfs_create_u64
- move the debugfs_create_u64 which had duplicate implementations in
each plugin into the standard Linux debugfs files.
sfc_debugfs_off_compile
- Fix compile error when not selecting CONFIG_SFC_DEBUGFS
sfc_config_x86_dependency
- Specify module "depends on" to more accurately describe what the real
dependencies are.
IA64_PRIx64
- fix the definition of PRIx64 in the sfc modules to be properly
defined on IA64 architectures.
Thanks
Kieran
drivers/xen/sfc_netback/accel_debugfs.c +0 -22
@@ -37,28 +37,6 @@ static struct netback_accel_global_dbfsstatic struct netback_accel_global_dbfs global_dbfs;#endif #endif - -/* -* Extend debugfs helper functions to have a u64 version -*/ -static void debugfs_u64_set (void *data,u64 val) -{ - *(u64 *)data = val; -} - -static u64 debugfs_u64_get (void *data) -{ -return *(u64 *)data; -} - -DEFINE_SIMPLE_ATTRIBUTE (fops_u64, debugfs_u64_get, debugfs_u64_set,"%llu\n" ); - -struct dentry *debugfs_create_u64 (const char *name,mode_t mode, -struct dentry *parent,u64 *value) -{ -return debugfs_create_file (name, mode, parent, value, &fops_u64); -} -void netback_accel_debugfs_init (void ) {
drivers/xen/sfc_netfront/accel_debugfs.c +0 -23
@@ -30,29 +30,6 @@#if defined(CONFIG_DEBUG_FS )static struct dentry *sfc_debugfs_root =NULL ;#endif - - -/* -* Extend debugfs helper functions to have a u64 version -*/ -static void debugfs_u64_set (void *data,u64 val) -{ - *(u64 *)data = val; -} - -static u64 debugfs_u64_get (void *data) -{ -return *(u64 *)data; -} - -DEFINE_SIMPLE_ATTRIBUTE (fops_u64, debugfs_u64_get, debugfs_u64_set,"%llu\n" ); - -struct dentry *debugfs_create_u64 (const char *name,mode_t mode, -struct dentry *parent,u64 *value) -{ -return debugfs_create_file (name, mode, parent, value, &fops_u64); -} -void netfront_accel_debugfs_init (void ) {
fs/debugfs/file.c +45 -0
51 lines not on this page · raw message
include/linux/debugfs.h +9 -0
@@ -41,6 +41,8 @@ struct dentry *debugfs_create_u16(const struct dentry *parent, u16 *value);struct dentry *debugfs_create_u32 (const char *name,mode_t mode,struct dentry *parent,u32 *value); +struct dentry *debugfs_create_u64 (const char *name,mode_t mode, +struct dentry *parent,u64 *value);struct dentry *debugfs_create_bool (const char *name,mode_t mode,struct dentry *parent,u32 *value);
@@ -94,6 +96,13 @@ static inline struct dentry *debugfs_crereturn ERR_PTR (-ENODEV ); } +static inline struct dentry *debugfs_create_u64 (const char *name,mode_t mode, +struct dentry *parent, +u64 *value) +{ +return ERR_PTR (-ENODEV ); +} +static inline struct dentry *debugfs_create_bool (const char *name,mode_t mode,struct dentry *parent,u32 *value)
drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h +5 -1
@@ -52,8 +52,12 @@/* Linux kernel also does not provide PRIx32... Sigh. */ #define PRIx32 "x" -#define PRIx64 "llx" +#ifdef __ia64__ +# define PRIx64 "lx" +#else +# define PRIx64 "llx" +#endif #if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,19 ) enum {
drivers/net/sfc/Kconfig +1 -1
@@ -28,7 +28,7 @@ config SFC_MTD new boot ROM to the NIC. config SFC_RESOURCE - depends on SFC + depends on SFC && X86 tristate "Solarflare Solarstorm SFC4000 resource driver" help This module provides the SFC resource manager driver.
drivers/xen/Kconfig +3 -2
@@ -81,11 +81,12 @@ config XEN_NETDEV_PIPELINED_TRANSMITTER config XEN_NETDEV_ACCEL_SFC_UTIL tristate + depends on X86 default n config XEN_NETDEV_ACCEL_SFC_BACKEND tristate "Network-device backend driver acceleration for Solarflare NICs" - depends on XEN_NETDEV_BACKEND + depends on XEN_NETDEV_BACKEND && SFC && SFC_RESOURCE && X86 select XEN_NETDEV_ACCEL_SFC_UTIL default m
@@ -194,7 +195,7 @@ config XEN_GRANT_DEV config XEN_NETDEV_ACCEL_SFC_FRONTEND tristate "Network-device frontend driver acceleration for Solarflare NICs" - depends on XEN_NETDEV_FRONTEND + depends on XEN_NETDEV_FRONTEND && X86 select XEN_NETDEV_ACCEL_SFC_UTIL default m
drivers/net/sfc/tenxpress.c +2 -0
@@ -391,9 +391,11 @@ static int tenxpress_phy_init(struct efxif (rc <0 ) goto fail; +#ifdef CONFIG_SFC_DEBUGFS rc =tenxpress_debugfs_init (efx);if (rc <0 ) goto fail; +#endif schedule_timeout_uninterruptible (HZ /5 );/* 200ms */
drivers/net/sfc/txc43128_phy.c +1 -1
@@ -644,8 +644,8 @@ static void txc43128_phy_fini(struct efx* don't use LASI interrupts. Also update the BER counters and poll the lm87 */ static int txc43128_phy_check_hw (struct efx_nic *efx) { +struct txc43128_data *data = efx->phy_data;#ifdef CONFIG_SFC_DEBUGFS -struct txc43128_data *data = efx->phy_data;int phy = efx->mii.phy_id;int timer, count, i, mmd;#endif
drivers/xen/sfc_netback/accel.c +2 -2
@@ -71,8 +71,8 @@ static struct notifier_block netback_acc }; -unsigned max_pages =NETBACK_ACCEL_DEFAULT_MAX_BUF_PAGES ; -module_param (max_pages, int,0666 ); +unsigned sfc_netback_max_pages =NETBACK_ACCEL_DEFAULT_MAX_BUF_PAGES ; +module_param_named (max_pages, sfc_netback_max_pages, uint,0666 );MODULE_PARM_DESC (max_pages,"The number of buffer pages to enforce on each guest" );
drivers/xen/sfc_netback/accel.h +1 -1
@@ -49,7 +49,7 @@#define NETBACK_ACCEL_DEFAULT_MAX_MCASTS (8)#define NETBACK_ACCEL_DEFAULT_MAX_BUF_PAGES (384)/* Variable to store module parameter for max_buf_pages */ -extern unsigned max_pages; +extern unsigned sfc_netback_max_pages;#define NETBACK_ACCEL_STATS 1
drivers/xen/sfc_netback/accel_xenbus.c +1 -1
@@ -113,7 +113,7 @@ void cfg_hw_quotas(struct xenbus_device*/ DPRINTK ("Failed to read quotas from xenbus, using defaults\n" ); bend->quotas.max_filters =NETBACK_ACCEL_DEFAULT_MAX_FILTERS ; - bend->quotas.max_buf_pages = max_pages; + bend->quotas.max_buf_pages = sfc_netback_max_pages; bend->quotas.max_mcasts =NETBACK_ACCEL_DEFAULT_MAX_MCASTS ; }
drivers/xen/sfc_netfront/accel.h +2 -2
@@ -336,8 +336,8 @@ typedef struct netfront_accel_vnic {/* Module parameters */ -extern unsigned max_pages; -extern unsigned buffer_split; +extern unsigned sfc_netfront_max_pages; +extern unsigned sfc_netfront_buffer_split;extern const char *frontend_name;extern struct netfront_accel_hooks accel_hooks;
drivers/xen/sfc_netfront/accel_bufs.c +2 -2
@@ -72,12 +72,12 @@ int netfront_accel_alloc_buffer_mem(struint n, rc;if ((rc =netfront_accel_alloc_buf_desc_blocks - (rx_manager, pages - (pages / buffer_split))) <0 ) { + (rx_manager, pages - (pages / sfc_netfront_buffer_split))) <0 ) { goto rx_fail; }if ((rc =netfront_accel_alloc_buf_desc_blocks - (tx_manager, pages / buffer_split)) <0 ) { + (tx_manager, pages / sfc_netfront_buffer_split)) <0 ) { goto tx_fail; }
drivers/xen/sfc_netfront/accel_msg.c +2 -2
@@ -157,7 +157,7 @@ static int vnic_add_bufs(netfront_accel_ offset = msg->u.mapbufs.reqid;if (offset < vnic->bufpages.max_pages - - (vnic->bufpages.max_pages / buffer_split)) { + (vnic->bufpages.max_pages / sfc_netfront_buffer_split)) { bufinfo = vnic->rx_bufs; }else bufinfo = vnic->tx_bufs;
@@ -286,7 +286,7 @@ static int vnic_process_hello_msg(netfro struct net_accel_msg *msg) {int err =0 ; -unsigned pages = max_pages; +unsigned pages = sfc_netfront_max_pages;if (vnic_check_hello_version (msg->u.hello.version) <0 ) { msg->id =NET_ACCEL_MSG_HELLO |NET_ACCEL_MSG_REPLY
drivers/xen/sfc_netfront/accel_netfront.c +6 -5
@@ -234,13 +234,14 @@ struct netfront_accel_hooks accel_hooks }; -unsigned max_pages =NETFRONT_ACCEL_DEFAULT_BUF_PAGES ; -module_param (max_pages, int,0666 ); +unsigned sfc_netfront_max_pages =NETFRONT_ACCEL_DEFAULT_BUF_PAGES ; +module_param_named (max_pages, sfc_netfront_max_pages, uint,0666 );MODULE_PARM_DESC (max_pages,"Number of buffer pages to request" ); -unsigned buffer_split =2 ; -module_param (buffer_split, int,0666 ); -MODULE_PARM_DESC (buffer_split,"Fraction of buffers to use for TX, rest for RX" ); +unsigned sfc_netfront_buffer_split =2 ; +module_param_named (buffer_split, sfc_netfront_buffer_split, uint,0666 ); +MODULE_PARM_DESC (buffer_split, +"Fraction of buffers to use for TX, rest for RX" );const char *frontend_name ="sfc_netfront" ;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel