* [PATCH net-next 02/15] drivers/net/8139too.c: Use (pr|netdev|netif)_<level> macro helpers
From: Joe Perches @ 2010-02-18 1:01 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <cover.1266454575.git.joe@perches.com>
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats
Use print_hex_dump
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/8139too.c | 187 +++++++++++++++++++++----------------------------
1 files changed, 81 insertions(+), 106 deletions(-)
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index c7d6f09..b4efc91 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -89,6 +89,8 @@
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#define DRV_NAME "8139too"
#define DRV_VERSION "0.9.28"
@@ -111,7 +113,6 @@
#include <asm/irq.h>
#define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION
-#define PFX DRV_NAME ": "
/* Default Message level */
#define RTL8139_DEF_MSG_ENABLE (NETIF_MSG_DRV | \
@@ -130,9 +131,9 @@
# define assert(expr) do {} while (0)
#else
# define assert(expr) \
- if(unlikely(!(expr))) { \
- pr_err("Assertion failed! %s,%s,%s,line=%d\n", \
- #expr, __FILE__, __func__, __LINE__); \
+ if (unlikely(!(expr))) { \
+ pr_err("Assertion failed! %s,%s,%s,line=%d\n", \
+ #expr, __FILE__, __func__, __LINE__); \
}
#endif
@@ -957,7 +958,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
pdev->device == PCI_DEVICE_ID_REALTEK_8139 &&
pdev->subsystem_vendor == PCI_VENDOR_ID_ATHEROS &&
pdev->subsystem_device == PCI_DEVICE_ID_REALTEK_8139) {
- pr_info("8139too: OQO Model 2 detected. Forcing PIO\n");
+ pr_info("OQO Model 2 detected. Forcing PIO\n");
use_io = 1;
}
@@ -1010,21 +1011,19 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
tp->mii.reg_num_mask = 0x1f;
/* dev is fully set up and ready to use now */
- pr_debug("about to register device named %s (%p)...\n", dev->name, dev);
+ pr_debug("about to register device named %s (%p)...\n",
+ dev->name, dev);
i = register_netdev (dev);
if (i) goto err_out;
pci_set_drvdata (pdev, dev);
- pr_info("%s: %s at 0x%lx, %pM, IRQ %d\n",
- dev->name,
- board_info[ent->driver_data].name,
- dev->base_addr,
- dev->dev_addr,
- dev->irq);
+ netdev_info(dev, "%s at 0x%lx, %pM, IRQ %d\n",
+ board_info[ent->driver_data].name,
+ dev->base_addr, dev->dev_addr, dev->irq);
- pr_debug("%s: Identified 8139 chip type '%s'\n",
- dev->name, rtl_chip_info[tp->chipset].name);
+ netdev_dbg(dev, "Identified 8139 chip type '%s'\n",
+ rtl_chip_info[tp->chipset].name);
/* Find the connected MII xcvrs.
Doing this in open() would allow detecting external xcvrs later, but
@@ -1037,13 +1036,12 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
if (mii_status != 0xffff && mii_status != 0x0000) {
u16 advertising = mdio_read(dev, phy, 4);
tp->phys[phy_idx++] = phy;
- pr_info("%s: MII transceiver %d status 0x%4.4x advertising %4.4x.\n",
- dev->name, phy, mii_status, advertising);
+ netdev_info(dev, "MII transceiver %d status 0x%04x advertising %04x\n",
+ phy, mii_status, advertising);
}
}
if (phy_idx == 0) {
- pr_info("%s: No MII transceivers found! Assuming SYM transceiver.\n",
- dev->name);
+ netdev_info(dev, "No MII transceivers found! Assuming SYM transceiver\n");
tp->phys[0] = 32;
}
} else
@@ -1062,15 +1060,15 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
if (board_idx < MAX_UNITS && full_duplex[board_idx] > 0)
tp->mii.full_duplex = full_duplex[board_idx];
if (tp->mii.full_duplex) {
- pr_info("%s: Media type forced to Full Duplex.\n", dev->name);
+ netdev_info(dev, "Media type forced to Full Duplex\n");
/* Changing the MII-advertised media because might prevent
re-connection. */
tp->mii.force_media = 1;
}
if (tp->default_port) {
- pr_info(" Forcing %dMbps %s-duplex operation.\n",
- (option & 0x20 ? 100 : 10),
- (option & 0x10 ? "full" : "half"));
+ netdev_info(dev, " Forcing %dMbps %s-duplex operation\n",
+ (option & 0x20 ? 100 : 10),
+ (option & 0x10 ? "full" : "half"));
mdio_write(dev, tp->phys[0], 0,
((option & 0x20) ? 0x2000 : 0) | /* 100Mbps? */
((option & 0x10) ? 0x0100 : 0)); /* Full duplex? */
@@ -1330,12 +1328,12 @@ static int rtl8139_open (struct net_device *dev)
rtl8139_hw_start (dev);
netif_start_queue (dev);
- if (netif_msg_ifup(tp))
- pr_debug("%s: rtl8139_open() ioaddr %#llx IRQ %d"
- " GP Pins %2.2x %s-duplex.\n", dev->name,
- (unsigned long long)pci_resource_start (tp->pci_dev, 1),
- dev->irq, RTL_R8 (MediaStatus),
- tp->mii.full_duplex ? "full" : "half");
+ netif_dbg(tp, ifup, dev,
+ "%s() ioaddr %#llx IRQ %d GP Pins %02x %s-duplex\n",
+ __func__,
+ (unsigned long long)pci_resource_start (tp->pci_dev, 1),
+ dev->irq, RTL_R8 (MediaStatus),
+ tp->mii.full_duplex ? "full" : "half");
rtl8139_start_thread(tp);
@@ -1393,7 +1391,7 @@ static void rtl8139_hw_start (struct net_device *dev)
RTL_W8 (Config3, RTL_R8 (Config3) & ~Cfg3_Magic);
}
- pr_debug("init buffer addresses\n");
+ netdev_dbg(dev, "init buffer addresses\n");
/* Lock Config[01234] and BMCR register writes */
RTL_W8 (Cfg9346, Cfg9346_Lock);
@@ -1555,14 +1553,11 @@ static inline void rtl8139_thread_iter (struct net_device *dev,
tp->mii.full_duplex = duplex;
if (mii_lpa) {
- pr_info("%s: Setting %s-duplex based on MII #%d link"
- " partner ability of %4.4x.\n",
- dev->name,
- tp->mii.full_duplex ? "full" : "half",
- tp->phys[0], mii_lpa);
+ netdev_info(dev, "Setting %s-duplex based on MII #%d link partner ability of %04x\n",
+ tp->mii.full_duplex ? "full" : "half",
+ tp->phys[0], mii_lpa);
} else {
- pr_info("%s: media is unconnected, link down, or incompatible connection\n",
- dev->name);
+ netdev_info(dev, "media is unconnected, link down, or incompatible connection\n");
}
#if 0
RTL_W8 (Cfg9346, Cfg9346_Unlock);
@@ -1576,13 +1571,12 @@ static inline void rtl8139_thread_iter (struct net_device *dev,
rtl8139_tune_twister (dev, tp);
- pr_debug("%s: Media selection tick, Link partner %4.4x.\n",
- dev->name, RTL_R16 (NWayLPAR));
- pr_debug("%s: Other registers are IntMask %4.4x IntStatus %4.4x\n",
- dev->name, RTL_R16 (IntrMask), RTL_R16 (IntrStatus));
- pr_debug("%s: Chip config %2.2x %2.2x.\n",
- dev->name, RTL_R8 (Config0),
- RTL_R8 (Config1));
+ netdev_dbg(dev, "Media selection tick, Link partner %04x\n",
+ RTL_R16(NWayLPAR));
+ netdev_dbg(dev, "Other registers are IntMask %04x IntStatus %04x\n",
+ RTL_R16(IntrMask), RTL_R16(IntrStatus));
+ netdev_dbg(dev, "Chip config %02x %02x\n",
+ RTL_R8(Config0), RTL_R8(Config1));
}
static void rtl8139_thread (struct work_struct *work)
@@ -1640,17 +1634,17 @@ static void rtl8139_tx_timeout_task (struct work_struct *work)
int i;
u8 tmp8;
- pr_debug("%s: Transmit timeout, status %2.2x %4.4x %4.4x media %2.2x.\n",
- dev->name, RTL_R8 (ChipCmd),
- RTL_R16(IntrStatus), RTL_R16(IntrMask), RTL_R8(MediaStatus));
+ netdev_dbg(dev, "Transmit timeout, status %02x %04x %04x media %02x\n",
+ RTL_R8(ChipCmd), RTL_R16(IntrStatus),
+ RTL_R16(IntrMask), RTL_R8(MediaStatus));
/* Emit info to figure out what went wrong. */
- pr_debug("%s: Tx queue start entry %ld dirty entry %ld.\n",
- dev->name, tp->cur_tx, tp->dirty_tx);
+ netdev_dbg(dev, "Tx queue start entry %ld dirty entry %ld\n",
+ tp->cur_tx, tp->dirty_tx);
for (i = 0; i < NUM_TX_DESC; i++)
- pr_debug("%s: Tx descriptor %d is %8.8lx.%s\n",
- dev->name, i, RTL_R32 (TxStatus0 + (i * 4)),
- i == tp->dirty_tx % NUM_TX_DESC ?
- " (queue head)" : "");
+ netdev_dbg(dev, "Tx descriptor %d is %08lx%s\n",
+ i, RTL_R32(TxStatus0 + (i * 4)),
+ i == tp->dirty_tx % NUM_TX_DESC ?
+ " (queue head)" : "");
tp->xstats.tx_timeouts++;
@@ -1729,9 +1723,8 @@ static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb,
netif_stop_queue (dev);
spin_unlock_irqrestore(&tp->lock, flags);
- if (netif_msg_tx_queued(tp))
- pr_debug("%s: Queued Tx packet size %u to slot %d.\n",
- dev->name, len, entry);
+ netif_dbg(tp, tx_queued, dev, "Queued Tx packet size %u to slot %d\n",
+ len, entry);
return NETDEV_TX_OK;
}
@@ -1760,9 +1753,8 @@ static void rtl8139_tx_interrupt (struct net_device *dev,
/* Note: TxCarrierLost is always asserted at 100mbps. */
if (txstatus & (TxOutOfWindow | TxAborted)) {
/* There was an major error, log it. */
- if (netif_msg_tx_err(tp))
- pr_debug("%s: Transmit error, Tx status %8.8x.\n",
- dev->name, txstatus);
+ netif_dbg(tp, tx_err, dev, "Transmit error, Tx status %08x\n",
+ txstatus);
dev->stats.tx_errors++;
if (txstatus & TxAborted) {
dev->stats.tx_aborted_errors++;
@@ -1792,8 +1784,8 @@ static void rtl8139_tx_interrupt (struct net_device *dev,
#ifndef RTL8139_NDEBUG
if (tp->cur_tx - dirty_tx > NUM_TX_DESC) {
- pr_err("%s: Out-of-sync dirty pointer, %ld vs. %ld.\n",
- dev->name, dirty_tx, tp->cur_tx);
+ netdev_err(dev, "Out-of-sync dirty pointer, %ld vs. %ld\n",
+ dirty_tx, tp->cur_tx);
dirty_tx += NUM_TX_DESC;
}
#endif /* RTL8139_NDEBUG */
@@ -1816,14 +1808,13 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
int tmp_work;
#endif
- if (netif_msg_rx_err (tp))
- pr_debug("%s: Ethernet frame had errors, status %8.8x.\n",
- dev->name, rx_status);
+ netif_dbg(tp, rx_err, dev, "Ethernet frame had errors, status %08x\n",
+ rx_status);
dev->stats.rx_errors++;
if (!(rx_status & RxStatusOK)) {
if (rx_status & RxTooLong) {
- pr_debug("%s: Oversized Ethernet frame, status %4.4x!\n",
- dev->name, rx_status);
+ netdev_dbg(dev, "Oversized Ethernet frame, status %04x!\n",
+ rx_status);
/* A.C.: The chip hangs here. */
}
if (rx_status & (RxBadSymbol | RxBadAlign))
@@ -1855,7 +1846,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
break;
}
if (tmp_work <= 0)
- pr_warning(PFX "rx stop wait too long\n");
+ netdev_warn(dev, "rx stop wait too long\n");
/* restart receive */
tmp_work = 200;
while (--tmp_work > 0) {
@@ -1866,7 +1857,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
break;
}
if (tmp_work <= 0)
- pr_warning(PFX "tx/rx enable wait too long\n");
+ netdev_warn(dev, "tx/rx enable wait too long\n");
/* and reinitialize all rx related registers */
RTL_W8_F (Cfg9346, Cfg9346_Unlock);
@@ -1877,7 +1868,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
RTL_W32 (RxConfig, tp->rx_config);
tp->cur_rx = 0;
- pr_debug("init buffer addresses\n");
+ netdev_dbg(dev, "init buffer addresses\n");
/* Lock Config[01234] and BMCR register writes */
RTL_W8 (Cfg9346, Cfg9346_Lock);
@@ -1931,10 +1922,9 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
unsigned int cur_rx = tp->cur_rx;
unsigned int rx_size = 0;
- pr_debug("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x,"
- " free to %4.4x, Cmd %2.2x.\n", dev->name, (u16)cur_rx,
- RTL_R16 (RxBufAddr),
- RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
+ netdev_dbg(dev, "In %s(), current %04x BufAddr %04x, free to %04x, Cmd %02x\n",
+ __func__, (u16)cur_rx,
+ RTL_R16(RxBufAddr), RTL_R16(RxBufPtr), RTL_R8(ChipCmd));
while (netif_running(dev) && received < budget &&
(RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {
@@ -1950,19 +1940,12 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
rx_size = rx_status >> 16;
pkt_size = rx_size - 4;
- if (netif_msg_rx_status(tp))
- pr_debug("%s: rtl8139_rx() status %4.4x, size %4.4x,"
- " cur %4.4x.\n", dev->name, rx_status,
- rx_size, cur_rx);
+ netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n",
+ __func__, rx_status, rx_size, cur_rx);
#if RTL8139_DEBUG > 2
- {
- int i;
- pr_debug("%s: Frame contents ", dev->name);
- for (i = 0; i < 70; i++)
- pr_cont(" %2.2x",
- rx_ring[ring_offset + i]);
- pr_cont(".\n");
- }
+ print_dump_hex(KERN_DEBUG, "Frame contents: ",
+ DUMP_PREFIX_OFFSET, 16, 1,
+ &rx_ring[ring_offset], 70, true);
#endif
/* Packet copy from FIFO still in progress.
@@ -1973,14 +1956,11 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
if (!tp->fifo_copy_timeout)
tp->fifo_copy_timeout = jiffies + 2;
else if (time_after(jiffies, tp->fifo_copy_timeout)) {
- pr_debug("%s: hung FIFO. Reset.", dev->name);
+ netdev_dbg(dev, "hung FIFO. Reset\n");
rx_size = 0;
goto no_early_rx;
}
- if (netif_msg_intr(tp)) {
- pr_debug("%s: fifo copy in progress.",
- dev->name);
- }
+ netif_dbg(tp, intr, dev, "fifo copy in progress\n");
tp->xstats.early_rx++;
break;
}
@@ -2021,8 +2001,7 @@ no_early_rx:
netif_receive_skb (skb);
} else {
if (net_ratelimit())
- pr_warning("%s: Memory squeeze, dropping packet.\n",
- dev->name);
+ netdev_warn(dev, "Memory squeeze, dropping packet\n");
dev->stats.rx_dropped++;
}
received++;
@@ -2036,10 +2015,9 @@ no_early_rx:
if (unlikely(!received || rx_size == 0xfff0))
rtl8139_isr_ack(tp);
- pr_debug("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x,"
- " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx,
- RTL_R16 (RxBufAddr),
- RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
+ netdev_dbg(dev, "Done %s(), current %04x BufAddr %04x, free to %04x, Cmd %02x\n",
+ __func__, cur_rx,
+ RTL_R16(RxBufAddr), RTL_R16(RxBufPtr), RTL_R8(ChipCmd));
tp->cur_rx = cur_rx;
@@ -2060,8 +2038,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev,
void __iomem *ioaddr,
int status, int link_changed)
{
- pr_debug("%s: Abnormal interrupt, status %8.8x.\n",
- dev->name, status);
+ netdev_dbg(dev, "Abnormal interrupt, status %08x\n", status);
assert (dev != NULL);
assert (tp != NULL);
@@ -2089,8 +2066,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev,
pci_read_config_word (tp->pci_dev, PCI_STATUS, &pci_cmd_status);
pci_write_config_word (tp->pci_dev, PCI_STATUS, pci_cmd_status);
- pr_err("%s: PCI Bus error %4.4x.\n",
- dev->name, pci_cmd_status);
+ netdev_err(dev, "PCI Bus error %04x\n", pci_cmd_status);
}
}
@@ -2183,8 +2159,8 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance)
out:
spin_unlock (&tp->lock);
- pr_debug("%s: exiting interrupt, intr_status=%#4.4x.\n",
- dev->name, RTL_R16 (IntrStatus));
+ netdev_dbg(dev, "exiting interrupt, intr_status=%#4.4x\n",
+ RTL_R16(IntrStatus));
return IRQ_RETVAL(handled);
}
@@ -2233,9 +2209,8 @@ static int rtl8139_close (struct net_device *dev)
netif_stop_queue(dev);
napi_disable(&tp->napi);
- if (netif_msg_ifdown(tp))
- pr_debug("%s: Shutting down ethercard, status was 0x%4.4x.\n",
- dev->name, RTL_R16 (IntrStatus));
+ netif_dbg(tp, ifdown, dev, "Shutting down ethercard, status was 0x%04x\n",
+ RTL_R16(IntrStatus));
spin_lock_irqsave (&tp->lock, flags);
@@ -2512,8 +2487,8 @@ static void __set_rx_mode (struct net_device *dev)
int rx_mode;
u32 tmp;
- pr_debug("%s: rtl8139_set_rx_mode(%4.4x) done -- Rx config %8.8lx.\n",
- dev->name, dev->flags, RTL_R32 (RxConfig));
+ netdev_dbg(dev, "rtl8139_set_rx_mode(%04x) done -- Rx config %08lx\n",
+ dev->flags, RTL_R32(RxConfig));
/* Note: do not reorder, GCC is clever about common statements. */
if (dev->flags & IFF_PROMISC) {
--
1.7.0.14.g7e948
^ permalink raw reply related
* [PATCH net-next 01/15] drivers/net/8139cp.c: Use (pr|netdev|netif)_<level> macro helpers
From: Joe Perches @ 2010-02-18 1:01 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
In-Reply-To: <cover.1266454575.git.joe@perches.com>
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/8139cp.c | 72 +++++++++++++++++++++-----------------------------
1 files changed, 30 insertions(+), 42 deletions(-)
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 60bc0b0..3d4406b 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -46,6 +46,8 @@
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#define DRV_NAME "8139cp"
#define DRV_VERSION "1.3"
#define DRV_RELDATE "Mar 22, 2004"
@@ -104,8 +106,6 @@ static int multicast_filter_limit = 32;
module_param(multicast_filter_limit, int, 0);
MODULE_PARM_DESC (multicast_filter_limit, "8139cp: maximum number of filtered multicast addresses");
-#define PFX DRV_NAME ": "
-
#define CP_DEF_MSG_ENABLE (NETIF_MSG_DRV | \
NETIF_MSG_PROBE | \
NETIF_MSG_LINK)
@@ -470,9 +470,8 @@ static inline void cp_rx_skb (struct cp_private *cp, struct sk_buff *skb,
static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail,
u32 status, u32 len)
{
- if (netif_msg_rx_err (cp))
- pr_debug("%s: rx err, slot %d status 0x%x len %d\n",
- cp->dev->name, rx_tail, status, len);
+ netif_dbg(cp, rx_err, cp->dev, "rx err, slot %d status 0x%x len %d\n",
+ rx_tail, status, len);
cp->dev->stats.rx_errors++;
if (status & RxErrFrame)
cp->dev->stats.rx_frame_errors++;
@@ -545,9 +544,8 @@ rx_status_loop:
goto rx_next;
}
- if (netif_msg_rx_status(cp))
- pr_debug("%s: rx slot %d status 0x%x len %d\n",
- dev->name, rx_tail, status, len);
+ netif_dbg(cp, rx_status, dev, "rx slot %d status 0x%x len %d\n",
+ rx_tail, status, len);
new_skb = netdev_alloc_skb_ip_align(dev, buflen);
if (!new_skb) {
@@ -621,9 +619,8 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance)
if (!status || (status == 0xFFFF))
return IRQ_NONE;
- if (netif_msg_intr(cp))
- pr_debug("%s: intr, status %04x cmd %02x cpcmd %04x\n",
- dev->name, status, cpr8(Cmd), cpr16(CpCmd));
+ netif_dbg(cp, intr, dev, "intr, status %04x cmd %02x cpcmd %04x\n",
+ status, cpr8(Cmd), cpr16(CpCmd));
cpw16(IntrStatus, status & ~cp_rx_intr_mask);
@@ -654,8 +651,8 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance)
pci_read_config_word(cp->pdev, PCI_STATUS, &pci_status);
pci_write_config_word(cp->pdev, PCI_STATUS, pci_status);
- pr_err("%s: PCI bus error, status=%04x, PCI status=%04x\n",
- dev->name, status, pci_status);
+ netdev_err(dev, "PCI bus error, status=%04x, PCI status=%04x\n",
+ status, pci_status);
/* TODO: reset hardware */
}
@@ -700,9 +697,8 @@ static void cp_tx (struct cp_private *cp)
if (status & LastFrag) {
if (status & (TxError | TxFIFOUnder)) {
- if (netif_msg_tx_err(cp))
- pr_debug("%s: tx err, status 0x%x\n",
- cp->dev->name, status);
+ netif_dbg(cp, tx_err, cp->dev,
+ "tx err, status 0x%x\n", status);
cp->dev->stats.tx_errors++;
if (status & TxOWC)
cp->dev->stats.tx_window_errors++;
@@ -717,8 +713,8 @@ static void cp_tx (struct cp_private *cp)
((status >> TxColCntShift) & TxColCntMask);
cp->dev->stats.tx_packets++;
cp->dev->stats.tx_bytes += skb->len;
- if (netif_msg_tx_done(cp))
- pr_debug("%s: tx done, slot %d\n", cp->dev->name, tx_tail);
+ netif_dbg(cp, tx_done, cp->dev,
+ "tx done, slot %d\n", tx_tail);
}
dev_kfree_skb_irq(skb);
}
@@ -752,8 +748,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) {
netif_stop_queue(dev);
spin_unlock_irqrestore(&cp->lock, intr_flags);
- pr_err(PFX "%s: BUG! Tx Ring full when queue awake!\n",
- dev->name);
+ netdev_err(dev, "BUG! Tx Ring full when queue awake!\n");
return NETDEV_TX_BUSY;
}
@@ -878,9 +873,8 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
wmb();
}
cp->tx_head = entry;
- if (netif_msg_tx_queued(cp))
- pr_debug("%s: tx queued, slot %d, skblen %d\n",
- dev->name, entry, skb->len);
+ netif_dbg(cp, tx_queued, cp->dev, "tx queued, slot %d, skblen %d\n",
+ entry, skb->len);
if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1))
netif_stop_queue(dev);
@@ -992,7 +986,7 @@ static void cp_reset_hw (struct cp_private *cp)
schedule_timeout_uninterruptible(10);
}
- pr_err("%s: hardware reset timeout\n", cp->dev->name);
+ netdev_err(cp->dev, "hardware reset timeout\n");
}
static inline void cp_start_hw (struct cp_private *cp)
@@ -1159,8 +1153,7 @@ static int cp_open (struct net_device *dev)
struct cp_private *cp = netdev_priv(dev);
int rc;
- if (netif_msg_ifup(cp))
- pr_debug("%s: enabling interface\n", dev->name);
+ netif_dbg(cp, ifup, dev, "enabling interface\n");
rc = cp_alloc_rings(cp);
if (rc)
@@ -1194,8 +1187,7 @@ static int cp_close (struct net_device *dev)
napi_disable(&cp->napi);
- if (netif_msg_ifdown(cp))
- pr_debug("%s: disabling interface\n", dev->name);
+ netif_dbg(cp, ifdown, dev, "disabling interface\n");
spin_lock_irqsave(&cp->lock, flags);
@@ -1218,9 +1210,9 @@ static void cp_tx_timeout(struct net_device *dev)
unsigned long flags;
int rc;
- pr_warning("%s: Transmit timeout, status %2x %4x %4x %4x\n",
- dev->name, cpr8(Cmd), cpr16(CpCmd),
- cpr16(IntrStatus), cpr16(IntrMask));
+ netdev_warn(dev, "Transmit timeout, status %2x %4x %4x %4x\n",
+ cpr8(Cmd), cpr16(CpCmd),
+ cpr16(IntrStatus), cpr16(IntrMask));
spin_lock_irqsave(&cp->lock, flags);
@@ -1873,8 +1865,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision < 0x20) {
dev_info(&pdev->dev,
- "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip, use 8139too\n",
- pdev->vendor, pdev->device, pdev->revision);
+ "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip, use 8139too\n",
+ pdev->vendor, pdev->device, pdev->revision);
return -ENODEV;
}
@@ -1932,14 +1924,13 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (rc) {
dev_err(&pdev->dev,
- "No usable DMA configuration, aborting.\n");
+ "No usable DMA configuration, aborting\n");
goto err_out_res;
}
rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (rc) {
dev_err(&pdev->dev,
- "No usable consistent DMA configuration, "
- "aborting.\n");
+ "No usable consistent DMA configuration, aborting\n");
goto err_out_res;
}
}
@@ -1951,7 +1942,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (!regs) {
rc = -EIO;
dev_err(&pdev->dev, "Cannot map PCI MMIO (%Lx@%Lx)\n",
- (unsigned long long)pci_resource_len(pdev, 1),
+ (unsigned long long)pci_resource_len(pdev, 1),
(unsigned long long)pciaddr);
goto err_out_res;
}
@@ -1989,11 +1980,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (rc)
goto err_out_iomap;
- pr_info("%s: RTL-8139C+ at 0x%lx, %pM, IRQ %d\n",
- dev->name,
- dev->base_addr,
- dev->dev_addr,
- dev->irq);
+ netdev_info(dev, "RTL-8139C+ at 0x%lx, %pM, IRQ %d\n",
+ dev->base_addr, dev->dev_addr, dev->irq);
pci_set_drvdata(pdev, dev);
--
1.7.0.14.g7e948
^ permalink raw reply related
* Re: [PATCH 0/2] tun: linux socket filter support
From: David Miller @ 2010-02-18 0:35 UTC (permalink / raw)
To: mst; +Cc: herbert, paul.moore, David.Woodhouse, sri, netdev, linux-kernel
In-Reply-To: <20100214110051.GA30182@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Sun, 14 Feb 2010 13:00:51 +0200
> tun module already support RX filtering, however,
> this is limited to filtering by mac address.
> For virtio host, we also need filtering by vlan.
>
> Rather than adding this directly, it seems cleaner
> to add generic socket filter support.
Both applied to net-next-2.6, thanks!
^ permalink raw reply
* Re: [net-next PATCH v4 3/3] net: TCP thin dupack
From: David Miller @ 2010-02-18 0:33 UTC (permalink / raw)
To: apetlund
Cc: netdev, ilpo.jarvinen, eric.dumazet, hannemann, linux-kernel,
shemminger, william.allen.simpson, damian, ebiederm
In-Reply-To: <4B7AAE6E.7080600@simula.no>
From: Andreas Petlund <apetlund@simula.no>
Date: Tue, 16 Feb 2010 15:40:46 +0100
> Major changes:
> -Renamed variables, ioctl and sysctl.
> -Added sysctl documentation.
> -Removed redundant allocation
>
> Signed-off-by: Andreas Petlund <apetlund@simula.no>
Patches #2 and #3 look the same, what's going on here?
Thanks.
^ permalink raw reply
* Re: [net-next PATCH v4 2/3] net: TCP thin linear timeouts
From: David Miller @ 2010-02-18 0:32 UTC (permalink / raw)
To: apetlund
Cc: netdev, ilpo.jarvinen, eric.dumazet, hannemann, linux-kernel,
shemminger, william.allen.simpson, damian, ebiederm
In-Reply-To: <4B7AAE69.8020701@simula.no>
From: Andreas Petlund <apetlund@simula.no>
Date: Tue, 16 Feb 2010 15:40:41 +0100
> @@ -341,6 +342,8 @@ struct tcp_sock {
> u16 advmss; /* Advertised MSS */
> u8 frto_counter; /* Number of new acks after RTO */
> u8 nonagle; /* Disable Nagle algorithm? */
> + u8 thin_lto : 1,/* Use linear timeouts for thin streams */
> + thin_undef : 7;
>
There is now a gap of 3 unused bytes here in this critical
core TCP socket data structure.
Please either find a way to avoid this hole, or document
it with a comment.
^ permalink raw reply
* Re: [net-next PATCH v4 1/3] net: TCP thin-stream detection
From: David Miller @ 2010-02-18 0:32 UTC (permalink / raw)
To: apetlund
Cc: netdev, ilpo.jarvinen, eric.dumazet, hannemann, linux-kernel,
shemminger, william.allen.simpson, damian, ebiederm
In-Reply-To: <4B7AAE60.3070305@simula.no>
From: Andreas Petlund <apetlund@simula.no>
Date: Tue, 16 Feb 2010 15:40:32 +0100
>
> +/* Determines whether this is a thin stream (which may suffer from
> + * increased latency). Used to trigger latency-reducing mechanisms.*/
> +static inline unsigned int tcp_stream_is_thin(struct tcp_sock *tp)
> +{
> + return tp->packets_out < 4 && !tcp_in_initial_slowstart(tp);
> +}
> +
> /* /proc */
Please format comments:
/* Like this. */
or:
/* Like this.
* And this.
*/
Thanks.
^ permalink raw reply
* Re: regression due to "flush SAD/SPD generate false events"
From: jamal @ 2010-02-18 0:03 UTC (permalink / raw)
To: David Miller; +Cc: adobriyan, netdev
In-Reply-To: <20100217.155512.109075614.davem@davemloft.net>
On Wed, 2010-02-17 at 15:55 -0800, David Miller wrote:
> I don't think any sendmsg() method should return 0 when something
> was actually sent.
;-> Ok, I need to call it a day ;->
cheers,
jamal
^ permalink raw reply
* Re: [net-next-2.6 PATCH] cxgb3: convert to use netdev_for_each_addr
From: David Miller @ 2010-02-18 0:03 UTC (permalink / raw)
To: jpirko; +Cc: netdev, divy
In-Reply-To: <20100217222714.GF2635@psychotron.redhat.com>
From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 17 Feb 2010 23:27:14 +0100
> Removed whole t3_rx_mode structure and appropriate helpers cause they are no
> longer needed.
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Applied.
^ permalink raw reply
* Re: [net-next-2.6 PATCH] chelsio: convert to use netdev_for_each_mc_addr
From: David Miller @ 2010-02-18 0:03 UTC (permalink / raw)
To: jpirko; +Cc: netdev
In-Reply-To: <20100217215645.GD2635@psychotron.redhat.com>
From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 17 Feb 2010 22:56:45 +0100
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Applied.
^ permalink raw reply
* Re: [PACH] smsc911x: replace manual phy lookup.
From: David Miller @ 2010-02-18 0:03 UTC (permalink / raw)
To: "kirjanov, kirjanov; +Cc: steve.glendinning, jpirko, netdev
In-Reply-To: <20100217075458.GA4388@coldcone>
From: "Denis Kirjanov <kirjanov@gmail.com" <kirjanov@gmail.com>
Date: Wed, 17 Feb 2010 10:54:58 +0300
> Use phy_find_first() function instead of manual lookup.
>
> Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] mv643xx_eth: fix missing validate_addr hook
From: David Miller @ 2010-02-18 0:03 UTC (permalink / raw)
To: "kirjanov, kirjanov; +Cc: netdev
In-Reply-To: <20100217064011.GA4132@coldcone>
From: "Denis Kirjanov <kirjanov@gmail.com" <kirjanov@gmail.com>
Date: Wed, 17 Feb 2010 09:40:11 +0300
> Fix missing validate_addr hook.
>
> Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6] net: bug fix for vlan + gro issue
From: David Miller @ 2010-02-18 0:02 UTC (permalink / raw)
To: ajitk, ajitkhaparde; +Cc: herbert, kaber, netdev
In-Reply-To: <20100217062541.GA10350@serverengines.com>
From: Ajit Khaparde <ajitkhaparde@gmail.com>
Date: Wed, 17 Feb 2010 11:55:43 +0530
> Thanks Herbert. I think you meant something like this:
> + skb->protocol = eth_type_trans(skb, skb->dev);
>
> Here is the patch:-
>
> Traffic (tcp) doesnot start on a vlan interface when gro is enabled.
> Even the tcp handshake was not taking place.
> This is because, the eth_type_trans call before the netif_receive_skb
> in napi_gro_finish() resets the skb->dev to napi->dev from the previously
> set vlan netdev interface. This causes the ip_route_input to drop the
> incoming packet considering it as a packet coming from a martian source.
>
> I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7.
> With this fix, the traffic starts and the test runs fine on both vlan
> and non-vlan interfaces.
>
> CC: Herbert Xu <herbert@gondor.apana.org.au>
> CC: Patrick McHardy <kaber@trash.net>
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 1/1 V6] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver
From: David Miller @ 2010-02-18 0:02 UTC (permalink / raw)
To: kristoffer; +Cc: netdev
In-Reply-To: <1266240824-535-2-git-send-email-kristoffer@gaisler.com>
From: Kristoffer Glembo <kristoffer@gaisler.com>
Date: Mon, 15 Feb 2010 14:33:44 +0100
> Adds device driver for Aeroflex Gaisler 10/100 and 10/100/1G Ethernet MAC IP cores.
>
> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Applied.
^ permalink raw reply
* Re: [net-next PATCH] via-velocity: Enable scatter/gather IO by default
From: David Miller @ 2010-02-18 0:01 UTC (permalink / raw)
To: simon.kagstrom; +Cc: netdev, krkumar2
In-Reply-To: <20100211163955.1b1dbe2c@marrow.netinsight.se>
From: Simon Kagstrom <simon.kagstrom@netinsight.net>
Date: Thu, 11 Feb 2010 16:39:55 +0100
> Reduces CPU utilization significantly with sendfile for example.
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Applied.
^ permalink raw reply
* Re: regression due to "flush SAD/SPD generate false events"
From: David Miller @ 2010-02-17 23:55 UTC (permalink / raw)
To: hadi; +Cc: adobriyan, netdev
In-Reply-To: <1266450553.17794.165.camel@bigi>
From: jamal <hadi@cyberus.ca>
Date: Wed, 17 Feb 2010 18:49:13 -0500
> On Wed, 2010-02-17 at 15:40 -0800, David Miller wrote:
>
>> Please do, your changes are reverted so I need the whole
>> thing back.
>
> np.
> Q: Something odd i noticed when looking at pfkey (different behavior
> from netlink):
>
> pfkey_sendmsg() does at the end:
> return err ? : len;
>
> So if err was 0, it will always return the length which is
> 16 in the flush which was causing the EAGAIN Alexey saw. If i returned
> the correct error (ESRCH), it goes unfiltered.
> It sounds to me that should just unconditionaly return err, no?
I don't think any sendmsg() method should return 0 when something
was actually sent.
^ permalink raw reply
* Re: [PATCH v4 4/7] tcp: input header length, prediction, and timestamp bugs
From: David Miller @ 2010-02-17 23:50 UTC (permalink / raw)
To: william.allen.simpson; +Cc: linux-kernel, netdev, akpm, andi
In-Reply-To: <4B77966F.1030203@gmail.com>
From: William Allen Simpson <william.allen.simpson@gmail.com>
Date: Sun, 14 Feb 2010 01:21:35 -0500
> Don't use output calculated tp->tcp_header_len for input decisions.
> While the output header is usually the same as the input (same options
> in both directions), that's a poor assumption. In particular, Sack
> will
> be different. Newer options are not guaranteed.
And when SACK is present, tp->tcp_header_len will not match, and
therefore we won't do the header prediction fast path, what is what we
want.
And, SACK presence doesn't change tp->tcp_header_len on transmit.
Therefore, I see no need at all for this change.
^ permalink raw reply
* Re: regression due to "flush SAD/SPD generate false events"
From: jamal @ 2010-02-17 23:49 UTC (permalink / raw)
To: David Miller; +Cc: adobriyan, netdev
In-Reply-To: <20100217.154009.78177059.davem@davemloft.net>
On Wed, 2010-02-17 at 15:40 -0800, David Miller wrote:
> Please do, your changes are reverted so I need the whole
> thing back.
np.
Q: Something odd i noticed when looking at pfkey (different behavior
from netlink):
pfkey_sendmsg() does at the end:
return err ? : len;
So if err was 0, it will always return the length which is
16 in the flush which was causing the EAGAIN Alexey saw. If i returned
the correct error (ESRCH), it goes unfiltered.
It sounds to me that should just unconditionaly return err, no?
cheers,
jamal
^ permalink raw reply
* Re: [PATCH v5 3/7] tcp: harmonize tcp_vx_rcv header length assumptions
From: David Miller @ 2010-02-17 23:47 UTC (permalink / raw)
To: william.allen.simpson; +Cc: linux-kernel, netdev, akpm, andi
In-Reply-To: <4B77953C.7070908@gmail.com>
From: William Allen Simpson <william.allen.simpson@gmail.com>
Date: Sun, 14 Feb 2010 01:16:28 -0500
> @@ -1559,7 +1559,8 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
> return 0;
> }
>
> - if (skb->len < tcp_hdrlen(skb) || tcp_checksum_complete(skb))
> + /* Assumes header and options unchanged since checksum_init() */
> + if (tcp_checksum_complete(skb))
> goto csum_err;
>
Not true.
The skb->len can be modified by the call to sk_filter() done
by tcp_v4_rcv().
^ permalink raw reply
* Re: [PATCH v3 2/7] net: remove old tcp_optlen function
From: David Miller @ 2010-02-17 23:43 UTC (permalink / raw)
To: william.allen.simpson; +Cc: linux-kernel, netdev, akpm, mchan
In-Reply-To: <4B7793A7.1010500@gmail.com>
From: William Allen Simpson <william.allen.simpson@gmail.com>
Date: Sun, 14 Feb 2010 01:09:43 -0500
> diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
> index 65df1de..45452c5 100644
> --- a/drivers/net/bnx2.c
> +++ b/drivers/net/bnx2.c
> @@ -6352,6 +6352,8 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
> /* Called with netif_tx_lock.
> * bnx2_tx_int() runs without netif_tx_lock unless it needs to call
> * netif_wake_queue().
> + *
> + * No TCP or IP length checking, per David Miller (see commit log).
> */
This is not appropriate, please do not do this.
We do not refer to commit log messages from the source code. Many
people have the sources via some other means (tarball, distribution
source package, etc.) and won't have any idea where to get this
information.
Also, you don't need to single me out personally. This is an
implication of the structure of the code that I've merely explained to
you, it's not some rule I've personally decided upon.
Thanks.
^ permalink raw reply
* Re: regression due to "flush SAD/SPD generate false events"
From: David Miller @ 2010-02-17 23:40 UTC (permalink / raw)
To: hadi; +Cc: adobriyan, netdev
In-Reply-To: <1266449678.17794.160.camel@bigi>
From: jamal <hadi@cyberus.ca>
Date: Wed, 17 Feb 2010 18:34:38 -0500
> On Wed, 2010-02-17 at 13:42 -0800, David Miller wrote:
>
>> Jamal, if you can find a way to do this without breaking
>> existing applications feel free to send a new version of
>> these patches.
>
> I sent incremental patch. If you still want me to resend
> the whole thing i could after Alexey responds.
Please do, your changes are reverted so I need the whole
thing back.
^ permalink raw reply
* Re: regression due to "flush SAD/SPD generate false events"
From: jamal @ 2010-02-17 23:34 UTC (permalink / raw)
To: David Miller; +Cc: adobriyan, netdev
In-Reply-To: <20100217.134217.244120118.davem@davemloft.net>
On Wed, 2010-02-17 at 13:42 -0800, David Miller wrote:
> Jamal, if you can find a way to do this without breaking
> existing applications feel free to send a new version of
> these patches.
I sent incremental patch. If you still want me to resend
the whole thing i could after Alexey responds.
cheers,
jamal
^ permalink raw reply
* Re: regression due to "flush SAD/SPD generate false events"
From: jamal @ 2010-02-17 23:32 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: davem, netdev
In-Reply-To: <1266448038.17794.135.camel@bigi>
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
On Wed, 2010-02-17 at 18:07 -0500, jamal wrote:
> When you flush
> an empty table, the time goes up from about 1.5s
> to 3 secs with pfkey. You also see the EAGAIN for
> each flush ...
> I am going to dig a little more ..
Here is a fix. The speed is restored (actually looks a little better
now) - the only thing is if you try to flush an empty table we return
-ESRCH; this seems reasonable, no? So a script like following
---
#!/usr/sbin/setkey -f
flush;
spdflush;
----
will get:
---
bigismall:~# time setkey -f ./setkey-sample
The result of line 2: No such process.
The result of line 3: No such process.
real 0m0.663s
user 0m0.080s
sys 0m0.128s
----
cheers,
jamal
[-- Attachment #2: incr-flush-pfkey --]
[-- Type: text/x-patch, Size: 759 bytes --]
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 8b8e26a..79d2c0f 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1751,7 +1751,7 @@ static int pfkey_flush(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hd
audit_info.secid = 0;
err = xfrm_state_flush(net, proto, &audit_info);
if (err)
- return 0;
+ return err;
c.data.proto = proto;
c.seq = hdr->sadb_msg_seq;
c.pid = hdr->sadb_msg_pid;
@@ -2713,7 +2713,7 @@ static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, struct sadb_msg
audit_info.secid = 0;
err = xfrm_policy_flush(net, XFRM_POLICY_TYPE_MAIN, &audit_info);
if (err)
- return 0;
+ return err;
c.data.type = XFRM_POLICY_TYPE_MAIN;
c.event = XFRM_MSG_FLUSHPOLICY;
c.pid = hdr->sadb_msg_pid;
^ permalink raw reply related
* Re: regression due to "flush SAD/SPD generate false events"
From: jamal @ 2010-02-17 23:07 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: davem, netdev
In-Reply-To: <1266442972.17794.51.camel@bigi>
On Wed, 2010-02-17 at 16:42 -0500, jamal wrote:
> I will try to reproduce it in about an hour. Do you have
> anything like selinux being used etc?
I have reproduced it - thanks Alexey. When you flush
an empty table, the time goes up from about 1.5s
to 3 secs with pfkey. You also see the EAGAIN for
each flush ...
I am going to dig a little more ..
cheers,
jamal
^ permalink raw reply
* Re: ixgbe_clean_tx_irq: tx hang 1 detected, resetting adapter (2.6.32.8)
From: Jesse Brandeburg @ 2010-02-17 22:53 UTC (permalink / raw)
To: Jesper Krogh; +Cc: linux-nfs, netdev, Jesse Brandeburg
In-Reply-To: <4B7824F1.6000202@krogh.cc>
On Sun, Feb 14, 2010 at 8:29 AM, Jesper Krogh <jesper@krogh.cc> wrote:
> Hi List.
>
> I have tried to get a dual bond of 2 x 10G NICs using the
> Intel Corporation 82598EB 10-Gigabit AT2 Server Adapter (rev 01)
> going. As first it looked like it "just worked" but when tried to fill
> the links with data one of the NIC's (eth7) hang and did a reset of
> itself, so all data was pushed through the other NIC in the bond (eth8)
>
> Full dmesg below, but I think the important part is this:
>
> [ 2162.745354] ixgbe: eth7: ixgbe_check_tx_hang: Detected Tx Unit Hang
> [ 2162.745356] Tx Queue <4>
> [ 2162.745356] TDH, TDT <e1>, <cc>
> [ 2162.745357] next_to_use <cc>
> [ 2162.745358] next_to_clean <e1>
> [ 2162.745359] tx_buffer_info[next_to_clean]
> [ 2162.745359] time_stamp <1000713d3>
> [ 2162.745360] jiffies <10007152e>
> [ 2163.162478] ixgbe: eth7: ixgbe_clean_tx_irq: tx hang 1 detected,
> resetting adapter
> [ 2163.357333] bonding: bond0: link status definitely down for interface
> eth7, disabling it
> [ 2168.670342] ixgbe: eth7 NIC Link is Up 10 Gbps, Flow Control: None
Hi Jesper, my first thought was flow control, but I can see you have it off.
Can we get some more details on the hardware and bios version? What
about some dmidecode output. I'm checking here if we have any
hardware like this.
are you running ubuntu 9.10 or something else?
Wow, thats a monster machine, 8 nodes, 128GB ram. Can we get a full
lspci -vvv output, as well as ethtool -e eth7 and eth8
32 has ixgbe with a known issue of multiple mappings on transmit
possibly causing some problems, could it be that you're running into
this? can you apply commit e5a43549f7a58509a91b299a51337d386697b92c
and see if it fixes your issue?
^ permalink raw reply
* Re: [net-next-2.6 PATCH 1/3] vlan: adds vlan_dev_select_queue
From: Vasu Dev @ 2010-02-17 22:40 UTC (permalink / raw)
To: David Miller, eric.dumazet; +Cc: jeffrey.t.kirsher, netdev, gospo, vasu.dev
In-Reply-To: <20100217.134330.48386140.davem@davemloft.net>
On Wed, 2010-02-17 at 13:43 -0800, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 17 Feb 2010 14:51:15 +0100
>
> > This is a bit dangerous and deserves a self contained patch IMHO.
> >
OK, I'll create separate patch for this.
> > I would add for example a
> > BUG_ON(vlandev->real_num_tx_queues > vlandev->num_tx_queues)
> >
I'll add this.
> > ------------------
> >
> > For performance reason, we could avoid calling vlan_dev_select_queue()
> > for real devices without ndo_select_queue() handler, this would need to
> > mirror vlan_netdev_ops & vlan_netdev_accel_ops.
> >
This means vlan_netdev_ops & vlan_netdev_accel_ops not to be const
anymore so that vlan_dev_select_queue() could be initialized to vlan ops
based on real dev ndo_select_queue() present or not, should be okay to
be not const anymore. I'll update patch as suggested.
> > It would also make vlan_dev_select_queue shorter and not duplicates
> > internals of net/dev/core.c :
> >
Good reasons.
> > static u16 vlan_dev_select_queue(struct net_device *dev, struct sk_buff
> > *skb)
> > {
> > struct net_device *rdev = vlan_dev_info(dev)->real_dev;
> > const struct net_device_ops *ops = rdev->netdev_ops;
> >
> > return ops->ndo_select_queue(rdev, skb);
> > }
> >
> >
>
> Jeff, please resubmit this patch set after addressing
> Eric's feedback.
>
I'm updating patches per Eric's feedback to have Jeff resubmit these
patches.
Vasu
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox