Ignore:
Timestamp:
Mar 28, 2018, 2:40:29 PM (4 years ago)
Author:
alain
Message:

Fix various bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_nic.c

    r436 r437  
    22 * dev_nic.c - NIC (Network Controler) generic device API implementation.
    33 *
    4  * Author  Alain Greiner    (2016,2017)
     4 * Author  Alain Greiner    (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    9999    core_t * core = thread_ptr->core;
    100100
    101     nic_dmsg("\n[DBG] %s enters for NIC-RX thread on core %d in cluster %x\n",
    102                  __FUNCTION__ , core->lid , local_cxy );
     101#if CONFIG_DEBUG_DEV_NIC_RX
     102uint32_t cycle = (uint32_t)hal_get_cycles();
     103if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     104printk("\n[DBG] %s : thread %x enters for packet %x in cluster %x\n",
     105__FUNCTION__ , thread_ptr , pkd , local_cxy );
     106#endif
    103107
    104108    // get pointer on NIC-RX chdev descriptor
     
    149153    pkd->length = thread_ptr->nic_cmd.length;
    150154
    151     nic_dmsg("\n[DBG] %s exit for NIC-RX thread on core %d in cluster %x\n",
    152              __FUNCTION__ , core->lid , local_cxy );
     155#if CONFIG_DEBUG_DEV_NIC_RX
     156cycle = (uint32_t)hal_get_cycles();
     157if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     158printk("\n[DBG] %s : thread %x exit for packet %x in cluster %x\n",
     159__FUNCTION__ , thread_ptr , pkd , local_cxy );
     160#endif
    153161
    154162    return 0;
     
    169177    core_t * core = thread_ptr->core;
    170178
    171     nic_dmsg("\n[DBG] %s enters for NIC-RX thread on core %d in cluster %x\n",
    172                  __FUNCTION__ , core->lid , local_cxy );
     179#if CONFIG_DEBUG_DEV_NIC_RX
     180uint32_t cycle = (uint32_t)hal_get_cycles();
     181if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     182printk("\n[DBG] %s : thread %x enters for packet %x in cluster %x\n",
     183__FUNCTION__ , thread_ptr , pkd , local_cxy );
     184#endif
    173185
    174186    // get pointer on NIC-TX chdev descriptor
     
    217229    if( error ) return error;
    218230
    219     nic_dmsg("\n[DBG] %s exit for NIC-TX thread on core %d in cluster %x\n",
    220              __FUNCTION__ , core->lid , local_cxy );
     231#if CONFIG_DEBUG_DEV_NIC_RX
     232cycle = (uint32_t)hal_get_cycles();
     233if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     234printk("\n[DBG] %s : thread %x exit for packet %x in cluster %x\n",
     235__FUNCTION__ , thread_ptr , pkd , local_cxy );
     236#endif
    221237
    222238    return 0;
Note: See TracChangeset for help on using the changeset viewer.