pull request: sfc-next-2.6 2011-03-01
Subsystems (2)
The following changes since commit 5b2c4dd2ec12cf0e53b2bd2926f0fe2d1fbb4eda:
Jiri Pirko (1):
net: convert bonding to use rx_handler
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6.git for-davem
Ben Hutchings (6):
sfc: Read MC firmware version when requested through ethtool
sfc: Do not read STAT1.FAULT in efx_mdio_check_mmd()
sfc: Update copyright dates
sfc: Expose TX push and TSO counters through ethtool statistics
sfc: Remove configurable FIFO thresholds for pause frame generation
sfc: Bump version to 3.1
Steve Hodgson (2):
sfc: Reduce size of efx_rx_buffer by unionising skb and page
sfc: Reduce size of efx_rx_buffer further by removing data member
drivers/net/sfc/efx.c | 2 +- drivers/net/sfc/efx.h | 2 +- drivers/net/sfc/ethtool.c | 27 ++++++- drivers/net/sfc/falcon.c | 22 ++---- drivers/net/sfc/falcon_boards.c | 2 +- drivers/net/sfc/falcon_xmac.c | 2 +- drivers/net/sfc/io.h | 2 +- drivers/net/sfc/mcdi.c | 23 ++---- drivers/net/sfc/mcdi.h | 4 +- drivers/net/sfc/mcdi_mac.c | 2 +- drivers/net/sfc/mcdi_pcol.h | 2 +- drivers/net/sfc/mcdi_phy.c | 2 +- drivers/net/sfc/mdio_10g.c | 34 ++-------- drivers/net/sfc/mdio_10g.h | 5 +- drivers/net/sfc/mtd.c | 2 +- drivers/net/sfc/net_driver.h | 14 ++-- drivers/net/sfc/nic.c | 22 +------ drivers/net/sfc/nic.h | 9 +-- drivers/net/sfc/phy.h | 2 +- drivers/net/sfc/qt202x_phy.c | 2 +- drivers/net/sfc/regs.h | 2 +- drivers/net/sfc/rx.c | 144 +++++++++++++++++++------------------- drivers/net/sfc/selftest.c | 2 +- drivers/net/sfc/selftest.h | 2 +- drivers/net/sfc/siena.c | 24 +------ drivers/net/sfc/spi.h | 2 +- drivers/net/sfc/tenxpress.c | 4 +- drivers/net/sfc/tx.c | 2 +- drivers/net/sfc/txc43128_phy.c | 4 +- drivers/net/sfc/workarounds.h | 2 +- 30 files changed, 150 insertions(+), 220 deletions(-)
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 1/1 sfc: Reduce size of efx_rx_buffer by unionising skb and page
From: Steve Hodgson <[email protected]>
--- drivers/net/sfc/net_driver.h | 8 +++- drivers/net/sfc/rx.c | 96 +++++++++++++++++++---------------------- 2 files changed, 51 insertions(+), 53 deletions(-)
drivers/net/sfc/net_driver.h +6 -2
@@ -216,13 +216,17 @@ struct efx_tx_queue {* If both this and skb are %NULL, the buffer slot is currently free. * @data: Pointer to ethernet header * @len: Buffer length, in bytes. +* @is_page: Indicates if @page is valid. If false, @skb is valid. */ struct efx_rx_buffer {dma_addr_t dma_addr; -struct sk_buff *skb; -struct page *page; +union { +struct sk_buff *skb; +struct page *page; + } u;char *data;unsigned int len; +bool is_page; };/**
drivers/net/sfc/rx.c +45 -51
226 lines not on this page · raw message
Signature · 8 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 2/8 sfc: Reduce size of efx_rx_buffer further by removing data member
In reply to Ben HutchingsFrom: Steve Hodgson <[email protected]>
Instead calculate the KVA of receive data. It's not like it's a hard sum.
--- drivers/net/sfc/net_driver.h | 2 - drivers/net/sfc/rx.c | 50 +++++++++++++++++++++++------------------ 2 files changed, 28 insertions(+), 24 deletions(-)
drivers/net/sfc/net_driver.h +0 -2
@@ -214,7 +214,6 @@ struct efx_tx_queue {* If both this and page are %NULL, the buffer slot is currently free. * @page: The associated page buffer, if any. * If both this and skb are %NULL, the buffer slot is currently free. -* @data: Pointer to ethernet header * @len: Buffer length, in bytes. * @is_page: Indicates if @page is valid. If false, @skb is valid. */
@@ -224,7 +223,6 @@ struct efx_rx_buffer {struct sk_buff *skb;struct page *page; } u; -char *data;unsigned int len;bool is_page; };
drivers/net/sfc/rx.c +28 -22
146 lines not on this page · raw message
Signature · 8 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 3/8 sfc: Read MC firmware version when requested through ethtool
In reply to Ben HutchingsWe currently make no use of siena_nic_data::fw_{version,build} except to format the firmware version for ethtool_get_drvinfo(). Since we only read the version at start of day, this information is incorrect after an MC firmware update. Remove the cached version information and read it via MCDI whenever it is requested.
--- drivers/net/sfc/ethtool.c | 4 ++-- drivers/net/sfc/mcdi.c | 21 ++++++--------------- drivers/net/sfc/mcdi.h | 2 +- drivers/net/sfc/nic.h | 6 ------ drivers/net/sfc/siena.c | 17 ----------------- 5 files changed, 9 insertions(+), 41 deletions(-)
drivers/net/sfc/ethtool.c +2 -2
@@ -237,8 +237,8 @@ static void efx_ethtool_get_drvinfo(struct net_device *net_dev,strlcpy (info->driver,KBUILD_MODNAME ,sizeof (info->driver));strlcpy (info->version,EFX_DRIVER_VERSION ,sizeof (info->version));if (efx_nic_rev (efx) >=EFX_REV_SIENA_A0 ) -siena_print_fwver (efx, info->fw_version, -sizeof (info->fw_version)); +efx_mcdi_print_fwver (efx, info->fw_version, +sizeof (info->fw_version));strlcpy (info->bus_info,pci_name (efx->pci_dev),sizeof (info->bus_info)); }
drivers/net/sfc/mcdi.c +6 -15
@@ -602,7 +602,7 @@ void efx_mcdi_process_event(struct efx_channel *channel,************************************************************************** */ -int efx_mcdi_fwver (struct efx_nic *efx,u64 *version,u32 *build) +void efx_mcdi_print_fwver (struct efx_nic *efx,char *buf,size_t len) {u8 outbuf[ALIGN (MC_CMD_GET_VERSION_V1_OUT_LEN ,4 )];size_t outlength;
@@ -616,29 +616,20 @@ int efx_mcdi_fwver(struct efx_nic *efx, u64 *version, u32 *build)if (rc) goto fail; -if (outlength ==MC_CMD_GET_VERSION_V0_OUT_LEN ) { - *version =0 ; - *build =MCDI_DWORD (outbuf,GET_VERSION_OUT_FIRMWARE ); -return 0 ; - } -if (outlength <MC_CMD_GET_VERSION_V1_OUT_LEN ) { rc = -EIO ; goto fail; } ver_words = (__le16 *)MCDI_PTR (outbuf,GET_VERSION_OUT_VERSION ); - *version = (((u64 )le16_to_cpu (ver_words[0 ]) <<48 ) | - ((u64 )le16_to_cpu (ver_words[1 ]) <<32 ) | - ((u64 )le16_to_cpu (ver_words[2 ]) <<16 ) | -le16_to_cpu (ver_words[3 ])); - *build =MCDI_DWORD (outbuf,GET_VERSION_OUT_FIRMWARE ); - -return 0 ; +snprintf (buf, len,"%u.%u.%u.%u" , +le16_to_cpu (ver_words[0 ]),le16_to_cpu (ver_words[1 ]), +le16_to_cpu (ver_words[2 ]),le16_to_cpu (ver_words[3 ])); +return ; fail:netif_err (efx, probe, efx->net_dev,"%s: failed rc=%d\n" , __func__, rc); -return rc; + buf[0 ] =0 ; } int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
drivers/net/sfc/mcdi.h +1 -1
@@ -93,7 +93,7 @@ extern void efx_mcdi_process_event(struct efx_channel *channel,#define MCDI_EVENT_FIELD (_ev, _field) \ EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field) -extern int efx_mcdi_fwver (struct efx_nic *efx,u64 *version,u32 *build); +extern void efx_mcdi_print_fwver (struct efx_nic *efx,char *buf,size_t len);extern int efx_mcdi_drv_attach (struct efx_nic *efx,bool driver_operating,bool *was_attached_out); extern int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address,
drivers/net/sfc/nic.h +0 -6
@@ -142,20 +142,14 @@ static inline struct falcon_board *falcon_board(struct efx_nic *efx)/** * struct siena_nic_data - Siena NIC state -* @fw_version: Management controller firmware version -* @fw_build: Firmware build number * @mcdi: Management-Controller-to-Driver Interface * @wol_filter_id: Wake-on-LAN packet filter id */ struct siena_nic_data { -u64 fw_version; -u32 fw_build;struct efx_mcdi_iface mcdi;int wol_filter_id; }; -extern void siena_print_fwver (struct efx_nic *efx,char *buf,size_t len); -extern struct efx_nic_type falcon_a1_nic_type;extern struct efx_nic_type falcon_b0_nic_type;extern struct efx_nic_type siena_a0_nic_type;
drivers/net/sfc/siena.c +0 -17
@@ -227,13 +227,6 @@ static int siena_probe_nic(struct efx_nic *efx)if (rc) goto fail1; - rc =efx_mcdi_fwver (efx, &nic_data->fw_version, &nic_data->fw_build); -if (rc) { -netif_err (efx, probe, efx->net_dev, -"Failed to read MCPU firmware version - rc %d\n" , rc); - goto fail1;/* MCPU absent? */ - } -/* Let the BMC know that the driver is now in charge of link and * filter settings. We must do this before we reset the NIC */ rc =efx_mcdi_drv_attach (efx, true, &already_attached);
@@ -514,16 +507,6 @@ static void siena_stop_nic_stats(struct efx_nic *efx)efx_mcdi_mac_stats (efx, efx->stats_buffer.dma_addr,0 ,0 ,0 ); } -void siena_print_fwver (struct efx_nic *efx,char *buf,size_t len) -{ -struct siena_nic_data *nic_data = efx->nic_data; -snprintf (buf, len,"%u.%u.%u.%u" , - (unsigned int )(nic_data->fw_version >>48 ), - (unsigned int )(nic_data->fw_version >>32 &0xffff ), - (unsigned int )(nic_data->fw_version >>16 &0xffff ), - (unsigned int )(nic_data->fw_version &0xffff )); -} -/************************************************************************** * * Wake on LAN
Signature · 8 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 4/8 sfc: Do not read STAT1.FAULT in efx_mdio_check_mmd()
In reply to Ben HutchingsThis field does not exist in all MMDs we want to check, and all callers allow it to be set (fault_fatal = 0).
Remove the loopback condition, as STAT2.DEVPRST should be valid regardless of any fault.
--- drivers/net/sfc/mdio_10g.c | 32 +++++--------------------------- drivers/net/sfc/mdio_10g.h | 3 +-- drivers/net/sfc/tenxpress.c | 2 +- drivers/net/sfc/txc43128_phy.c | 2 +- 4 files changed, 8 insertions(+), 31 deletions(-)
drivers/net/sfc/mdio_10g.c +5 -27
@@ -51,13 +51,10 @@ int efx_mdio_reset_mmd(struct efx_nic *port, int mmd,return spins ? spins : -ETIMEDOUT ; } -static int efx_mdio_check_mmd (struct efx_nic *efx,int mmd,int fault_fatal) +static int efx_mdio_check_mmd (struct efx_nic *efx,int mmd) {int status; -if (LOOPBACK_INTERNAL (efx)) -return 0 ; -if (mmd !=MDIO_MMD_AN ) {/* Read MMD STATUS2 to check it is responding. */ status =efx_mdio_read (efx, mmd,MDIO_STAT2 );
@@ -68,20 +65,6 @@ static int efx_mdio_check_mmd(struct efx_nic *efx, int mmd, int fault_fatal) } } -/* Read MMD STATUS 1 to check for fault. */ - status =efx_mdio_read (efx, mmd,MDIO_STAT1 ); -if (status &MDIO_STAT1_FAULT ) { -if (fault_fatal) { -netif_err (efx, hw, efx->net_dev, -"PHY MMD %d reporting fatal" -" fault: status %x\n" , mmd, status); -return -EIO ; - }else { -netif_dbg (efx, hw, efx->net_dev, -"PHY MMD %d reporting status" -" %x (expected)\n" , mmd, status); - } - }return 0 ; }
@@ -130,8 +113,7 @@ int efx_mdio_wait_reset_mmds(struct efx_nic *efx, unsigned int mmd_mask)return rc; } -int efx_mdio_check_mmds (struct efx_nic *efx, -unsigned int mmd_mask,unsigned int fatal_mask) +int efx_mdio_check_mmds (struct efx_nic *efx,unsigned int mmd_mask) {int mmd =0 , probe_mmd, devs1, devs2;u32 devices;
@@ -161,13 +143,9 @@ int efx_mdio_check_mmds(struct efx_nic *efx,/* Check all required MMDs are responding and happy. */ while (mmd_mask) { -if (mmd_mask &1 ) { -int fault_fatal = fatal_mask &1 ; -if (efx_mdio_check_mmd (efx, mmd, fault_fatal)) -return -EIO ; - } +if ((mmd_mask &1 ) &&efx_mdio_check_mmd (efx, mmd)) +return -EIO ; mmd_mask = mmd_mask >>1 ; - fatal_mask = fatal_mask >>1 ; mmd++; }
@@ -337,7 +315,7 @@ int efx_mdio_test_alive(struct efx_nic *efx) "no MDIO PHY present with ID %d\n", efx->mdio.prtad); rc = -EINVAL ; }else { - rc =efx_mdio_check_mmds (efx, efx->mdio.mmds,0 ); + rc =efx_mdio_check_mmds (efx, efx->mdio.mmds); }mutex_unlock (&efx->mac_lock);
drivers/net/sfc/mdio_10g.h +1 -2
@@ -68,8 +68,7 @@ extern int efx_mdio_reset_mmd(struct efx_nic *efx, int mmd, int spins, int spintime);/* As efx_mdio_check_mmd but for multiple MMDs */ -int efx_mdio_check_mmds (struct efx_nic *efx, -unsigned int mmd_mask,unsigned int fatal_mask); +int efx_mdio_check_mmds (struct efx_nic *efx,unsigned int mmd_mask);/* Check the link status of specified mmds in bit mask */ extern bool efx_mdio_links_ok (struct efx_nic *efx,unsigned int mmd_mask);
drivers/net/sfc/tenxpress.c +1 -1
@@ -196,7 +196,7 @@ static int tenxpress_phy_init(struct efx_nic *efx)if (rc <0 )return rc; - rc =efx_mdio_check_mmds (efx,TENXPRESS_REQUIRED_DEVS ,0 ); + rc =efx_mdio_check_mmds (efx,TENXPRESS_REQUIRED_DEVS );if (rc <0 )return rc; }
drivers/net/sfc/txc43128_phy.c +1 -1
@@ -193,7 +193,7 @@ static int txc_reset_phy(struct efx_nic *efx) goto fail;/* Check that all the MMDs we expect are present and responding. */ - rc =efx_mdio_check_mmds (efx,TXC_REQUIRED_DEVS ,0 ); + rc =efx_mdio_check_mmds (efx,TXC_REQUIRED_DEVS );if (rc <0 ) goto fail;
Signature · 8 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 5/8 sfc: Update copyright dates
In reply to Ben Hutchings--- drivers/net/sfc/efx.c | 2 +- drivers/net/sfc/efx.h | 2 +- drivers/net/sfc/ethtool.c | 2 +- drivers/net/sfc/falcon.c | 2 +- drivers/net/sfc/falcon_boards.c | 2 +- drivers/net/sfc/falcon_xmac.c | 2 +- drivers/net/sfc/io.h | 2 +- drivers/net/sfc/mcdi.c | 2 +- drivers/net/sfc/mcdi.h | 2 +- drivers/net/sfc/mcdi_mac.c | 2 +- drivers/net/sfc/mcdi_pcol.h | 2 +- drivers/net/sfc/mcdi_phy.c | 2 +- drivers/net/sfc/mdio_10g.c | 2 +- drivers/net/sfc/mdio_10g.h | 2 +- drivers/net/sfc/mtd.c | 2 +- drivers/net/sfc/net_driver.h | 2 +- drivers/net/sfc/nic.c | 2 +- drivers/net/sfc/nic.h | 2 +- drivers/net/sfc/phy.h | 2 +- drivers/net/sfc/qt202x_phy.c | 2 +- drivers/net/sfc/regs.h | 2 +- drivers/net/sfc/rx.c | 2 +- drivers/net/sfc/selftest.c | 2 +- drivers/net/sfc/selftest.h | 2 +- drivers/net/sfc/siena.c | 2 +- drivers/net/sfc/spi.h | 2 +- drivers/net/sfc/tenxpress.c | 2 +- drivers/net/sfc/tx.c | 2 +- drivers/net/sfc/txc43128_phy.c | 2 +- drivers/net/sfc/workarounds.h | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-)
drivers/net/sfc/efx.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2005-2009 Solarflare Communications Inc. +* Copyright 2005-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/efx.h +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/ethtool.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/falcon.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/falcon_boards.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2007-2009 Solarflare Communications Inc. +* Copyright 2007-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/falcon_xmac.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/io.h +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mcdi.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2008-2009 Solarflare Communications Inc. +* Copyright 2008-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mcdi.h +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2008-2009 Solarflare Communications Inc. +* Copyright 2008-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mcdi_mac.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2009 Solarflare Communications Inc. +* Copyright 2009-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mcdi_pcol.h +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2009 Solarflare Communications Inc. +* Copyright 2009-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mcdi_phy.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2009 Solarflare Communications Inc. +* Copyright 2009-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mdio_10g.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mdio_10g.h +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/mtd.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/net_driver.h +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2005-2009 Solarflare Communications Inc. +* Copyright 2005-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/nic.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/nic.h +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/phy.h +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2007-2009 Solarflare Communications Inc. +* Copyright 2007-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/qt202x_phy.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/regs.h +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/rx.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2005-2009 Solarflare Communications Inc. +* Copyright 2005-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/selftest.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/selftest.h +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2008 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/siena.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/spi.h +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005 Fen Systems Ltd. -* Copyright 2006 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/tenxpress.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2007-2009 Solarflare Communications Inc. +* Copyright 2007-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/tx.c +1 -1
@@ -1,7 +1,7 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. -* Copyright 2005-2009 Solarflare Communications Inc. +* Copyright 2005-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/txc43128_phy.c +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2006-2010 Solarflare Communications Inc. +* Copyright 2006-2011 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
drivers/net/sfc/workarounds.h +1 -1
@@ -1,6 +1,6 @@/**************************************************************************** * Driver for Solarflare Solarstorm network controllers and boards -* Copyright 2006-2009 Solarflare Communications Inc. +* Copyright 2006-2010 Solarflare Communications Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published
Signature · 8 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 6/8 sfc: Expose TX push and TSO counters through ethtool statistics
In reply to Ben Hutchings--- drivers/net/sfc/ethtool.c | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-)
drivers/net/sfc/ethtool.c +20 -1
@@ -28,7 +28,8 @@ struct efx_ethtool_stat {enum { EFX_ETHTOOL_STAT_SOURCE_mac_stats, EFX_ETHTOOL_STAT_SOURCE_nic, - EFX_ETHTOOL_STAT_SOURCE_channel + EFX_ETHTOOL_STAT_SOURCE_channel, + EFX_ETHTOOL_STAT_SOURCE_tx_queue } source;unsigned offset;u64 (*get_stat) (void *field);/* Reader function */
@@ -86,6 +87,10 @@ static u64 efx_get_atomic_stat(void *field) EFX_ETHTOOL_STAT(field, channel, n_##field, \ unsigned int, efx_get_uint_stat) +#define EFX_ETHTOOL_UINT_TXQ_STAT (field) \ + EFX_ETHTOOL_STAT(tx_##field, tx_queue, field, \ + unsigned int, efx_get_uint_stat) +static struct efx_ethtool_stat efx_ethtool_stats[] = {EFX_ETHTOOL_U64_MAC_STAT (tx_bytes),EFX_ETHTOOL_U64_MAC_STAT (tx_good_bytes),
@@ -116,6 +121,10 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = {EFX_ETHTOOL_ULONG_MAC_STAT (tx_non_tcpudp),EFX_ETHTOOL_ULONG_MAC_STAT (tx_mac_src_error),EFX_ETHTOOL_ULONG_MAC_STAT (tx_ip_src_error), +EFX_ETHTOOL_UINT_TXQ_STAT (tso_bursts), +EFX_ETHTOOL_UINT_TXQ_STAT (tso_long_headers), +EFX_ETHTOOL_UINT_TXQ_STAT (tso_packets), +EFX_ETHTOOL_UINT_TXQ_STAT (pushes),EFX_ETHTOOL_U64_MAC_STAT (rx_bytes),EFX_ETHTOOL_U64_MAC_STAT (rx_good_bytes), EFX_ETHTOOL_U64_MAC_STAT(rx_bad_bytes),
@@ -470,6 +479,7 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,struct efx_mac_stats *mac_stats = &efx->mac_stats;struct efx_ethtool_stat *stat;struct efx_channel *channel; +struct efx_tx_queue *tx_queue;struct rtnl_link_stats64 temp;int i;
@@ -495,6 +505,15 @@ static void efx_ethtool_get_stats(struct net_device *net_dev, data[i] += stat->get_stat ((void *)channel + stat->offset);break ; +case EFX_ETHTOOL_STAT_SOURCE_tx_queue: + data[i] =0 ; +efx_for_each_channel (channel, efx) { +efx_for_each_channel_tx_queue (tx_queue, channel) + data[i] += + stat->get_stat ((void *)tx_queue + + stat->offset); + } +break ; } } }
Signature · 8 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 7/8 sfc: Remove configurable FIFO thresholds for pause frame generation
In reply to Ben HutchingsIn Falcon we can configure the fill levels of the RX data FIFO which trigger the generation of pause frames (if enabled), and we have module parameters for this.
Siena does not allow the levels to be configured (or, if it does, this is done by the MC firmware and is not configurable by drivers).
So far as I can tell, the module parameters are not used by our internal scripts and have not been documented (with the exception of the short parameter descriptions). Therefore, remove them and always initialise Falcon with the default values.
--- drivers/net/sfc/falcon.c | 20 +++++--------------- drivers/net/sfc/nic.c | 20 -------------------- drivers/net/sfc/nic.h | 1 - drivers/net/sfc/siena.c | 5 ----- 4 files changed, 5 insertions(+), 41 deletions(-)
drivers/net/sfc/falcon.c +5 -15
@@ -1478,36 +1478,26 @@ static void falcon_init_rx_cfg(struct efx_nic *efx)/* RX control FIFO thresholds (32 entries) */ const unsigned ctrl_xon_thr =20 ;const unsigned ctrl_xoff_thr =25 ; -/* RX data FIFO thresholds (256-byte units; size varies) */ -int data_xon_thr = efx_nic_rx_xon_thresh >>8 ; -int data_xoff_thr = efx_nic_rx_xoff_thresh >>8 ;efx_oword_t reg;efx_reado (efx, ®,FR_AZ_RX_CFG );if (efx_nic_rev (efx) <=EFX_REV_FALCON_A1 ) {/* Data FIFO size is 5.5K */ -if (data_xon_thr <0 ) - data_xon_thr =512 >>8 ; -if (data_xoff_thr <0 ) - data_xoff_thr =2048 >>8 ;EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_DESC_PUSH_EN ,0 );EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_USR_BUF_SIZE , huge_buf_size); -EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_XON_MAC_TH , data_xon_thr); -EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_XOFF_MAC_TH , data_xoff_thr); +EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_XON_MAC_TH ,512 >>8 ); +EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_XOFF_MAC_TH ,2048 >>8 );EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_XON_TX_TH , ctrl_xon_thr);EFX_SET_OWORD_FIELD (reg,FRF_AA_RX_XOFF_TX_TH , ctrl_xoff_thr); }else {/* Data FIFO size is 80K; register fields moved */ -if (data_xon_thr <0 ) - data_xon_thr =27648 >>8 ;/* ~3*max MTU */ -if (data_xoff_thr <0 ) - data_xoff_thr =54272 >>8 ;/* ~80Kb - 3*max MTU */ EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_DESC_PUSH_EN ,0 );EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_USR_BUF_SIZE , huge_buf_size); -EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_XON_MAC_TH , data_xon_thr); -EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_XOFF_MAC_TH , data_xoff_thr); +/* Send XON and XOFF at ~3 * max MTU away from empty/full */ +EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_XON_MAC_TH ,27648 >>8 ); +EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_XOFF_MAC_TH ,54272 >>8 );EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_XON_TX_TH , ctrl_xon_thr);EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_XOFF_TX_TH , ctrl_xoff_thr);EFX_SET_OWORD_FIELD (reg,FRF_BZ_RX_INGR_EN ,1 );
drivers/net/sfc/nic.c +0 -20
@@ -41,26 +41,6 @@#define RX_DC_ENTRIES 64#define RX_DC_ENTRIES_ORDER 3 -/* RX FIFO XOFF watermark -* -* When the amount of the RX FIFO increases used increases past this -* watermark send XOFF. Only used if RX flow control is enabled (ethtool -A) -* This also has an effect on RX/TX arbitration -*/ -int efx_nic_rx_xoff_thresh =-1 ; -module_param_named (rx_xoff_thresh_bytes, efx_nic_rx_xoff_thresh, int,0644 ); -MODULE_PARM_DESC (rx_xoff_thresh_bytes,"RX fifo XOFF threshold" ); - -/* RX FIFO XON watermark -* -* When the amount of the RX FIFO used decreases below this -* watermark send XON. Only used if TX flow control is enabled (ethtool -A) -* This also has an effect on RX/TX arbitration -*/ -int efx_nic_rx_xon_thresh =-1 ; -module_param_named (rx_xon_thresh_bytes, efx_nic_rx_xon_thresh, int,0644 ); -MODULE_PARM_DESC (rx_xon_thresh_bytes,"RX fifo XON threshold" ); -/* If EFX_MAX_INT_ERRORS internal errors occur within * EFX_INT_ERROR_EXPIRE seconds, we consider the NIC broken and * disable it.
drivers/net/sfc/nic.h +0 -1
@@ -188,7 +188,6 @@ extern void efx_nic_eventq_read_ack(struct efx_channel *channel);/* MAC/PHY */ extern void falcon_drain_tx_fifo (struct efx_nic *efx);extern void falcon_reconfigure_mac_wrapper (struct efx_nic *efx); -extern int efx_nic_rx_xoff_thresh, efx_nic_rx_xon_thresh;/* Interrupts and test events */ extern int efx_nic_init_interrupt (struct efx_nic *efx);
drivers/net/sfc/siena.c +0 -5
@@ -341,11 +341,6 @@ static int siena_init_nic(struct efx_nic *efx) FRF_CZ_RX_RSS_IPV6_TKEY_HI_WIDTH / 8);efx_writeo (efx, &temp,FR_CZ_RX_RSS_IPV6_REG3 ); -if (efx_nic_rx_xoff_thresh >=0 || efx_nic_rx_xon_thresh >=0 ) -/* No MCDI operation has been defined to set thresholds */ -netif_err (efx, hw, efx->net_dev, -"ignoring RX flow control thresholds\n" ); -/* Enable event logging */ rc =efx_mcdi_log_ctrl (efx, true, false,0 );if (rc)
Signature · 8 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
PATCH 8/8 sfc: Bump version to 3.1
In reply to Ben HutchingsAll features originally planned for version 3.1 (and some that weren't) have been implemented.
--- drivers/net/sfc/net_driver.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/sfc/net_driver.h +1 -1
@@ -41,7 +41,7 @@* **************************************************************************/ -#define EFX_DRIVER_VERSION "3.0" +#define EFX_DRIVER_VERSION "3.1"#ifdef EFX_ENABLE_DEBUG #define EFX_BUG_ON_PARANOID (x) BUG_ON(x)
Signature · 7 lines
1.5.4 -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
David Miller
maintainerRe: [PATCH net-next-2.6] sfc: Reduce size of efx_rx_buffer by unionising skb and page
In reply to Ben HutchingsFrom: Ben Hutchings <[email protected]>
Date: Tue, 01 Mar 2011 01:21:30 +0000
Quoted 4 lines
From: Steve Hodgson <[email protected]>
[bwh: Forward-ported to net-next-2.6.]Signed-off-by Ben Hutchings <[email protected]>
I'm going to apply this, but you can take this further by making the buffer an "unsigned long" and encode the pointer plus a one-bit binary state there to indicate what it is.
David Miller
maintainerFrom: Ben Hutchings <[email protected]>
Date: Tue, 01 Mar 2011 01:16:09 +0000
Quoted 8 lines
The following changes since commit
5b2c4dd2ec12cf0e53b2bd2926f0fe2d1fbb4eda:
Jiri Pirko (1):
net: convert bonding to userx_handlerare available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6.gitfor-davem
Pulled, thanks Ben.
Re: [PATCH net-next-2.6] sfc: Reduce size of efx_rx_buffer by unionising skb and page
In reply to David MillerQuoted 11 lines · David Miller
From: Ben Hutchings <[email protected]>
Date: Tue, 01 Mar 2011 01:21:30 +0000Quoted 4 lines
From: Steve Hodgson <[email protected]>
[bwh: Forward-ported to net-next-2.6.]Signed-off-by Ben Hutchings <[email protected]>I'm going to apply this, but you can take this further by making the buffer an "unsigned long" and encode the pointer plus a one-bit binary state there to indicate what it is.
We were primarily concerned with reducing the size of the software ring for RX queues on 64-bit (DMA address & pointer) systems, where the structure layout is:
Original:
struct efx_rx_buffer {
dma_addr_t dma_addr; // 0
struct sk_buff *skb; // 8
struct page *page; // 16
char *data; // 24
unsigned int len; // 32
}; // size = 40Current:
struct efx_rx_buffer {
dma_addr_t dma_addr; // 0
union {
struct sk_buff *skb; // 8
struct page *page; // 8
} u;
unsigned int len; // 16
bool is_page; // 20
}; // size = 24Combining the flag with the pointers wouldn't improve on this:
struct efx_rx_buffer {
dma_addr_t dma_addr; // 0
unsigned long magic_pointer; // 8
unsigned int len; // 16
}; // size = 24Ben.
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
David Miller
maintainerRe: [PATCH net-next-2.6] sfc: Reduce size of efx_rx_buffer by unionising skb and page
From: Ben Hutchings <[email protected]>
Date: Tue, 01 Mar 2011 20:47:04 +0000
Quoted 1 line
Combining the flag with the pointers wouldn't improve on this:
Good point, but:
1) One less load in your RX fast path.
2) 32-bits of space for any addition state you might like to add later