LKCD Network dump over netpoll patch (2.6.0-test9)
Subsystems (2)
Hi,
This patch includes LKCD networkdump code changes over netpoll API's for kernel version 2.6.0-test9. Both the netconsole and network dumping can be achieved. Procedure for netdumping is explained below:
1. Apply the netpoll-core.patch and netconsole.patch (http://www.selenic.com/netpoll/)
2. Download the LKCD code from the cvs using
cvs -d:pserver:[email protected]:/cvsroot/lkcd login (presee enter key for passwd)
cvs -z3 -d:pserver:[email protected]:/cvsroot/lkcd co 2.6 cvs -z3 -d:pserver:[email protected]:/cvsroot/lkcd co lkcdutils
3. Copy the lkcd files to the kernel source directory.
#cp -r ../2.6/* ./linux-2.6-test9/
4. Apply the kernel-changes.patch from the 2.6/patches directory.
5. Apply the pollcontroller.patch from the 2.6/patches
directory now.
6. Apply the lkcd-netpoll.patch(below)
7. Buid the kernel with LKCD network dumping enabled ;reboot and insert the dump_netdev.o module.
8. You also need to install and setup the lkcdutils. #./configure; make ; make install.
#cd netdump
#make; make install.
9. Configure the netdump fileds in the /etc/sysconfig/dump file.
#you need to specify the local port,remote port, local ip, target ip and device name for netdump. eg : DUMP_ACTIVE=1 DUMPDEV=eth0 DUMPDIR=/var/log/dump DUMP_SAVE=1 DUMP_LEVEL=2 DUMP_FLAGS=0x40000000 DUMP_COMPRESS=0 PANIC_TIMEOUT=5 TARGET_HOST=9.182.14.40 #h set this to vaild hostname/IP TARGET_PORT=6688 SOURCE_PORT=6688 ETH_ADDRESS=00:07:95:E6:08:FB
10. Run lkcd config and now you can try test dumps..
drivers/net/3c59x.c +27 -0
@@ -900,6 +900,7 @@ static void set_rx_mode(struct net_devicstatic int vortex_ioctl (struct net_device *dev,struct ifreq *rq,int cmd);static void vortex_tx_timeout (struct net_device *dev);static void acpi_set_WOL (struct net_device *dev); +static void vorboom_poll (struct net_device *dev);static struct ethtool_ops vortex_ethtool_ops;/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
@@ -1450,6 +1451,9 @@ static int __devinit vortex_probe1(struc dev->set_multicast_list = set_rx_mode; dev->tx_timeout = vortex_tx_timeout; dev->watchdog_timeo = (watchdog *HZ ) /1000 ; +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &vorboom_poll; +#endif if (pdev) { vp->pm_state_valid =1 ;pci_save_state (VORTEX_PCI (vp), vp->power_state);
@@ -2440,6 +2444,29 @@ handler_exit:return IRQ_HANDLED ; } +#ifdef HAVE_POLL_CONTROLLER + +/* +* Polling 'interrupt' - used by things like netconsole to send skbs +* without having to re-enable interrupts. It's not called while +* the interrupt routine is executing. +*/ + +static void vorboom_poll (struct net_device *dev) +{ +struct vortex_private *vp = (struct vortex_private *)dev->priv; + +disable_irq (dev->irq); +if (vp->full_bus_master_tx) +boomerang_interrupt (dev->irq, dev,0 ); +else +vortex_interrupt (dev->irq, dev,0 ); +enable_irq (dev->irq); +} + +#endif + +static int vortex_rx (struct net_device *dev) {struct vortex_private *vp = (struct vortex_private *)dev->priv;
drivers/net/e100/e100_main.c +19 -0
@@ -539,6 +539,22 @@ e100_trigger_SWI(struct e100_private *bdreadw (&(bdp->scb->scb_status));/* flushes last write, read-safe */ } +#ifdef HAVE_POLL_CONTROLLER + +/* +* Polling 'interrupt' - used by things like netconsole to send skbs +* without having to re-enable interrupts. It's not called while +* the interrupt routine is executing. +*/ +static void +e100_poll (struct net_device *dev) +{ +disable_irq (dev->irq); +e100intr (dev->irq, dev,NULL ); +enable_irq (dev->irq); +} +#endif +static int __devinit e100_found1 (struct pci_dev *pcid,const struct pci_device_id *ent) {
@@ -557,6 +573,9 @@ e100_found1(struct pci_dev *pcid, constSET_MODULE_OWNER (dev); +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &e100_poll; +#endif if (first_time) { first_time = false; printk(KERN_NOTICE "%s - version %s\n",
drivers/net/e1000/e1000_main.c +13 -0
@@ -165,6 +165,7 @@ static void e1000_leave_82542_rst(structstatic inline void e1000_rx_checksum (struct e1000_adapter *adapter,struct e1000_rx_desc *rx_desc,struct sk_buff *skb); +static void e1000_Poll (struct net_device *dev);static void e1000_tx_timeout (struct net_device *dev);static void e1000_tx_timeout_task (struct net_device *dev);static void e1000_smartspeed (struct e1000_adapter *adapter);
@@ -442,6 +443,9 @@ e1000_probe(struct pci_dev *pdev, adapter->bd_number = cards_found; +#ifdef HAVE_POLL_CONTROLLER + netdev->poll_controller = &e1000_Poll; +#endif /* setup the private structure */ if ((err =e1000_sw_init (adapter)))
@@ -2106,6 +2110,15 @@ e1000_intr(int irq, void *data, struct pmod_timer (&adapter->watchdog_timer, jiffies); } +#ifdef HAVE_POLL_CONTROLLER +static void e1000_Poll (struct net_device *dev) +{ +disable_irq (dev->irq); +e1000_intr (dev->irq, dev,NULL ); +enable_irq (dev->irq); +} +#endif +#ifdef CONFIG_E1000_NAPI if (netif_rx_schedule_prep (netdev)) {
drivers/net/eepro100.c +21 -0
@@ -543,6 +543,7 @@ static void speedo_refill_rx_buffers(strstatic int speedo_rx (struct net_device *dev);static void speedo_tx_buffer_gc (struct net_device *dev);static irqreturn_t speedo_interrupt (int irq,void *dev_instance,struct pt_regs *regs); +static void poll_speedo (struct net_device *dev);static int speedo_close (struct net_device *dev);static struct net_device_stats *speedo_get_stats (struct net_device *dev);static int speedo_ioctl (struct net_device *dev,struct ifreq *rq,int cmd);
@@ -885,6 +886,9 @@ static int __devinit speedo_found1(struc dev->get_stats = &speedo_get_stats; dev->set_multicast_list = &set_rx_mode; dev->do_ioctl = &speedo_ioctl; +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &poll_speedo; +#endif if (register_netdevice (dev)) goto err_free_unlock;
@@ -1675,6 +1679,23 @@ static irqreturn_t speedo_interrupt(intreturn IRQ_RETVAL (handled); } +#ifdef HAVE_POLL_CONTROLLER + +/* +* Polling 'interrupt' - used by things like netconsole to send skbs +* without having to re-enable interrupts. It's not called while +* the interrupt routine is executing. +*/ + +static void poll_speedo (struct net_device *dev) +{ +disable_irq (dev->irq); +speedo_interrupt (dev->irq, dev,NULL ); +enable_irq (dev->irq); +} + +#endif +static inline struct RxFD *speedo_rx_alloc (struct net_device *dev,int entry) {struct speedo_private *sp = (struct speedo_private *)dev->priv;
drivers/net/smc-ultra.c +11 -0
@@ -122,6 +122,14 @@ MODULE_DEVICE_TABLE(isapnp, ultra_device#define ULTRA_IO_EXTENT 32#define EN0_ERWCNT 0x08/* Early receive warning count. */ + +static void ultra_poll (struct net_device *dev) +{ +disable_irq (dev->irq); +ei_interrupt (dev->irq, dev,NULL ); +enable_irq (dev->irq); +} +/* Probe for the Ultra. This looks like a 8013 with the station address PROM at I/O ports <base>+8 to <base>+13, with a checksum following.
@@ -134,6 +142,9 @@ int __init ultra_probe(struct net_deviceSET_MODULE_OWNER (dev); +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &ultra_poll; +#endif if (base_addr >0x1ff )/* Check a single specified location. */ return ultra_probe1 (dev, base_addr);else if (base_addr !=0 )/* Don't probe at all. */
drivers/net/tlan.c +13 -1
@@ -346,6 +346,8 @@ static int TLan_EeSendByte( u16, u8, intstatic void TLan_EeReceiveByte (u16 ,u8 *,int );static int TLan_EeReadByte (struct net_device *,u8 ,u8 * ); +static void TLan_Poll (struct net_device *); +static void TLan_StoreSKB (struct tlan_list_tag *tag,struct sk_buff *skb)
@@ -893,6 +895,9 @@ static int TLan_Init( struct net_device dev->get_stats = &TLan_GetStats; dev->set_multicast_list = &TLan_SetMulticastList; dev->do_ioctl = &TLan_ioctl; +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &TLan_Poll; +#endif dev->tx_timeout = &TLan_tx_timeout; dev->watchdog_timeo =TX_TIMEOUT ;
@@ -1176,7 +1181,14 @@ static irqreturn_t TLan_HandleInterrupt(return IRQ_HANDLED ; }/* TLan_HandleInterrupts */ - +#ifdef HAVE_POLL_CONTROLLER +static void TLan_Poll (struct net_device *dev) +{ +disable_irq (dev->irq); +TLan_HandleInterrupt (dev->irq, dev,NULL ); +enable_irq (dev->irq); +} +#endif /***************************************************************
drivers/net/tulip/tulip_core.c +22 -0
@@ -247,6 +247,7 @@ static void tulip_down(struct net_devicestatic struct net_device_stats *tulip_get_stats (struct net_device *dev);static int private_ioctl (struct net_device *dev,struct ifreq *rq,int cmd);static void set_rx_mode (struct net_device *dev); +static void poll_tulip (struct net_device *dev);
@@ -1632,6 +1633,9 @@ static int __devinit tulip_init_one (str dev->get_stats = tulip_get_stats; dev->do_ioctl = private_ioctl; dev->set_multicast_list = set_rx_mode; +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &poll_tulip; +#endif if (register_netdev (dev)) goto err_out_free_ring;
@@ -1789,6 +1793,24 @@ static void __devexit tulip_remove_one ( } +#ifdef HAVE_POLL_CONTROLLER + +/* +* Polling 'interrupt' - used by things like netconsole to send skbs +* without having to re-enable interrupts. It's not called while +* the interrupt routine is executing. +*/ + +static void poll_tulip (struct net_device *dev) +{ +disable_irq (dev->irq); +tulip_interrupt (dev->irq, dev,NULL ); +enable_irq (dev->irq); +} + +#endif + +static struct pci_driver tulip_driver = { .name =DRV_NAME , .id_table = tulip_pci_tbl,
include/linux/netdevice.h +2 -2
@@ -455,10 +455,10 @@ struct net_device#ifdef CONFIG_NETPOLL_RX int netpoll_rx;#endif +#define HAVE_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER -void (*poll_controller)(struct net_device *dev); +void (*poll_controller)(struct net_device *dev);#endif -/* bridge stuff */ struct net_bridge_port *br_port;
net/core/dev.c +0 -2
@@ -1387,8 +1387,6 @@ int netif_rx(struct sk_buff *skb) }#endif -if (!skb->stamp.tv_sec) -do_gettimeofday (&skb->stamp);/* * The code is rearranged so that the path is the most
Signature · 4 lines
Thanks & Regards Prasanna S Panchamukhi Linux Technology Center India Software Labs, IBM Bangalore