Open-FCoE Features for 2.6.31
Subsystems (2)
cover Open-FCoE Features for 2.6.31
The following series consists of logging improvements, watchdog and locking optimizations and the move of the FIP protocol definition to a more appropriate header file.
These patches apply to scsi-misc-post-merge with net-next-2.6 merged in. Some fcoe/ code was touched by a net-next change (storage MAC address addition and usage) and since the logging changes touch so many lines it created this dependency.
These patches may or may not depend on the other five outstanding Open-FCoE fixes as discussed on linux-scsi. Those five patches were in the tree that this code was tested on before this submission.
---
Robert Love (4):
libfc: Add runtime debugging with debug_logging module parameter
libfcoe: Add runtime debugging with module param debug_logging
fcoe: Add runtime debug logging with module parameter debug_logging net, libfcoe: Add the FCoE Initialization Protocol ethertype
Vasu Dev (2):
fcoe: removes fcoe_watchdog
fcoe: reduces lock cost when adding a new skb to fcoe_pending_queue
drivers/scsi/fcoe/fcoe.c | 195 ++++++++++++++++++----------------------- drivers/scsi/fcoe/fcoe.h | 25 +++++ drivers/scsi/fcoe/libfcoe.c | 94 +++++++++++--------- drivers/scsi/libfc/fc_disc.c | 83 +++++++---------- drivers/scsi/libfc/fc_exch.c | 58 +++++------- drivers/scsi/libfc/fc_fcp.c | 97 +++++++++++--------- drivers/scsi/libfc/fc_lport.c | 156 ++++++++++++++++----------------- drivers/scsi/libfc/fc_rport.c | 120 +++++++++++-------------- include/linux/if_ether.h | 1 include/scsi/fc/fc_fip.h | 7 - include/scsi/fc_encode.h | 2 include/scsi/libfc.h | 77 ++++++++++++++-- 12 files changed, 466 insertions(+), 449 deletions(-)
Signature · 1 line
//Rob
PATCH 1/6 fcoe: reduces lock cost when adding a new skb to fcoe_pending_queue
From: Vasu Dev <[email protected]>
Currently fcoe_pending_queue.lock held twice for every new skb adding to this queue when already least one pkt is pending in this queue and that is not uncommon once skb pkts starts getting queued here upon fcoe_start_io => dev_queue_xmit failure.
This patch moves most fcoe_pending_queue logic to fcoe_check_wait_queue function, this new logic grabs fcoe_pending_queue.lock only once to add a new skb instead twice as used to be.
I think after this patch call flow around fcoe_check_wait_queue calling in fcoe_xmit is bit simplified with modified fcoe_check_wait_queue function taking care of adding and removing pending skb in one function.
---
drivers/scsi/fcoe/fcoe.c | 37 +++++++++++++++---------------------- 1 files changed, 15 insertions(+), 22 deletions(-)
drivers/scsi/fcoe/fcoe.c +15 -22
@@ -71,7 +71,7 @@ static struct fc_lport *fcoe_hostlist_lookup(const struct net_device *);static int fcoe_hostlist_add (const struct fc_lport *);static int fcoe_hostlist_remove (const struct fc_lport *); -static int fcoe_check_wait_queue (struct fc_lport *); +static void fcoe_check_wait_queue (struct fc_lport *,struct sk_buff *);static int fcoe_device_notification (struct notifier_block *,ulong ,void *);static void fcoe_dev_setup (void );static void fcoe_dev_cleanup (void );
@@ -1024,7 +1024,7 @@ u32 fcoe_fc_crc(struct fc_frame *fp)*/ int fcoe_xmit (struct fc_lport *lp,struct fc_frame *fp) { -int wlen, rc =0 ; +int wlen;u32 crc;struct ethhdr *eh;struct fcoe_crc_eof *cp;
@@ -1142,18 +1142,9 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp)/* send down to lld */ fr_dev (fp) = lp;if (fc->fcoe_pending_queue.qlen) - rc =fcoe_check_wait_queue (lp); - -if (rc ==0 ) - rc =fcoe_start_io (skb); - -if (rc) { -spin_lock_bh (&fc->fcoe_pending_queue.lock); -__skb_queue_tail (&fc->fcoe_pending_queue, skb); -spin_unlock_bh (&fc->fcoe_pending_queue.lock); -if (fc->fcoe_pending_queue.qlen >FCOE_MAX_QUEUE_DEPTH ) - lp->qfull =1 ; - } +fcoe_check_wait_queue (lp, skb); +else if (fcoe_start_io (skb)) +fcoe_check_wait_queue (lp, skb);return 0 ; }
@@ -1319,7 +1310,7 @@ void fcoe_watchdog(ulong vp)read_lock (&fcoe_hostlist_lock);list_for_each_entry (fc, &fcoe_hostlist, list) {if (fc->ctlr.lp) -fcoe_check_wait_queue (fc->ctlr.lp); +fcoe_check_wait_queue (fc->ctlr.lp,NULL ); }read_unlock (&fcoe_hostlist_lock);
@@ -1340,16 +1331,17 @@ void fcoe_watchdog(ulong vp)* The wait_queue is used when the skb transmit fails. skb will go * in the wait_queue which will be emptied by the timer function or * by the next skb transmit. -* -* Returns: 0 for success */ -static int fcoe_check_wait_queue (struct fc_lport *lp) +static void fcoe_check_wait_queue (struct fc_lport *lp,struct sk_buff *skb) {struct fcoe_softc *fc =lport_priv (lp); -struct sk_buff *skb; -int rc =-1 ; +int rc;spin_lock_bh (&fc->fcoe_pending_queue.lock); + +if (skb) +__skb_queue_tail (&fc->fcoe_pending_queue, skb); +if (fc->fcoe_pending_queue_active) goto out; fc->fcoe_pending_queue_active =1 ;
@@ -1376,10 +1368,11 @@ static int fcoe_check_wait_queue(struct fc_lport *lp)if (fc->fcoe_pending_queue.qlen <FCOE_LOW_QUEUE_DEPTH ) lp->qfull =0 ; fc->fcoe_pending_queue_active =0 ; - rc = fc->fcoe_pending_queue.qlen; out: +if (fc->fcoe_pending_queue.qlen >FCOE_MAX_QUEUE_DEPTH ) + lp->qfull =1 ;spin_unlock_bh (&fc->fcoe_pending_queue.lock); -return rc; +return ; }/**
PATCH 2/6 fcoe: removes fcoe_watchdog
In reply to Robert LoveFrom: Vasu Dev <[email protected]>
Removes periodic fcoe_watchdog timer used across all fcoe interface maintained in fcoe_hostlist instead added new fcoe_queue_timer per fcoe interface.
Added timer is armed only when some pending skb need to be flushed as oppose to periodic 1 second fcoe_watchdog, since now fcoe_queue_timer is used on demand thus set this to 2 jiffies.
Now fcoe_queue_timer is much simple than fcoe_watchdog using lock to process all fcoe interface from fcoe_hostlist.
I noticed +ve performance result with using 2 jiffies timer as this helps flushing fcoe_pending_queue quickly.
---
drivers/scsi/fcoe/fcoe.c | 52 ++++++++++++++++------------------------------ drivers/scsi/fcoe/fcoe.h | 1 + 2 files changed, 19 insertions(+), 34 deletions(-)
drivers/scsi/fcoe/fcoe.c +18 -34
@@ -54,7 +54,6 @@ MODULE_LICENSE("GPL v2");/* fcoe host list */ LIST_HEAD (fcoe_hostlist);DEFINE_RWLOCK (fcoe_hostlist_lock); -DEFINE_TIMER (fcoe_timer,NULL ,0 ,0 ); DEFINE_PER_CPU(struct fcoe_percpu_s, fcoe_percpu);/* Function Prototypes */
@@ -246,6 +245,18 @@ void fcoe_netdev_cleanup(struct fcoe_softc *fc) }/** +* fcoe_queue_timer() - fcoe queue timer +* @lp: the fc_lport pointer +* +* Calls fcoe_check_wait_queue on timeout +* +*/ +static void fcoe_queue_timer (ulong lp) +{ +fcoe_check_wait_queue ((struct fc_lport *)lp,NULL ); +} + +/** * fcoe_netdev_config() - Set up netdev for SW FCoE * @lp : ptr to the fc_lport * @netdev : ptr to the associated netdevice struct
@@ -316,6 +327,7 @@ static int fcoe_netdev_config(struct fc_lport *lp, struct net_device *netdev) }skb_queue_head_init (&fc->fcoe_pending_queue); fc->fcoe_pending_queue_active =0 ; +setup_timer (&fc->timer, fcoe_queue_timer, (unsigned long )lp);/* look for SAN MAC address, if multiple SAN MACs exist, only * use the first one for SPMA */
@@ -477,6 +489,9 @@ static int fcoe_if_destroy(struct net_device *netdev)/* Free existing skbs */ fcoe_clean_pending_queue (lp); +/* Stop the timer */ +del_timer_sync (&fc->timer); +/* Free memory used by statistical counters */ fc_lport_free_stats (lp);
@@ -1294,32 +1309,6 @@ int fcoe_percpu_receive_thread(void *arg) }/** -* fcoe_watchdog() - fcoe timer callback -* @vp: -* -* This checks the pending queue length for fcoe and set lport qfull -* if the FCOE_MAX_QUEUE_DEPTH is reached. This is done for all fc_lport on the -* fcoe_hostlist. -* -* Returns: 0 for success -*/ -void fcoe_watchdog (ulong vp) -{ -struct fcoe_softc *fc; - -read_lock (&fcoe_hostlist_lock); -list_for_each_entry (fc, &fcoe_hostlist, list) { -if (fc->ctlr.lp) -fcoe_check_wait_queue (fc->ctlr.lp,NULL ); - } -read_unlock (&fcoe_hostlist_lock); - - fcoe_timer.expires = jiffies + (1 *HZ ); -add_timer (&fcoe_timer); -} - - -/** * fcoe_check_wait_queue() - attempt to clear the transmit backlog * @lp: the fc_lport *
@@ -1367,6 +1356,8 @@ static void fcoe_check_wait_queue(struct fc_lport *lp, struct sk_buff *skb)if (fc->fcoe_pending_queue.qlen <FCOE_LOW_QUEUE_DEPTH ) lp->qfull =0 ; +if (fc->fcoe_pending_queue.qlen && !timer_pending (&fc->timer)) +mod_timer (&fc->timer, jiffies +2 ); fc->fcoe_pending_queue_active =0 ; out:if (fc->fcoe_pending_queue.qlen >FCOE_MAX_QUEUE_DEPTH )
@@ -1843,10 +1834,6 @@ static int __init fcoe_init(void)/* Setup link change notification */ fcoe_dev_setup (); -setup_timer (&fcoe_timer, fcoe_watchdog,0 ); - -mod_timer (&fcoe_timer, jiffies + (10 *HZ )); -fcoe_if_init ();return 0 ;
@@ -1872,9 +1859,6 @@ static void __exit fcoe_exit(void)fcoe_dev_cleanup (); -/* Stop the timer */ -del_timer_sync (&fcoe_timer); -/* releases the associated fcoe hosts */ list_for_each_entry_safe (fc, tmp, &fcoe_hostlist, list)fcoe_if_destroy (fc->real_dev);
drivers/scsi/fcoe/fcoe.h +1 -0
@@ -61,6 +61,7 @@ struct fcoe_softc {struct packet_type fip_packet_type;struct sk_buff_head fcoe_pending_queue;u8 fcoe_pending_queue_active; +struct timer_list timer;/* queue timer */ struct fcoe_ctlr ctlr; };
PATCH 4/6 fcoe: Add runtime debug logging with module parameter debug_logging
In reply to Robert LoveThis patch converts all FC_DBG statements to use new runtime tunable debug macros. The fcoe.ko module now has a debug_logging module parameter.
fcoe_debug_logging is an unsigned integer representing a bitmask of all available logging levels. Currently only two logging levels are supported-
bit
LSB 0 = general fcoe logging
1 = netdevice related logging
This patch also attempts to clean up some debug statement formatting so it's more readable.
---
drivers/scsi/fcoe/fcoe.c | 108 +++++++++++++++++++++++----------------------- drivers/scsi/fcoe/fcoe.h | 24 ++++++++++ 2 files changed, 77 insertions(+), 55 deletions(-)
drivers/scsi/fcoe/fcoe.c +53 -55
@@ -45,8 +45,6 @@#include "fcoe.h" -static int debug_fcoe; -MODULE_AUTHOR ("Open-FCoE.org" );MODULE_DESCRIPTION ("FCoE" );MODULE_LICENSE ("GPL v2" );
@@ -307,23 +305,22 @@ static int fcoe_netdev_config(struct fc_lport *lp, struct net_device *netdev)#ifdef NETIF_F_FCOE_CRC if (netdev->features &NETIF_F_FCOE_CRC ) { lp->crc_offload =1 ; -printk (KERN_DEBUG "fcoe:%s supports FCCRC offload\n" , - netdev->name); +FCOE_NETDEV_DBG (netdev,"Supports FCCRC offload\n" ); }#endif #ifdef NETIF_F_FSO if (netdev->features &NETIF_F_FSO ) { lp->seq_offload =1 ; lp->lso_max = netdev->gso_max_size; -printk (KERN_DEBUG "fcoe:%s supports LSO for max len 0x%x\n" , - netdev->name, lp->lso_max); +FCOE_NETDEV_DBG (netdev,"Supports LSO for max len 0x%x\n" , + lp->lso_max); }#endif if (netdev->fcoe_ddp_xid) { lp->lro_enabled =1 ; lp->lro_xid = netdev->fcoe_ddp_xid; -printk (KERN_DEBUG "fcoe:%s supports LRO for max xid 0x%x\n" , - netdev->name, lp->lro_xid); +FCOE_NETDEV_DBG (netdev,"Supports LRO for max xid 0x%x\n" , + lp->lro_xid); }skb_queue_head_init (&fc->fcoe_pending_queue); fc->fcoe_pending_queue_active =0 ;
@@ -409,7 +406,8 @@ static int fcoe_shost_config(struct fc_lport *lp, struct Scsi_Host *shost,/* add the new host to the SCSI-ml */ rc =scsi_add_host (lp->host, dev);if (rc) { -FC_DBG ("fcoe_shost_config:error on scsi_add_host\n" ); +FCOE_NETDEV_DBG (fcoe_netdev (lp),"fcoe_shost_config: " +"error on scsi_add_host\n" );return rc; } sprintf(fc_host_symbolic_name(lp->host), "%s v%s over %s",
@@ -450,8 +448,7 @@ static int fcoe_if_destroy(struct net_device *netdev)BUG_ON (!netdev); -printk (KERN_DEBUG "fcoe_if_destroy:interface on %s\n" , - netdev->name); +FCOE_NETDEV_DBG (netdev,"Destroying interface\n" ); lp =fcoe_hostlist_lookup (netdev);if (!lp)
@@ -562,8 +559,7 @@ static int fcoe_if_create(struct net_device *netdev)BUG_ON (!netdev); -printk (KERN_DEBUG "fcoe_if_create:interface on %s\n" , - netdev->name); +FCOE_NETDEV_DBG (netdev,"Create Interface\n" ); lp =fcoe_hostlist_lookup (netdev);if (lp)
@@ -572,7 +568,7 @@ static int fcoe_if_create(struct net_device *netdev) shost =libfc_host_alloc (&fcoe_shost_template,sizeof (struct fcoe_softc ));if (!shost) { -FC_DBG ("Could not allocate host structure\n" ); +FCOE_NETDEV_DBG (netdev,"Could not allocate host structure\n" );return -ENOMEM ; } lp =shost_priv (shost);
@@ -581,7 +577,8 @@ static int fcoe_if_create(struct net_device *netdev)/* configure fc_lport, e.g., em */ rc =fcoe_lport_config (lp);if (rc) { -FC_DBG ("Could not configure lport\n" ); +FCOE_NETDEV_DBG (netdev,"Could not configure lport for the " +"interface\n" ); goto out_host_put; }
@@ -595,28 +592,32 @@ static int fcoe_if_create(struct net_device *netdev)/* configure lport network properties */ rc =fcoe_netdev_config (lp, netdev);if (rc) { -FC_DBG ("Could not configure netdev for the interface\n" ); +FCOE_NETDEV_DBG (netdev,"Could not configure netdev for the " +"interface\n" ); goto out_netdev_cleanup; }/* configure lport scsi host properties */ rc =fcoe_shost_config (lp, shost, &netdev->dev);if (rc) { -FC_DBG ("Could not configure shost for lport\n" ); +FCOE_NETDEV_DBG (netdev,"Could not configure shost for the " +"interface\n" ); goto out_netdev_cleanup; }/* lport exch manager allocation */ rc =fcoe_em_config (lp);if (rc) { -FC_DBG ("Could not configure em for lport\n" ); +FCOE_NETDEV_DBG (netdev,"Could not configure the EM for the " +"interface\n" ); goto out_netdev_cleanup; }/* Initialize the library */ rc =fcoe_libfc_config (lp, &fcoe_libfc_fcn_templ);if (rc) { -FC_DBG ("Could not configure libfc for lport!\n" ); +FCOE_NETDEV_DBG (netdev,"Could not configure libfc for the " +"interface\n" ); goto out_lp_destroy; }
@@ -655,7 +656,7 @@ static int __init fcoe_if_init(void)fc_attach_transport (&fcoe_transport_function);if (!scsi_transport_fcoe_sw) { -printk (KERN_ERR "fcoe_init:fc_attach_transport() failed\n" ); +printk (KERN_ERR "fcoe: Failed to attach to the FC transport\n" );return -ENODEV ; }
@@ -716,7 +717,7 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu)unsigned targ_cpu =smp_processor_id ();#endif /* CONFIG_SMP */ -printk (KERN_DEBUG "fcoe: Destroying receive thread for CPU %d\n" , cpu); +FCOE_DBG ("Destroying receive thread for CPU %d\n" , cpu);/* Prevent any new skbs from being queued for this CPU. */ p = &per_cpu (fcoe_percpu, cpu);
@@ -738,8 +739,8 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu) p0 = &per_cpu (fcoe_percpu, targ_cpu);spin_lock_bh (&p0->fcoe_rx_list.lock);if (p0->thread) { -FC_DBG ("Moving frames from CPU %d to CPU %d\n" , - cpu, targ_cpu); +FCOE_DBG ("Moving frames from CPU %d to CPU %d\n" , + cpu, targ_cpu);while ((skb =__skb_dequeue (&p->fcoe_rx_list)) !=NULL )__skb_queue_tail (&p0->fcoe_rx_list, skb);
@@ -805,12 +806,12 @@ static int fcoe_cpu_callback(struct notifier_block *nfb,switch (action) {case CPU_ONLINE :case CPU_ONLINE_FROZEN : -FC_DBG ("CPU %x online: Create Rx thread\n" , cpu); +FCOE_DBG ("CPU %x online: Create Rx thread\n" , cpu);fcoe_percpu_thread_create (cpu);break ;case CPU_DEAD :case CPU_DEAD_FROZEN : -FC_DBG ("CPU %x offline: Remove Rx thread\n" , cpu); +FCOE_DBG ("CPU %x offline: Remove Rx thread\n" , cpu);fcoe_percpu_thread_destroy (cpu);break ;default :
@@ -848,24 +849,21 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *dev, fc = container_of(ptype, struct fcoe_softc, fcoe_packet_type); lp = fc->ctlr.lp;if (unlikely (lp ==NULL )) { -FC_DBG ("cannot find hba structure" ); +FCOE_NETDEV_DBG (dev,"Cannot find hba structure" ); goto err2; }if (!lp->link_up) goto err2; -if (unlikely (debug_fcoe)) { -FC_DBG ("skb_info: len:%d data_len:%d head:%p data:%p tail:%p " -"end:%p sum:%d dev:%s" , skb->len, skb->data_len, - skb->head, skb->data,skb_tail_pointer (skb), -skb_end_pointer (skb), skb->csum, - skb->dev ? skb->dev->name :"<NULL>" ); - - } +FCOE_NETDEV_DBG (dev,"skb_info: len:%d data_len:%d head:%p " +"data:%p tail:%p end:%p sum:%d dev:%s" , + skb->len, skb->data_len, skb->head, skb->data, +skb_tail_pointer (skb),skb_end_pointer (skb), + skb->csum, skb->dev ? skb->dev->name :"<NULL>" );/* check for FCOE packet type */ if (unlikely (eth_hdr (skb)->h_proto !=htons (ETH_P_FCOE ))) { -FC_DBG ("wrong FC type frame" ); +FCOE_NETDEV_DBG (dev,"Wrong FC type frame" ); goto err; }
@@ -903,8 +901,9 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *dev,* the first CPU now. For non-SMP systems this * will check the same CPU twice. */ -FC_DBG ("CPU is online, but no receive thread ready " -"for incoming skb- using first online CPU.\n" ); +FCOE_NETDEV_DBG (dev,"CPU is online, but no receive thread " +"ready for incoming skb- using first online " +"CPU.\n" );spin_unlock_bh (&fps->fcoe_rx_list.lock); cpu =first_cpu (cpu_online_map);
@@ -1203,19 +1202,17 @@ int fcoe_percpu_receive_thread(void *arg) fr =fcoe_dev_from_skb (skb); lp = fr->fr_dev;if (unlikely (lp ==NULL )) { -FC_DBG ("invalid HBA Structure" ); +FCOE_NETDEV_DBG (skb->dev,"Invalid HBA Structure" );kfree_skb (skb);continue ; } -if (unlikely (debug_fcoe)) { -FC_DBG ("skb_info: len:%d data_len:%d head:%p data:%p " -"tail:%p end:%p sum:%d dev:%s" , - skb->len, skb->data_len, - skb->head, skb->data,skb_tail_pointer (skb), -skb_end_pointer (skb), skb->csum, - skb->dev ? skb->dev->name :"<NULL>" ); - } +FCOE_NETDEV_DBG (skb->dev,"skb_info: len:%d data_len:%d " +"head:%p data:%p tail:%p end:%p sum:%d dev:%s" , + skb->len, skb->data_len, + skb->head, skb->data,skb_tail_pointer (skb), +skb_end_pointer (skb), skb->csum, + skb->dev ? skb->dev->name :"<NULL>" );/* * Save source MAC address before discarding header.
@@ -1235,7 +1232,7 @@ int fcoe_percpu_receive_thread(void *arg) stats =fc_lport_get_stats (lp);if (unlikely (FC_FCOE_DECAPS_VER (hp) !=FC_FCOE_VER )) {if (stats->ErrorFrames <5 ) -printk (KERN_WARNING "FCoE version " +printk (KERN_WARNING "fcoe: FCoE version " "mismatch: The frame has " "version %x, but the " "initiator supports version "
@@ -1288,7 +1285,7 @@ int fcoe_percpu_receive_thread(void *arg)if (fr_flags (fp) &FCPHF_CRC_UNCHECKED ) {if (le32_to_cpu (fr_crc (fp)) != ~crc32 (~0 , skb->data, fr_len)) { -if (debug_fcoe || stats->InvalidCRCCount <5 ) +if (stats->InvalidCRCCount <5 )printk (KERN_WARNING "fcoe: dropping " "frame with CRC error\n" ); stats->InvalidCRCCount++;
@@ -1434,7 +1431,8 @@ static int fcoe_device_notification(struct notifier_block *notifier,case NETDEV_REGISTER :break ;default : -FC_DBG ("Unknown event %ld from netdev netlink\n" , event); +FCOE_NETDEV_DBG (real_dev,"Unknown event %ld " +"from netdev netlink\n" , event); }if (link_possible && !fcoe_link_ok (lp))fcoe_ctlr_link_up (&fc->ctlr);
@@ -1507,8 +1505,8 @@ static int fcoe_ethdrv_get(const struct net_device *netdev) owner =fcoe_netdev_to_module_owner (netdev);if (owner) { -printk (KERN_DEBUG "fcoe:hold driver module %s for %s\n" , -module_name (owner), netdev->name); +FCOE_NETDEV_DBG (netdev,"Hold driver module %s\n" , +module_name (owner));return try_module_get (owner); }return -ENODEV ;
@@ -1529,8 +1527,8 @@ static int fcoe_ethdrv_put(const struct net_device *netdev) owner =fcoe_netdev_to_module_owner (netdev);if (owner) { -printk (KERN_DEBUG "fcoe:release driver module %s for %s\n" , -module_name (owner), netdev->name); +FCOE_NETDEV_DBG (netdev,"Release driver module %s\n" , +module_name (owner));module_put (owner);return 0 ; }
@@ -1561,7 +1559,7 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp) } rc =fcoe_if_destroy (netdev);if (rc) { -printk (KERN_ERR "fcoe: fcoe_if_destroy(%s) failed\n" , +printk (KERN_ERR "fcoe: Failed to destroy interface (%s)\n" , netdev->name); rc = -EIO ; goto out_putdev;
@@ -1600,7 +1598,7 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp) rc =fcoe_if_create (netdev);if (rc) { -printk (KERN_ERR "fcoe: fcoe_if_create(%s) failed\n" , +printk (KERN_ERR "fcoe: Failed to create interface (%s)\n" , netdev->name);fcoe_ethdrv_put (netdev); rc = -EIO ;
drivers/scsi/fcoe/fcoe.h +24 -0
@@ -40,6 +40,30 @@#define FCOE_MIN_XID 0x0001/* the min xid supported by fcoe_sw */ #define FCOE_MAX_XID 0x07ef/* the max xid supported by fcoe_sw */ +unsigned int fcoe_debug_logging; +module_param_named (debug_logging, fcoe_debug_logging, int,S_IRUGO |S_IWUSR ); +MODULE_PARM_DESC (debug_logging,"a bit mask of logging levels" ); + +#define FCOE_LOGGING 0x01/* General logging, not categorized */ +#define FCOE_NETDEV_LOGGING 0x02/* Netdevice logging */ + +#define FCOE_CHECK_LOGGING (LEVEL ,CMD ) \ +do { \ + if (unlikely(fcoe_debug_logging & LEVEL)) \ + do { \ + CMD; \ + } while (0); \ +} while (0); + +#define FCOE_DBG(fmt, args...) \ + FCOE_CHECK_LOGGING(FCOE_LOGGING, \ + printk(KERN_INFO "fcoe: " fmt, ##args);) + +#define FCOE_NETDEV_DBG(netdev, fmt, args...) \ + FCOE_CHECK_LOGGING(FCOE_NETDEV_LOGGING, \ + printk(KERN_INFO "fcoe: %s" fmt, \ + netdev->name, ##args);) +/* * this percpu struct for fcoe */
PATCH 5/6 libfcoe: Add runtime debugging with module param debug_logging
In reply to Robert LoveThis patch adds a 'debug_logging' module parameter to libfcoe.ko. It is an unsigned int that represents a bitmask of available debug logging levels, each of which can be tuned at runtime. Currently there are only two logging levels for this module-
bit
LSB 0 = libfcoe general logging
1 = FIP logging
---
drivers/scsi/fcoe/libfcoe.c | 94 +++++++++++++++++++++++++------------------ 1 files changed, 54 insertions(+), 40 deletions(-)
drivers/scsi/fcoe/libfcoe.c +54 -40
@@ -56,15 +56,28 @@ static void fcoe_ctlr_recv_work(struct work_struct *);static u8 fcoe_all_fcfs[ETH_ALEN ] =FIP_ALL_FCF_MACS ; -static u32 fcoe_ctlr_debug;/* 1 for basic, 2 for noisy debug */ +unsigned int libfcoe_debug_logging; +module_param_named (debug_logging, libfcoe_debug_logging, int,S_IRUGO |S_IWUSR ); +MODULE_PARM_DESC (debug_logging,"a bit mask of logging levels" ); -#define FIP_DBG_LVL(level, fmt, args...) \ +#define LIBFCOE_LOGGING 0x01/* General logging, not categorized */ +#define LIBFCOE_FIP_LOGGING 0x02/* FIP logging */ + +#define LIBFCOE_CHECK_LOGGING (LEVEL ,CMD ) \ +do { \ + if (unlikely(libfcoe_debug_logging & LEVEL)) \ do { \ - if (fcoe_ctlr_debug >= (level)) \ - FC_DBG(fmt, ##args); \ - } while (0) + CMD; \ + } while (0); \ +} while (0); + +#define LIBFCOE_DBG(fmt, args...) \ + LIBFCOE_CHECK_LOGGING(LIBFCOE_LOGGING, \ + printk(KERN_INFO "libfcoe: " fmt, ##args);) -#define FIP_DBG(fmt, args...) FIP_DBG_LVL(1, fmt, ##args) +#define LIBFCOE_FIP_DBG(fmt, args...) \ + LIBFCOE_CHECK_LOGGING(LIBFCOE_FIP_LOGGING, \ + printk(KERN_INFO "fip: " fmt, ##args);)/* * Return non-zero if FCF fcoe_size has been validated.
@@ -243,7 +256,7 @@ void fcoe_ctlr_link_up(struct fcoe_ctlr *fip) fip->last_link =1 ; fip->link =1 ;spin_unlock_bh (&fip->lock); -FIP_DBG ("%s" ,"setting AUTO mode.\n" ); +LIBFCOE_FIP_DBG ("%s" ,"setting AUTO mode.\n" );fc_linkup (fip->lp);fcoe_ctlr_solicit (fip,NULL ); }else
@@ -614,7 +627,8 @@ static int fcoe_ctlr_parse_adv(struct sk_buff *skb, struct fcoe_fcf *fcf) ((struct fip_mac_desc *)desc)->fd_mac, ETH_ALEN);if (!is_valid_ether_addr (fcf->fcf_mac)) { -FIP_DBG ("invalid MAC addr in FIP adv\n" ); +LIBFCOE_FIP_DBG ("Invalid MAC address " +"in FIP adv\n" );return -EINVAL ; }break ;
@@ -647,8 +661,8 @@ static int fcoe_ctlr_parse_adv(struct sk_buff *skb, struct fcoe_fcf *fcf)case FIP_DT_LOGO :case FIP_DT_ELP :default : -FIP_DBG ("unexpected descriptor type %x in FIP adv\n" , - desc->fip_dtype); +LIBFCOE_FIP_DBG ("unexpected descriptor type %x " +"in FIP adv\n" , desc->fip_dtype);/* standard says ignore unknown descriptors >= 128 */ if (desc->fip_dtype <FIP_DT_VENDOR_BASE )return -EINVAL ;
@@ -664,8 +678,8 @@ static int fcoe_ctlr_parse_adv(struct sk_buff *skb, struct fcoe_fcf *fcf)return 0 ; len_err: -FIP_DBG ("FIP length error in descriptor type %x len %zu\n" , - desc->fip_dtype, dlen); +LIBFCOE_FIP_DBG ("FIP length error in descriptor type %x len %zu\n" , + desc->fip_dtype, dlen);return -EINVAL ; }
@@ -728,9 +742,10 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb) } mtu_valid =fcoe_ctlr_mtu_valid (fcf); fcf->time = jiffies; -FIP_DBG_LVL (found ?2 :1 ,"%s FCF for fab %llx map %x val %d\n" , - found ?"old" :"new" , - fcf->fabric_name, fcf->fc_map, mtu_valid); +if (!found) { +LIBFCOE_FIP_DBG ("New FCF for fab %llx map %x val %d\n" , + fcf->fabric_name, fcf->fc_map, mtu_valid); + }/* * If this advertisement is not solicited and our max receive size
@@ -807,7 +822,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) ((struct fip_mac_desc *)desc)->fd_mac, ETH_ALEN);if (!is_valid_ether_addr (granted_mac)) { -FIP_DBG ("invalid MAC addrs in FIP ELS\n" ); +LIBFCOE_FIP_DBG ("Invalid MAC address " +"in FIP ELS\n" ); goto drop; }break ;
@@ -825,8 +841,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) els_dtype = desc->fip_dtype;break ;default : -FIP_DBG ("unexpected descriptor type %x " -"in FIP adv\n" , desc->fip_dtype); +LIBFCOE_FIP_DBG ("unexpected descriptor type %x " +"in FIP adv\n" , desc->fip_dtype);/* standard says ignore unknown descriptors >= 128 */ if (desc->fip_dtype <FIP_DT_VENDOR_BASE ) goto drop;
@@ -867,8 +883,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb)return ; len_err: -FIP_DBG ("FIP length error in descriptor type %x len %zu\n" , - desc->fip_dtype, dlen); +LIBFCOE_FIP_DBG ("FIP length error in descriptor type %x len %zu\n" , + desc->fip_dtype, dlen); drop:kfree_skb (skb); }
@@ -894,7 +910,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,struct fc_lport *lp = fip->lp;u32 desc_mask; -FIP_DBG ("Clear Virtual Link received\n" ); +LIBFCOE_FIP_DBG ("Clear Virtual Link received\n" );if (!fcf)return ;if (!fcf || !fc_host_port_id (lp->host))
@@ -952,9 +968,9 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,* reset only if all required descriptors were present and valid. */ if (desc_mask) { -FIP_DBG ("missing descriptors mask %x\n" , desc_mask); +LIBFCOE_FIP_DBG ("missing descriptors mask %x\n" , desc_mask); }else { -FIP_DBG ("performing Clear Virtual Link\n" ); +LIBFCOE_FIP_DBG ("performing Clear Virtual Link\n" );fcoe_ctlr_reset (fip,FIP_ST_ENABLED ); } }
@@ -1002,10 +1018,6 @@ static int fcoe_ctlr_recv_handler(struct fcoe_ctlr *fip, struct sk_buff *skb) op =ntohs (fiph->fip_op); sub = fiph->fip_subcode; -FIP_DBG_LVL (2 ,"ver %x op %x/%x dl %x fl %x\n" , -FIP_VER_DECAPS (fiph->fip_ver), op, sub, -ntohs (fiph->fip_dl_len),ntohs (fiph->fip_flags)); -if (FIP_VER_DECAPS (fiph->fip_ver) !=FIP_VER ) goto drop;if (ntohs (fiph->fip_dl_len) *FIP_BPW +sizeof (*fiph) > skb->len)
@@ -1017,7 +1029,7 @@ static int fcoe_ctlr_recv_handler(struct fcoe_ctlr *fip, struct sk_buff *skb) fip->map_dest =0 ; fip->state =FIP_ST_ENABLED ; state =FIP_ST_ENABLED ; -FIP_DBG ("using FIP mode\n" ); +LIBFCOE_FIP_DBG ("Using FIP mode\n" ); }spin_unlock_bh (&fip->lock);if (state !=FIP_ST_ENABLED )
@@ -1052,14 +1064,15 @@ static void fcoe_ctlr_select(struct fcoe_ctlr *fip)struct fcoe_fcf *best =NULL ;list_for_each_entry (fcf, &fip->fcfs, list) { -FIP_DBG ("consider FCF for fab %llx VFID %d map %x val %d\n" , - fcf->fabric_name, fcf->vfid, - fcf->fc_map,fcoe_ctlr_mtu_valid (fcf)); +LIBFCOE_FIP_DBG ("consider FCF for fab %llx VFID %d map %x " +"val %d\n" , fcf->fabric_name, fcf->vfid, + fcf->fc_map,fcoe_ctlr_mtu_valid (fcf));if (!fcoe_ctlr_fcf_usable (fcf)) { -FIP_DBG ("FCF for fab %llx map %x %svalid %savailable\n" , - fcf->fabric_name, fcf->fc_map, - (fcf->flags &FIP_FL_SOL ) ?"" :"in" , - (fcf->flags &FIP_FL_AVAIL ) ?"" :"un" ); +LIBFCOE_FIP_DBG ("FCF for fab %llx map %x %svalid " +"%savailable\n" , fcf->fabric_name, + fcf->fc_map, (fcf->flags &FIP_FL_SOL ) + ?"" :"in" , (fcf->flags &FIP_FL_AVAIL ) + ?"" :"un" );continue ; }if (!best) {
@@ -1069,7 +1082,8 @@ static void fcoe_ctlr_select(struct fcoe_ctlr *fip)if (fcf->fabric_name != best->fabric_name || fcf->vfid != best->vfid || fcf->fc_map != best->fc_map) { -FIP_DBG ("conflicting fabric, VFID, or FC-MAP\n" ); +LIBFCOE_FIP_DBG ("Conflicting fabric, VFID, " +"or FC-MAP\n" );return ; }if (fcf->pri < best->pri)
@@ -1113,7 +1127,7 @@ static void fcoe_ctlr_timeout(unsigned long arg)if (sel != fcf) { fcf = sel;/* the old FCF may have been freed */ if (sel) { -printk (KERN_INFO "host%d: FIP selected " +printk (KERN_INFO "libfcoe: host%d: FIP selected " "Fibre-Channel Forwarder MAC %s\n" , fip->lp->host->host_no,print_mac (buf, sel->fcf_mac));
@@ -1123,7 +1137,7 @@ static void fcoe_ctlr_timeout(unsigned long arg) fip->ctlr_ka_time = jiffies + sel->fka_period; fip->link =1 ; }else { -printk (KERN_NOTICE "host%d: " +printk (KERN_NOTICE "libfcoe: host%d: " "FIP Fibre-Channel Forwarder timed out. " "Starting FCF discovery.\n" , fip->lp->host->host_no);
@@ -1247,7 +1261,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_frame *fp, u8 *sa)return -EINVAL ; } fip->state =FIP_ST_NON_FIP ; -FIP_DBG ("received FLOGI LS_ACC using non-FIP mode\n" ); +LIBFCOE_FIP_DBG ("received FLOGI LS_ACC using non-FIP mode\n" );/* * FLOGI accepted.
@@ -1276,7 +1290,7 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *fip, struct fc_frame *fp, u8 *sa)memcpy (fip->dest_addr, sa,ETH_ALEN ); fip->map_dest =0 ;if (fip->state ==FIP_ST_NON_FIP ) -FIP_DBG ("received FLOGI REQ, " +LIBFCOE_FIP_DBG ("received FLOGI REQ, " "using non-FIP mode\n" ); fip->state =FIP_ST_NON_FIP ; }
PATCH 6/6 libfc: Add runtime debugging with debug_logging module parameter
In reply to Robert LoveThis patch adds the /sys/module/libfc/parameters/debug_logging file to sysfs as a module parameter. It accepts an integer bitmask for logging. Currently it supports:
bit
LSB 0 = general libfc debugging
1 = lport debugging
2 = disc debugging
3 = rport debugging
4 = fcp debugging
5 = EM debugging
6 = exch/seq debugging
7 = scsi logging (mostly error handling)
the other bits are not used at this time.
The patch converts all of the libfc source files to use these new macros and removes the old FC_DBG macro.
---
drivers/scsi/libfc/fc_disc.c | 83 +++++++++------------- drivers/scsi/libfc/fc_exch.c | 58 +++++++-------- drivers/scsi/libfc/fc_fcp.c | 97 +++++++++++++------------ drivers/scsi/libfc/fc_lport.c | 156 ++++++++++++++++++++--------------------- drivers/scsi/libfc/fc_rport.c | 120 +++++++++++++------------------- include/scsi/fc_encode.h | 2 - include/scsi/libfc.h | 77 +++++++++++++++++--- 7 files changed, 301 insertions(+), 292 deletions(-)
drivers/scsi/libfc/fc_disc.c +35 -48
@@ -45,14 +45,6 @@#define FC_DISC_DELAY 3 -static int fc_disc_debug; - -#define FC_DEBUG_DISC(fmt...) \ - do { \ - if (fc_disc_debug) \ - FC_DBG(fmt); \ - } while (0) -static void fc_disc_gpn_ft_req (struct fc_disc *);static void fc_disc_gpn_ft_resp (struct fc_seq *,struct fc_frame *,void *); static int fc_disc_new_target(struct fc_disc *, struct fc_rport *,
@@ -137,8 +129,8 @@ static void fc_disc_rport_callback(struct fc_lport *lport,struct fc_rport_libfc_priv *rdata = rport->dd_data;struct fc_disc *disc = &lport->disc; -FC_DEBUG_DISC ("Received a %d event for port (%6x)\n" , event, - rport->port_id); +FC_DISC_DBG (disc,"Received a %d event for port (%6x)\n" , event, + rport->port_id);switch (event) {case RPORT_EV_CREATED :
@@ -191,8 +183,7 @@ static void fc_disc_recv_rscn_req(struct fc_seq *sp, struct fc_frame *fp, lport = disc->lport; -FC_DEBUG_DISC ("Received an RSCN event on port (%6x)\n" , -fc_host_port_id (lport->host)); +FC_DISC_DBG (disc,"Received an RSCN event\n" );/* make sure the frame contains an RSCN message */ rp =fc_frame_payload_get (fp,sizeof (*rp));
@@ -225,8 +216,8 @@ static void fc_disc_recv_rscn_req(struct fc_seq *sp, struct fc_frame *fp,*/ switch (fmt) {case ELS_ADDR_FMT_PORT : -FC_DEBUG_DISC ("Port address format for port (%6x)\n" , -ntoh24 (pp->rscn_fid)); +FC_DISC_DBG (disc,"Port address format for port " +"(%6x)\n" ,ntoh24 (pp->rscn_fid)); dp =kzalloc (sizeof (*dp),GFP_KERNEL );if (!dp) { redisc =1 ;
@@ -243,19 +234,19 @@ static void fc_disc_recv_rscn_req(struct fc_seq *sp, struct fc_frame *fp,case ELS_ADDR_FMT_DOM :case ELS_ADDR_FMT_FAB :default : -FC_DEBUG_DISC ("Address format is (%d)\n" , fmt); +FC_DISC_DBG (disc,"Address format is (%d)\n" , fmt); redisc =1 ;break ; } } lport->tt.seq_els_rsp_send (sp,ELS_LS_ACC ,NULL );if (redisc) { -FC_DEBUG_DISC ("RSCN received: rediscovering\n" ); +FC_DISC_DBG (disc,"RSCN received: rediscovering\n" );fc_disc_restart (disc); }else { -FC_DEBUG_DISC ("RSCN received: not rediscovering. " -"redisc %d state %d in_prog %d\n" , - redisc, lport->state, disc->pending); +FC_DISC_DBG (disc,"RSCN received: not rediscovering. " +"redisc %d state %d in_prog %d\n" , + redisc, lport->state, disc->pending);list_for_each_entry_safe (dp, next, &disc_ports, peers) {list_del (&dp->peers); rport = lport->tt.rport_lookup (lport, dp->ids.port_id);
@@ -270,7 +261,7 @@ static void fc_disc_recv_rscn_req(struct fc_seq *sp, struct fc_frame *fp,fc_frame_free (fp);return ; reject: -FC_DEBUG_DISC ("Received a bad RSCN frame\n" ); +FC_DISC_DBG (disc,"Received a bad RSCN frame\n" ); rjt_data.fp =NULL ; rjt_data.reason =ELS_RJT_LOGIC ; rjt_data.explan =ELS_EXPL_NONE ;
@@ -302,7 +293,8 @@ static void fc_disc_recv_req(struct fc_seq *sp, struct fc_frame *fp,mutex_unlock (&disc->disc_mutex);break ;default : -FC_DBG ("Received an unsupported request. opcode (%x)\n" , op); +FC_DISC_DBG (disc,"Received an unsupported request, " +"the opcode is (%x)\n" , op);break ; } }
@@ -320,12 +312,10 @@ static void fc_disc_restart(struct fc_disc *disc)struct fc_rport_libfc_priv *rdata, *next;struct fc_lport *lport = disc->lport; -FC_DEBUG_DISC ("Restarting discovery for port (%6x)\n" , -fc_host_port_id (lport->host)); +FC_DISC_DBG (disc,"Restarting discovery\n" );list_for_each_entry_safe (rdata, next, &disc->rports, peers) { rport =PRIV_TO_RPORT (rdata); -FC_DEBUG_DISC ("list_del(%6x)\n" , rport->port_id);list_del (&rdata->peers); lport->tt.rport_logoff (rport); }
@@ -485,8 +475,7 @@ static void fc_disc_done(struct fc_disc *disc)struct fc_lport *lport = disc->lport;enum fc_disc_event event; -FC_DEBUG_DISC ("Discovery complete for port (%6x)\n" , -fc_host_port_id (lport->host)); +FC_DISC_DBG (disc,"Discovery complete\n" ); event = disc->event; disc->event =DISC_EV_NONE ;
@@ -510,10 +499,10 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp) {struct fc_lport *lport = disc->lport;unsigned long delay =0 ; -if (fc_disc_debug) -FC_DBG ("Error %ld, retries %d/%d\n" , -PTR_ERR (fp), disc->retry_count, -FC_DISC_RETRY_LIMIT ); + +FC_DISC_DBG (disc,"Error %ld, retries %d/%d\n" , +PTR_ERR (fp), disc->retry_count, +FC_DISC_RETRY_LIMIT );if (!fp ||PTR_ERR (fp) == -FC_EX_TIMEOUT ) {/*
@@ -649,9 +638,9 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len) &disc->rogue_rports); lport->tt.rport_login (rport); }else -FC_DBG ("Failed to allocate memory for " -"the newly discovered port (%6x)\n" , - dp.ids.port_id); +printk (KERN_WARNING "libfc: Failed to allocate " +"memory for the newly discovered port " +"(%6x)\n" , dp.ids.port_id); }if (np->fp_flags &FC_NS_FID_LAST ) {
@@ -671,9 +660,8 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len)*/ if (error ==0 && len >0 && len <sizeof (*np)) {if (np != &disc->partial_buf) { -FC_DEBUG_DISC ("Partial buffer remains " -"for discovery by (%6x)\n" , -fc_host_port_id (lport->host)); +FC_DISC_DBG (disc,"Partial buffer remains " +"for discovery\n" );memcpy (&disc->partial_buf, np, len); } disc->buf_len = (unsigned char ) len;
@@ -721,8 +709,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,int error;mutex_lock (&disc->disc_mutex); -FC_DEBUG_DISC ("Received a GPN_FT response on port (%6x)\n" , -fc_host_port_id (disc->lport->host)); +FC_DISC_DBG (disc,"Received a GPN_FT response\n" );if (IS_ERR (fp)) {fc_disc_error (disc, fp);
@@ -738,30 +725,30 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, disc->seq_count == 0) { cp =fc_frame_payload_get (fp,sizeof (*cp));if (!cp) { -FC_DBG ("GPN_FT response too short, len %d\n" , -fr_len (fp)); +FC_DISC_DBG (disc,"GPN_FT response too short, len %d\n" , +fr_len (fp)); }else if (ntohs (cp->ct_cmd) ==FC_FS_ACC ) {/* Accepted, parse the response. */ buf = cp +1 ; len -=sizeof (*cp); }else if (ntohs (cp->ct_cmd) ==FC_FS_RJT ) { -FC_DBG ("GPN_FT rejected reason %x exp %x " -"(check zoning)\n" , cp->ct_reason, - cp->ct_explan); +FC_DISC_DBG (disc,"GPN_FT rejected reason %x exp %x " +"(check zoning)\n" , cp->ct_reason, + cp->ct_explan); disc->event =DISC_EV_FAILED ;fc_disc_done (disc); }else { -FC_DBG ("GPN_FT unexpected response code %x\n" , -ntohs (cp->ct_cmd)); +FC_DISC_DBG (disc,"GPN_FT unexpected response code " +"%x\n" ,ntohs (cp->ct_cmd)); } } else if (fr_sof(fp) == FC_SOF_N3 && seq_cnt == disc->seq_count) { buf = fh +1 ; } else { -FC_DBG ("GPN_FT unexpected frame - out of sequence? " -"seq_cnt %x expected %x sof %x eof %x\n" , - seq_cnt, disc->seq_count,fr_sof (fp),fr_eof (fp)); +FC_DISC_DBG (disc,"GPN_FT unexpected frame - out of sequence? " +"seq_cnt %x expected %x sof %x eof %x\n" , + seq_cnt, disc->seq_count,fr_sof (fp),fr_eof (fp)); }if (buf) { error =fc_disc_gpn_ft_parse (disc, buf, len);
drivers/scsi/libfc/fc_exch.c +25 -33
148 lines not on this page · raw message
drivers/scsi/libfc/fc_fcp.c +50 -47
237 lines not on this page · raw message
drivers/scsi/libfc/fc_lport.c +75 -81
360 lines not on this page · raw message
drivers/scsi/libfc/fc_rport.c +50 -70
293 lines not on this page · raw message
include/scsi/fc_encode.h +0 -2
@@ -107,7 +107,6 @@ static inline int fc_ct_fill(struct fc_lport *lport, struct fc_frame *fp,break ;default : -FC_DBG ("Invalid op code %x \n" , op);return -EINVAL ; } *r_ctl =FC_RCTL_DD_UNSOL_CTL ;
@@ -298,7 +297,6 @@ static inline int fc_els_fill(struct fc_lport *lport, struct fc_rport *rport,break ;default : -FC_DBG ("Invalid op code %x \n" , op);return -EINVAL ; }
include/scsi/libfc.h +66 -11
83 lines not on this page · raw message