whitespace cleanups
cover whitespace cleanups
From: Stephen Hemminger <[email protected]>
Ran the current code base through a script which:
- removes trailing whitespace
- removes space before tabs
- removes blank lines at end of file
Stephen Hemminger (9):
kni: fix whitespace
eal: fix whitespace
cmdline: fix whitespace
vhost: fix trailing whitespace
lib: fix misc whitespace
app: fix whitespace
examples: fix whitespace
mk, scripts: remove useless blank lines
drivers: fix whitespace
app/cmdline_test/cmdline_test.py | 3 +- app/cmdline_test/cmdline_test_data.py | 1 - app/test-pmd/csumonly.c | 1 - app/test-pmd/mempool_anon.c | 4 +- app/test-pmd/testpmd.c | 8 ++-- app/test/autotest.py | 1 - app/test/autotest_data.py | 28 ++++++------- app/test/autotest_runner.py | 41 ++++++++++--------- app/test/autotest_test_funcs.py | 1 - app/test/process.h | 12 +++--- app/test/test_acl.h | 4 +- app/test/test_sched.c | 8 ++-- drivers/net/e1000/em_rxtx.c | 1 - drivers/net/e1000/igb_rxtx.c | 1 - drivers/net/pcap/rte_eth_pcap.c | 2 +- examples/cmdline/commands.c | 1 - .../config_files/shumway/dh89xxcc_qa_dev0.conf | 2 - .../config_files/shumway/dh89xxcc_qa_dev1.conf | 2 - .../config_files/stargo/dh89xxcc_qa_dev0.conf | 2 - examples/kni/main.c | 1 - examples/l2fwd/main.c | 1 - examples/l3fwd-power/main.c | 8 ++-- .../client_server_mp/mp_server/args.c | 1 - examples/netmap_compat/lib/compat_netmap.c | 6 +-- examples/qos_sched/app_thread.c | 2 - examples/qos_sched/args.c | 1 - examples/qos_sched/cfg_file.c | 2 - examples/qos_sched/main.c | 1 - examples/qos_sched/main.h | 2 +- examples/qos_sched/stats.c | 1 - examples/quota_watermark/qw/init.c | 2 +- examples/quota_watermark/qw/init.h | 1 - examples/vhost/main.c | 9 ++--- examples/vhost_xen/main.c | 16 ++++---- examples/vhost_xen/vhost_monitor.c | 6 +-- lib/librte_cmdline/cmdline_cirbuf.c | 1 - lib/librte_cmdline/cmdline_parse.c | 1 - lib/librte_cmdline/cmdline_rdline.c | 1 - lib/librte_compat/rte_compat.h | 8 ++-- lib/librte_eal/bsdapp/contigmem/contigmem.c | 1 - lib/librte_eal/bsdapp/eal/Makefile | 1 - lib/librte_eal/bsdapp/eal/eal.c | 1 - lib/librte_eal/bsdapp/eal/eal_interrupts.c | 1 - lib/librte_eal/common/eal_common_hexdump.c | 3 +- lib/librte_eal/common/eal_common_launch.c | 1 - lib/librte_eal/common/eal_common_log.c | 1 - lib/librte_eal/common/include/generic/rte_cycles.h | 8 ++-- lib/librte_eal/common/include/rte_hexdump.h | 20 +++++----- lib/librte_eal/common/include/rte_interrupts.h | 1 - lib/librte_eal/common/include/rte_memory.h | 2 +- lib/librte_eal/common/include/rte_pci.h | 10 ++--- lib/librte_eal/linuxapp/eal/Makefile | 1 - lib/librte_eal/linuxapp/eal/eal_interrupts.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_api.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_manage.c | 2 - .../linuxapp/kni/ethtool/igb/e1000_mbx.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_nvm.c | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +- .../linuxapp/kni/ethtool/igb/igb_debugfs.c | 1 - .../linuxapp/kni/ethtool/igb/igb_ethtool.c | 26 ++++++------ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 +- .../linuxapp/kni/ethtool/igb/igb_param.c | 3 +- .../linuxapp/kni/ethtool/igb/igb_procfs.c | 46 +++++++++++----------- .../linuxapp/kni/ethtool/igb/igb_regtest.h | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c | 1 - lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 +- .../linuxapp/kni/ethtool/igb/kcompat_ethtool.c | 11 +++--- .../linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_api.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_common.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 5 --- .../linuxapp/kni/ethtool/ixgbe/ixgbe_sriov.h | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c | 7 ++-- .../linuxapp/kni/ethtool/ixgbe/kcompat.h | 2 +- lib/librte_eal/linuxapp/kni/kni_dev.h | 1 - lib/librte_eal/linuxapp/kni/kni_misc.c | 1 - lib/librte_eal/linuxapp/kni/kni_vhost.c | 3 +- lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c | 2 +- lib/librte_hash/rte_fbk_hash.c | 1 - lib/librte_kni/rte_kni.h | 1 - lib/librte_lpm/rte_lpm.c | 1 - lib/librte_malloc/malloc_heap.c | 1 - lib/librte_vhost/libvirt/qemu-wrap.py | 13 +++--- lib/librte_vhost/vhost_rxtx.c | 2 +- mk/rte.extapp.mk | 1 - mk/rte.extlib.mk | 1 - mk/rte.extobj.mk | 1 - mk/toolchain/gcc/rte.toolchain-compat.mk | 1 - mk/toolchain/icc/rte.toolchain-compat.mk | 1 - scripts/gen-config-h.sh | 1 - scripts/validate-abi.sh | 2 - 91 files changed, 160 insertions(+), 242 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/9 kni: fix whitespace
From: Stephen Hemminger <[email protected]>
Ran this code base through a script which:
- removes trailing whitespace
- removes space before tabs
- removes blank lines at end of file
--- .../linuxapp/kni/ethtool/igb/e1000_api.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_manage.c | 2 - .../linuxapp/kni/ethtool/igb/e1000_mbx.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_nvm.c | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +- .../linuxapp/kni/ethtool/igb/igb_debugfs.c | 1 - .../linuxapp/kni/ethtool/igb/igb_ethtool.c | 26 ++++++------ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 +- .../linuxapp/kni/ethtool/igb/igb_param.c | 3 +- .../linuxapp/kni/ethtool/igb/igb_procfs.c | 46 +++++++++++----------- .../linuxapp/kni/ethtool/igb/igb_regtest.h | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c | 1 - lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 +- .../linuxapp/kni/ethtool/igb/kcompat_ethtool.c | 11 +++--- .../linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_api.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_common.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 5 --- .../linuxapp/kni/ethtool/ixgbe/ixgbe_sriov.h | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c | 7 ++-- .../linuxapp/kni/ethtool/ixgbe/kcompat.h | 2 +- lib/librte_eal/linuxapp/kni/kni_dev.h | 1 - lib/librte_eal/linuxapp/kni/kni_misc.c | 1 - lib/librte_eal/linuxapp/kni/kni_vhost.c | 3 +- lib/librte_kni/rte_kni.h | 1 - 25 files changed, 50 insertions(+), 78 deletions(-)
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_api.c +0 -1
@@ -1157,4 +1157,3 @@ s32 e1000_init_thermal_sensor_thresh(struct e1000_hw *hw)return E1000_SUCCESS ; } -
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_manage.c +0 -2
@@ -552,5 +552,3 @@ s32 e1000_load_firmware(struct e1000_hw *hw, u8 *buffer, u32 length)return E1000_SUCCESS ; } - -
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mbx.c +0 -1
@@ -523,4 +523,3 @@ s32 e1000_init_mbx_params_pf(struct e1000_hw *hw)return E1000_SUCCESS ; } } -
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_nvm.c +0 -2
@@ -963,5 +963,3 @@ etrack_id: }return ; } - -
lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h +1 -1
@@ -229,7 +229,7 @@ struct igb_lro_stats {*/ struct igb_lrohdr {struct iphdr iph; -struct tcphdr th; +struct tcphdr th;__be32 ts[0 ]; };
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_debugfs.c +0 -1
@@ -26,4 +26,3 @@*******************************************************************************/ #include "igb.h" -
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +12 -14
@@ -208,7 +208,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ecmd->port =PORT_FIBRE ; ecmd->transceiver =XCVR_EXTERNAL ; - } + }if (hw->mac.autoneg !=1 ) ecmd->advertising &= ~(ADVERTISED_Pause |
@@ -1377,7 +1377,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter) } }else {/* enable MII loopback */ -if (hw->phy.type == e1000_phy_82580) +if (hw->phy.type == e1000_phy_82580)e1000_write_phy_reg (hw,I82577_PHY_LBK_CTRL ,0x8041 ); }
@@ -1403,7 +1403,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter)*/ if (hw->phy.type == e1000_phy_m88)igb_phy_disable_receiver (adapter); - +mdelay (500 );return 0 ; }
@@ -1434,7 +1434,7 @@ static int igb_setup_loopback_test(struct igb_adapter *adapter)E1000_WRITE_REG (hw,E1000_MPHY_ADDR_CTL , reg); reg =E1000_READ_REG (hw,E1000_MPHY_DATA ); - reg |=E1000_MPHY_PCS_CLK_REG_DIGINELBEN ; + reg |=E1000_MPHY_PCS_CLK_REG_DIGINELBEN ;E1000_WRITE_REG (hw,E1000_MPHY_DATA , reg); }
@@ -1489,7 +1489,7 @@ static void igb_loopback_cleanup(struct igb_adapter *adapter)u16 phy_reg;if ((hw->device_id ==E1000_DEV_ID_DH89XXCC_SGMII ) || - (hw->device_id ==E1000_DEV_ID_DH89XXCC_SERDES ) || + (hw->device_id ==E1000_DEV_ID_DH89XXCC_SERDES ) || (hw->device_id ==E1000_DEV_ID_DH89XXCC_BACKPLANE ) || (hw->device_id ==E1000_DEV_ID_DH89XXCC_SFP )) {u32 reg;
@@ -1498,13 +1498,13 @@ static void igb_loopback_cleanup(struct igb_adapter *adapter) reg =E1000_READ_REG (hw,E1000_MPHY_ADDR_CTL ); reg = (reg &E1000_MPHY_ADDR_CTL_OFFSET_MASK ) |E1000_MPHY_PCS_CLK_REG_OFFSET ; -E1000_WRITE_REG (hw,E1000_MPHY_ADDR_CTL , reg); +E1000_WRITE_REG (hw,E1000_MPHY_ADDR_CTL , reg); reg =E1000_READ_REG (hw,E1000_MPHY_DATA ); - reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN ; -E1000_WRITE_REG (hw,E1000_MPHY_DATA , reg); + reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN ; +E1000_WRITE_REG (hw,E1000_MPHY_DATA , reg); } - + rctl =E1000_READ_REG (hw,E1000_RCTL ); rctl &= ~(E1000_RCTL_LBM_TCVR |E1000_RCTL_LBM_MAC );E1000_WRITE_REG (hw,E1000_RCTL , rctl);
@@ -1776,7 +1776,7 @@ static void igb_diag_test(struct net_device *netdev,/* power up link for link test */ igb_power_up_link (adapter); - +/* Link test performed before hardware reset so autoneg doesn't * interfere with test result */ if (igb_link_test (adapter, &data[4 ]))
@@ -1981,7 +1981,7 @@ static int igb_set_coalesce(struct net_device *netdev,if (ec->rx_coalesce_usecs ==0 ) { adapter->dmac =IGB_DMAC_DISABLE ; } - +/* convert to rate of irq's per second */ if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <=3 ) adapter->rx_itr_setting = ec->rx_coalesce_usecs;
@@ -2416,7 +2416,7 @@ static void igb_get_dmac(struct net_device *netdev, {struct igb_adapter *adapter =netdev_priv (netdev); edata->data = adapter->dmac; - +return ; }#endif
@@ -2855,5 +2855,3 @@ void igb_set_ethtool_ops(struct net_device *netdev) }#endif /* HAVE_RHEL6_ETHTOOL_OPS_EXT_STRUCT */ #endif /* SIOCETHTOOL */ - -
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +1 -1
@@ -9500,7 +9500,7 @@ static void igb_vmm_control(struct igb_adapter *adapter) }/* enable replication and loopback support */ - count = adapter->vfs_allocated_count || adapter->vmdq_pools; + count = adapter->vfs_allocated_count || adapter->vmdq_pools;if (adapter->flags &IGB_FLAG_LOOPBACK_ENABLE && count)e1000_vmdq_set_loopback_pf (hw,1 ); e1000_vmdq_set_anti_spoofing_pf(hw,
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_param.c +1 -2
@@ -167,7 +167,7 @@ IGB_PARAM(max_vfs, "Number of Virtual Functions: 0 = disable, 1-7 enable, defaul/* MDD (Enable Malicious Driver Detection) * * Only available when SR-IOV is enabled - max_vfs is greater than 0 -* +* * Valid Range: 0, 1 * * Default Value: 1
@@ -845,4 +845,3 @@ void igb_check_options(struct igb_adapter *adapter)#endif } } -
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_procfs.c +23 -23
140 lines not on this page · raw message
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_regtest.h +0 -2
@@ -247,5 +247,3 @@ static struct igb_reg_test reg_test_82575[] = { 0xFFFFFFFF, 0xFFFFFFFF }, { 0, 0, 0, 0 } }; - -
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c +0 -1
@@ -434,4 +434,3 @@ void igb_vmdq_set_ethtool_ops(struct net_device *netdev)#endif /* CONFIG_IGB_VMDQ_NETDEV */ -
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +2 -2
@@ -1184,7 +1184,7 @@ static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)return (struct device *) pdev; } -#define pdev_printk(lvl, pdev, fmt, args...) \ +#define pdev_printk(lvl, pdev, fmt, args...) \ printk("%s %s: " fmt, lvl, pci_name(pdev), ## args) #define dev_err(dev, fmt, args...) \ pdev_printk(KERN_ERR, to_pci_dev(dev), fmt, ## args)
@@ -3807,7 +3807,7 @@ static inline bool is_link_local_ether_addr(const u8 *addr) pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))#undef hlist_for_each_entry_safe -#define hlist_for_each_entry_safe (pos, n, head, member) \ +#define hlist_for_each_entry_safe (pos, n, head, member) \ for (pos = hlist_entry_safe((head)->first, typeof(*pos), member); \ pos && ({ n = pos->member.next; 1; }); \ pos = hlist_entry_safe(n, typeof(*pos), member))
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat_ethtool.c +5 -6
@@ -37,11 +37,11 @@* * Modification by [email protected] to work as backward compat * solution for pre-ethtool_ops kernels. -* - copied struct ethtool_ops from ethtool.h -* - defined SET_ETHTOOL_OPS -* - put in some #ifndef NETIF_F_xxx wrappers -* - changes refs to dev->ethtool_ops to ethtool_ops -* - changed dev_ethtool to ethtool_ioctl +* - copied struct ethtool_ops from ethtool.h +* - defined SET_ETHTOOL_OPS +* - put in some #ifndef NETIF_F_xxx wrappers +* - changes refs to dev->ethtool_ops to ethtool_ops +* - changed dev_ethtool to ethtool_ioctl * - remove EXPORT_SYMBOL()s * - added _kc_ prefix in built-in ethtool_op_xxx ops. */
@@ -1169,4 +1169,3 @@ int _kc_generic_mii_ioctl(struct mii_if_info *mii_if, return rc; }#endif /* > 2.4.6 */ -
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c +0 -1
@@ -2311,4 +2311,3 @@ release_i2c_access:return status; } -
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_api.c +0 -1
@@ -1155,4 +1155,3 @@ void ixgbe_release_swfw_semaphore(struct ixgbe_hw *hw, u16 mask)if (hw->mac.ops.release_swfw_sync) hw->mac.ops.release_swfw_sync (hw, mask); } -
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_common.c +0 -1
@@ -4080,4 +4080,3 @@ s32 ixgbe_init_thermal_sensor_thresh_generic(struct ixgbe_hw *hw) }return status; } -
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c +0 -5
@@ -2968,8 +2968,3 @@ void ewarn(struct ixgbe_hw *hw, const char *st, u32 status)netif_warn (adapter, drv, adapter->netdev,"%s" , st); } - - - - -
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_sriov.h +0 -1
@@ -71,4 +71,3 @@ void ixgbe_dump_registers(struct ixgbe_adapter *adapter);#define IXGBE_DEV_ID_X540_VF 0x1515#endif /* _IXGBE_SRIOV_H_ */ -
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c +3 -4
@@ -188,12 +188,12 @@ s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw) {s32 status =0 ; -/* -* Userland DPDK takes the ownershiop of device +/* +* Userland DPDK takes the ownershiop of device * Kernel driver here used as the simple path for ethtool only * Won't real reset device anyway */ -#if 0 +#if 0 u32 ctrl, i;/* Call adapter stop to disable tx/rx and clear interrupts */
@@ -935,4 +935,3 @@ s32 ixgbe_blink_led_stop_X540(struct ixgbe_hw *hw, u32 index)return 0 ; } -
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +1 -1
@@ -1133,7 +1133,7 @@ static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)return (struct device *) pdev; } -#define pdev_printk(lvl, pdev, fmt, args...) \ +#define pdev_printk(lvl, pdev, fmt, args...) \ printk("%s %s: " fmt, lvl, pci_name(pdev), ## args) #define dev_err(dev, fmt, args...) \ pdev_printk(KERN_ERR, to_pci_dev(dev), fmt, ## args)
lib/librte_eal/linuxapp/kni/kni_dev.h +0 -1
@@ -147,4 +147,3 @@ struct kni_vhost_queue {#endif #endif -
lib/librte_eal/linuxapp/kni/kni_misc.c +0 -1
@@ -607,4 +607,3 @@ MODULE_PARM_DESC(kthread_mode," multiple Multiple kernel thread mode enabled.\n" "\n" ); -
lib/librte_eal/linuxapp/kni/kni_vhost.c +1 -2
@@ -356,7 +356,7 @@ static int kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t total_len) { - struct kni_vhost_queue *q = + struct kni_vhost_queue *q = container_of(sock->sk, struct kni_vhost_queue, sk);int vnet_hdr_len =0 ;unsigned long len = total_len;
@@ -829,4 +829,3 @@ kni_vhost_init(struct kni_dev *kni)return 0 ; } -
lib/librte_kni/rte_kni.h +0 -1
@@ -305,4 +305,3 @@ extern void rte_kni_close(void);#endif #endif /* _RTE_KNI_H_ */ -
Signature · 1 line
2.1.4
Re: [PATCH 1/9] kni: fix whitespace
2015-06-04 07:43, Stephen Hemminger:
Quoted 22 lines
From: Stephen Hemminger <[email protected]>
Ran this code base through a script which:
- removes trailing whitespace
- removes space before tabs
- removes blank lines at end of fileSigned-off-by Stephen Hemminger <[email protected]>--- .../linuxapp/kni/ethtool/igb/e1000_api.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_manage.c | 2 - .../linuxapp/kni/ethtool/igb/e1000_mbx.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_nvm.c | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +- .../linuxapp/kni/ethtool/igb/igb_debugfs.c | 1 - .../linuxapp/kni/ethtool/igb/igb_ethtool.c | 26 ++++++------ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 +- .../linuxapp/kni/ethtool/igb/igb_param.c | 3 +- .../linuxapp/kni/ethtool/igb/igb_procfs.c | 46 +++++++++++----------- .../linuxapp/kni/ethtool/igb/igb_regtest.h | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c | 1 - lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 +-
Quoted 8 lines
.../linuxapp/kni/ethtool/igb/kcompat_ethtool.c | 11 +++--- .../linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_api.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_common.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 5 --- .../linuxapp/kni/ethtool/ixgbe/ixgbe_sriov.h | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c | 7 ++-- .../linuxapp/kni/ethtool/ixgbe/kcompat.h | 2 +-
Helin, do you approve patching kni base driver?
Re: [PATCH 1/9] kni: fix whitespace
Quoted 42 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Thursday, June 4, 2015 10:52 PM
To: Zhang, Helin
Cc: [email protected]; Stephen Hemminger
Subject: Re: [dpdk-dev] [PATCH 1/9] kni: fix whitespace2015-06-04 07:43, Stephen Hemminger:
Quoted 8 lines
From: Stephen Hemminger <[email protected]>
Ran this code base through a script which:
- removes trailing whitespace
- removes space before tabs
- removes blank lines at end of fileSigned-off-by Stephen Hemminger <[email protected]>Quoted 11 lines
--- .../linuxapp/kni/ethtool/igb/e1000_api.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_manage.c | 2 - .../linuxapp/kni/ethtool/igb/e1000_mbx.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_nvm.c | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +- .../linuxapp/kni/ethtool/igb/igb_debugfs.c | 1 - .../linuxapp/kni/ethtool/igb/igb_ethtool.c | 26 ++++++------ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 +- .../linuxapp/kni/ethtool/igb/igb_param.c | 3 +- .../linuxapp/kni/ethtool/igb/igb_procfs.c | 46+++++++++++-----------
Quoted 11 lines
.../linuxapp/kni/ethtool/igb/igb_regtest.h | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c | 1 - lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 +- .../linuxapp/kni/ethtool/igb/kcompat_ethtool.c | 11 +++--- .../linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_api.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_common.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 5 --- .../linuxapp/kni/ethtool/ixgbe/ixgbe_sriov.h | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c | 7 ++-- .../linuxapp/kni/ethtool/ixgbe/kcompat.h | 2 +-
Quoted 1 line
Helin, do you approve patching kni base driver?
Thomas, I have acked it, also another one in the same patch set for e1000 driver.
Re: [PATCH 1/9] kni: fix whitespace
In reply to Stephen HemmingerQuoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stephen Hemminger
Sent: Thursday, June 4, 2015 10:43 PM
To: [email protected]
Cc: Stephen Hemminger
Subject: [dpdk-dev] [PATCH 1/9] kni: fix whitespace
Quoted 8 lines
From: Stephen Hemminger <[email protected]>
Ran this code base through a script which:
- removes trailing whitespace
- removes space before tabs
- removes blank lines at end of fileSigned-off-by Stephen Hemminger <[email protected]>
Quoted 607 lines
--- .../linuxapp/kni/ethtool/igb/e1000_api.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_manage.c | 2 - .../linuxapp/kni/ethtool/igb/e1000_mbx.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_nvm.c | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +- .../linuxapp/kni/ethtool/igb/igb_debugfs.c | 1 - .../linuxapp/kni/ethtool/igb/igb_ethtool.c | 26 ++++++------ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 +- .../linuxapp/kni/ethtool/igb/igb_param.c | 3 +- .../linuxapp/kni/ethtool/igb/igb_procfs.c | 46 +++++++++++----------- .../linuxapp/kni/ethtool/igb/igb_regtest.h | 2 - lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c | 1 - lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 +- .../linuxapp/kni/ethtool/igb/kcompat_ethtool.c | 11 +++--- .../linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_api.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_common.c | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 5 --- .../linuxapp/kni/ethtool/ixgbe/ixgbe_sriov.h | 1 - .../linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c | 7 ++-- .../linuxapp/kni/ethtool/ixgbe/kcompat.h | 2 +- lib/librte_eal/linuxapp/kni/kni_dev.h | 1 - lib/librte_eal/linuxapp/kni/kni_misc.c | 1 - lib/librte_eal/linuxapp/kni/kni_vhost.c | 3 +- lib/librte_kni/rte_kni.h | 1 - 25 files changed, 50 insertions(+), 78 deletions(-)lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_api.c +0
-1@@ -1157,4 +1157,3 @@ s32 e1000_init_thermal_sensor_thresh(struct e1000_hw *hw)return E1000_SUCCESS ; } -lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_manage.c +0
-2@@ -552,5 +552,3 @@ s32 e1000_load_firmware(struct e1000_hw *hw, u8 *buffer, u32 length)return E1000_SUCCESS ; } - -lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mbx.c +0
-1@@ -523,4 +523,3 @@ s32 e1000_init_mbx_params_pf(struct e1000_hw *hw)return E1000_SUCCESS ; } } -lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_nvm.c +0
-2@@ -963,5 +963,3 @@ etrack_id: }return ; } - -lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h +1
-1@@ -229,7 +229,7 @@ struct igb_lro_stats {*/ struct igb_lrohdr {struct iphdr iph; -struct tcphdr th; +struct tcphdr th;__be32 ts[0 ]; };lib/librte_eal/linuxapp/kni/ethtool/igb/igb_debugfs.c +0
-1@@ -26,4 +26,3 @@************************************************************* ******************/ #include "igb.h" -lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +1
-1@@ -208,7 +208,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ecmd->port = PORT_FIBRE; ecmd->transceiver =XCVR_EXTERNAL ; - } + }if (hw->mac.autoneg !=1 )
ecmd->advertising&= ~(ADVERTISED_Pause | @@ -1377,7 +1377,7
@@ static intigb_integrated_phy_loopback(struct igb_adapter *adapter)lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +2
-2} }else {/* enable MII loopback */ -if (hw->phy.type == e1000_phy_82580) +if (hw->phy.type == e1000_phy_82580)e1000_write_phy_reg (hw,I82577_PHY_LBK_CTRL ,0x8041 ); }@@ -1403,7 +1403,7 @@ static int igb_integrated_phy_loopback(structigb_adapter *adapter) */ if (hw->phy.type == e1000_phy_m88)igb_phy_disable_receiver (adapter); - +mdelay (500 );return 0 ;}
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +1
-1@@ -1434,7 +1434,7 @@ static int igb_setup_loopback_test(struct igb_adapter *adapter)E1000_WRITE_REG (hw,E1000_MPHY_ADDR_CTL , reg); reg =E1000_READ_REG (hw,E1000_MPHY_DATA ); - reg |=E1000_MPHY_PCS_CLK_REG_DIGINELBEN ; + reg |=E1000_MPHY_PCS_CLK_REG_DIGINELBEN ;E1000_WRITE_REG (hw,E1000_MPHY_DATA , reg);}lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +1
-1@@ -1489,7 +1489,7 @@ static void igb_loopback_cleanup(struct igb_adapter *adapter)u16 phy_reg;if ((hw->device_id ==E1000_DEV_ID_DH89XXCC_SGMII ) || - (hw->device_id ==E1000_DEV_ID_DH89XXCC_SERDES ) || + (hw->device_id ==E1000_DEV_ID_DH89XXCC_SERDES ) || (hw->device_id ==E1000_DEV_ID_DH89XXCC_BACKPLANE ) || (hw->device_id ==E1000_DEV_ID_DH89XXCC_SFP )) {lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +4
-4u32 reg;@@ -1498,13 +1498,13 @@ static void igb_loopback_cleanup(struct igb_adapter *adapter) reg =E1000_READ_REG (hw,E1000_MPHY_ADDR_CTL ); reg = (reg &E1000_MPHY_ADDR_CTL_OFFSET_MASK ) |E1000_MPHY_PCS_CLK_REG_OFFSET ; -E1000_WRITE_REG (hw,E1000_MPHY_ADDR_CTL , reg); +E1000_WRITE_REG (hw,E1000_MPHY_ADDR_CTL , reg); reg =E1000_READ_REG (hw,E1000_MPHY_DATA ); - reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN ; -E1000_WRITE_REG (hw,E1000_MPHY_DATA , reg); + reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN ; +E1000_WRITE_REG (hw,E1000_MPHY_DATA , reg); } - + rctl =E1000_READ_REG (hw,E1000_RCTL ); rctl &= ~(E1000_RCTL_LBM_TCVR |E1000_RCTL_LBM_MAC );
E1000_WRITE_REG(hw, E1000_RCTL, rctl); @@ -1776,7 +1776,7 @@ static
void igb_diag_test(structnet_device*netdev,lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +1
-1/* power up link for link test */ igb_power_up_link (adapter); - +/* Link test performed before hardware reset so autoneg doesn't * interfere with test result */ if (igb_link_test(adapter, &data[4])) @@ -1981,7 +1981,7 @@ static intigb_set_coalesce(struct
net_device*netdev,lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +1
-1if (ec->rx_coalesce_usecs ==0 ) { adapter->dmac =IGB_DMAC_DISABLE ; } - +/* convert to rate of irq's per second */ if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <=3 ) adapter->rx_itr_setting = ec->rx_coalesce_usecs; @@ -2416,7 +2416,7@@ static void igb_get_dmac(struct
net_device*netdev, {lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +1
-3struct igb_adapter *adapter =netdev_priv (netdev); edata->data = adapter->dmac; - + return; }#endif @@ -2855,5 +2855,3 @@ void igb_set_ethtool_ops(struct net_device *netdev) } #endif /* HAVE_RHEL6_ETHTOOL_OPS_EXT_STRUCT */#endif /* SIOCETHTOOL */ - -lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +1
-1@@ -9500,7 +9500,7 @@ static void igb_vmm_control(struct igb_adapter *adapter) }/* enable replication and loopback support */ - count = adapter->vfs_allocated_count || adapter->vmdq_pools; + count = adapter->vfs_allocated_count || adapter->vmdq_pools;if (adapter->flags &IGB_FLAG_LOOPBACK_ENABLE && count)e1000_vmdq_set_loopback_pf (hw,1 );lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +0
-0e1000_vmdq_set_anti_spoofing_pf(hw,lib/librte_eal/linuxapp/kni/ethtool/igb/igb_param.c +0
-0@@ -167,7 +167,7 @@ IGB_PARAM(max_vfs, "Number of Virtual Functions: 0 =disable, 1-7 enable, defaul
/* MDD (Enable Malicious Driver Detection)
*
* Only available when SR-IOV is enabled -max_vfsis greater than 0
- *
+ *
* Valid Range: 0, 1
*
* Default Value: 1lib/librte_eal/linuxapp/kni/ethtool/igb/igb_param.c +0
-1@@ -845,4 +845,3 @@ void igb_check_options(struct igb_adapter *adapter)#endif } } -lib/librte_eal/linuxapp/kni/ethtool/igb/igb_procfs.c +4
-4@@ -63,12 +63,12 @@ bool igb_thermal_present(struct igb_adapter *adapter) status = hw->mac.ops.init_thermal_sensor_thresh (hw);if (status !=E1000_SUCCESS )return false; - +return true; } -static int igb_macburn (char *page,char **start,off_t off,int count, +static int igb_macburn (char *page,char **start,off_t off,int count,int *eof,void *data) {struct e1000_hw *hw;@@ -89,7 +89,7 @@ static int igb_macburn(char *page, char **start, off_t off, int count, (unsigned int)hw->mac.perm_addr[5]); } -static int igb_macadmn (char *page,char **start,off_t off, +static int igb_macadmn (char *page,char **start,off_t off,int count,int *eof,void *data) {struct e1000_hw *hw;@@ -139,7 +139,7 @@ static int igb_porttype(char *page, char **start, off_t off,int count, test_bit(__IGB_DOWN, &adapter->state)); } -static int igb_therm_location (char *page,char **start,off_t off, +static int igb_therm_location (char *page,char **start,off_t off,int count,int *eof,void *data) { struct igb_therm_proc_data *therm_data = @@ -151,7 +151,7 @@ static int igb_therm_location(char *page, char **start, off_t off,lib/librte_eal/linuxapp/kni/ethtool/igb/igb_procfs.c +1
-1return snprintf (page, count,"%d\n" , therm_data->sensor_data->location); } -static int igb_therm_maxopthresh (char *page,char **start,off_t off, +static int igb_therm_maxopthresh (char *page,char **start,off_t off,int count,int *eof,void *data) { struct igb_therm_proc_data *therm_data = @@ -164,7 +164,7 @@ static intigb_therm_maxopthresh(char *page, char **start,
off_toff,lib/librte_eal/linuxapp/kni/ethtool/igb/igb_procfs.c +1
-1therm_data->sensor_data->max_op_thresh); } -static int igb_therm_cautionthresh (char *page,char **start,off_t off, +static int igb_therm_cautionthresh (char *page,char **start,off_t off,int count,int *eof,void *data) { struct igb_therm_proc_data *therm_data = @@ -177,7 +177,7 @@ static intigb_therm_cautionthresh(char *page, char **start,
off_toff,lib/librte_eal/linuxapp/kni/ethtool/igb/igb_procfs.c +2
-2therm_data->sensor_data->caution_thresh); } -static int igb_therm_temp (char *page,char **start,off_t off, +static int igb_therm_temp (char *page,char **start,off_t off,int count,int *eof,void *data) {s32 status;@@ -188,7 +188,7 @@ static int igb_therm_temp(char *page, char **start, off_t off, return snprintf(page, count, "error: no therm_data\n"); status =e1000_get_thermal_sensor_data (therm_data->hw); -if (status !=E1000_SUCCESS ) +if (status !=E1000_SUCCESS )snprintf (page, count,"error: status %d returned\n" , status);lib/librte_eal/linuxapp/kni/ethtool/igb/igb_procfs.c +15
-15return snprintf (page, count,"%d\n" , therm_data->sensor_data->temp);@@ -211,7 +211,7 @@ struct igb_proc_type igb_internal_entries[] = { {"location", &igb_therm_location}, {"temp", &igb_therm_temp}, {"cautionthresh", &igb_therm_cautionthresh}, - {"maxopthresh", &igb_therm_maxopthresh}, + {"maxopthresh", &igb_therm_maxopthresh}, {"", NULL} };@@ -243,7 +243,7 @@ void igb_del_proc_entries(struct igb_adapter *adapter)if (igb_proc_entries[index].read ==NULL )break ;remove_proc_entry (igb_proc_entries[index].name, - adapter->info_dir); + adapter->info_dir); }remove_proc_entry ("info" , adapter->eth_dir); }@@ -253,12 +253,12 @@ void igb_del_proc_entries(struct igb_adapter *adapter) }/* called from igb_main.c */ -void igb_procfs_exit (struct igb_adapter *adapter) +void igb_procfs_exit (struct igb_adapter *adapter) {igb_del_proc_entries (adapter); } -int igb_procfs_topdir_init (void ) +int igb_procfs_topdir_init (void ) { igb_top_dir =proc_mkdir ("driver/igb" ,NULL );if (igb_top_dir ==NULL )@@ -267,13 +267,13 @@ int igb_procfs_topdir_init(void)return 0 ; } -void igb_procfs_topdir_exit (void ) +void igb_procfs_topdir_exit (void ) {remove_proc_entry ("driver/igb" ,NULL ); }/* called from igb_main.c */ -int igb_procfs_init (struct igb_adapter *adapter) +int igb_procfs_init (struct igb_adapter *adapter) {int rc =0 ;int i;@@ -305,10 +305,10 @@ int igb_procfs_init(struct igb_adapter *adapter)if (igb_proc_entries[index].read ==NULL ) {break ; } -if (!(create_proc_read_entry (igb_proc_entries[index].name, -0444 , - adapter->info_dir, - igb_proc_entries[index].read, +if (!(create_proc_read_entry (igb_proc_entries[index].name, +0444 , + adapter->info_dir, + igb_proc_entries[index].read, adapter))) { rc = -ENOMEM ;@@ -337,14 +337,14 @@ int igb_procfs_init(struct igb_adapter *adapter)* will be needing */ adapter->therm_data[i].hw = &adapter->hw; - adapter->therm_data[i].sensor_data = + adapter->therm_data[i].sensor_data = &adapter->hw.mac.thermal_sensor_data.sensor[i];if (!(create_proc_read_entry ( - igb_internal_entries[index].name, -0444 , - adapter->therm_dir[i], - igb_internal_entries[index].read, + igb_internal_entries[index].name, +0444 , + adapter->therm_dir[i], + igb_internal_entries[index].read, &adapter->therm_data[i]))) { rc = -ENOMEM ; goto fail;lib/librte_eal/linuxapp/kni/ethtool/igb/igb_regtest.h +0
-2@@ -247,5 +247,3 @@ static struct igb_reg_test reg_test_82575[] = { 0xFFFFFFFF, 0xFFFFFFFF }, { 0, 0, 0, 0 } }; - -lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c +0
-1@@ -434,4 +434,3 @@ void igb_vmdq_set_ethtool_ops(struct net_device *netdev)#endif /* CONFIG_IGB_VMDQ_NETDEV */ -lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +1
-1@@ -1184,7 +1184,7 @@ static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)return (struct device *) pdev; } -#define pdev_printk(lvl, pdev, fmt, args...) \ +#define pdev_printk(lvl, pdev, fmt, args...) \ printk("%s %s: " fmt, lvl, pci_name(pdev), ## args) #define dev_err(dev, fmt, args...) \
pdev_printk(KERN_ERR, to_pci_dev(dev), fmt, ## args)@@ -3807,7 +3807,7
@@ static inline boolis_link_local_ether_addr(const u8 *addr)
pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)),
member))#undef
hlist_for_each_entry_safelib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +1
-1-#define hlist_for_each_entry_safe (pos, n, head, member) \ +#define hlist_for_each_entry_safe (pos, n, head, member) \ for (pos = hlist_entry_safe((head)->first, typeof(*pos), member); \ pos && ({ n = pos->member.next; 1; }); \ pos = hlist_entry_safe(n, typeof(*pos), member)) diff --git
a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat_ethtool.cb/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat_ethtool.cindex 3adf869..e1a8938 100644lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat_ethtool.c +5
-6@@ -37,11 +37,11 @@* * Modification by [email protected] to work as backward compat * solution for pre-ethtool_ops kernels. -* - copied struct ethtool_ops from ethtool.h -* - defined SET_ETHTOOL_OPS -* - put in some #ifndef NETIF_F_xxx wrappers -* - changes refs to dev->ethtool_ops to ethtool_ops -* - changed dev_ethtool to ethtool_ioctl +* - copied struct ethtool_ops from ethtool.h +* - defined SET_ETHTOOL_OPS +* - put in some #ifndef NETIF_F_xxx wrappers +* - changes refs to dev->ethtool_ops to ethtool_ops +* - changed dev_ethtool to ethtool_ioctl * - remove EXPORT_SYMBOL()s * - added _kc_ prefix in built-in ethtool_op_xxx ops. */ @@ -1169,4 +1169,3 @@ int _kc_generic_mii_ioctl(struct mii_if_info *mii_if, return rc; }#endif /* > 2.4.6 */ -lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c +0
-1@@ -2311,4 +2311,3 @@ release_i2c_access:return status; } -lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_api.c +0
-1@@ -1155,4 +1155,3 @@ void ixgbe_release_swfw_semaphore(struct ixgbe_hw *hw, u16 mask)if (hw->mac.ops.release_swfw_sync) hw->mac.ops.release_swfw_sync (hw, mask); } -lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_common.c +0
-1@@ -4080,4 +4080,3 @@ s32 ixgbe_init_thermal_sensor_thresh_generic(struct ixgbe_hw *hw) }return status; } -lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c +0
-5@@ -2968,8 +2968,3 @@ void ewarn(struct ixgbe_hw *hw, const char *st, u32 status) netif_warn(adapter, drv, adapter->netdev, "%s", st); } - - - - -lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_sriov.h +0
-1@@ -71,4 +71,3 @@ void ixgbe_dump_registers(struct ixgbe_adapter *adapter);#define IXGBE_DEV_ID_X540_VF 0x1515#endif /* _IXGBE_SRIOV_H_ */ -lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c +4
-4@@ -188,12 +188,12 @@ s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw) {s32 status =0 ; -/* -* Userland DPDK takes the ownershiop of device +/* +* Userland DPDK takes the ownershiop of device * Kernel driver here used as the simple path for ethtool only * Won't real reset device anyway */ -#if 0 +#if 0 u32 ctrl, i; /* Call adapter stop to disable tx/rx and clear interrupts */ @@ -935,4 +935,3 @@ s32 ixgbe_blink_led_stop_X540(struct ixgbe_hw *hw, u32 index) return 0; } -lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h +1
-1@@ -1133,7 +1133,7 @@ static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)return (struct device *) pdev; } -#define pdev_printk(lvl, pdev, fmt, args...) \ +#define pdev_printk(lvl, pdev, fmt, args...) \ printk("%s %s: " fmt, lvl, pci_name(pdev), ## args) #define dev_err(dev, fmt, args...) \
pdev_printk(KERN_ERR, to_pci_dev(dev), fmt, ## args)diff --gita/lib/librte_eal/linuxapp/kni/kni_dev.hb/lib/librte_eal/linuxapp/kni/kni_dev.hindex e79e472..a0e5cb6 100644lib/librte_eal/linuxapp/kni/kni_dev.h +0
-1@@ -147,4 +147,3 @@ struct kni_vhost_queue { #endif#endif -lib/librte_eal/linuxapp/kni/kni_misc.c +0
-1@@ -607,4 +607,3 @@ MODULE_PARM_DESC(kthread_mode," multiple Multiple kernel thread mode enabled.\n" "\n" ); -lib/librte_eal/linuxapp/kni/kni_vhost.c +1
-2@@ -356,7 +356,7 @@ static int kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t total_len) { - struct kni_vhost_queue *q = + struct kni_vhost_queue *q = container_of(sock->sk, struct kni_vhost_queue, sk);int vnet_hdr_len =0 ;unsigned long len = total_len;@@ -829,4 +829,3 @@ kni_vhost_init(struct kni_dev *kni)return 0 ; } -lib/librte_kni/rte_kni.h index renamed from lib/librte_kni/rte_kni.h +0
-044240fe..603e2cd 100644
lib/librte_kni/rte_kni.h +0
-2@@ -305,4 +305,3 @@ extern void rte_kni_close(void); #endif#endif /* _RTE_KNI_H_ */ - --2.1.4
PATCH 2/9 eal: fix whitespace
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
Eliminate trailing whitespace, space after tabs, and extra blank lines
--- lib/librte_eal/bsdapp/contigmem/contigmem.c | 1 - lib/librte_eal/bsdapp/eal/Makefile | 1 - lib/librte_eal/bsdapp/eal/eal.c | 1 - lib/librte_eal/bsdapp/eal/eal_interrupts.c | 1 - lib/librte_eal/common/eal_common_hexdump.c | 3 +-- lib/librte_eal/common/eal_common_launch.c | 1 - lib/librte_eal/common/eal_common_log.c | 1 - lib/librte_eal/common/include/generic/rte_cycles.h | 8 ++++---- lib/librte_eal/common/include/rte_hexdump.h | 20 ++++++++++---------- lib/librte_eal/common/include/rte_interrupts.h | 1 - lib/librte_eal/common/include/rte_memory.h | 2 +- lib/librte_eal/common/include/rte_pci.h | 10 +++++----- lib/librte_eal/linuxapp/eal/Makefile | 1 - lib/librte_eal/linuxapp/eal/eal_interrupts.c | 1 - lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c | 2 +- 15 files changed, 22 insertions(+), 32 deletions(-)
lib/librte_eal/bsdapp/contigmem/contigmem.c +0 -1
@@ -230,4 +230,3 @@ contigmem_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size,return (0 ); } -
lib/librte_eal/bsdapp/eal/Makefile +0 -1
@@ -99,4 +99,3 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP)-include/exec-env := \ DEPDIRS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += lib/librte_eal/common include $(RTE_SDK)/mk/rte.lib.mk -
lib/librte_eal/bsdapp/eal/eal.c +0 -1
@@ -569,4 +569,3 @@ rte_eal_process_type(void) {return (rte_config.process_type); } -
lib/librte_eal/bsdapp/eal/eal_interrupts.c +0 -1
@@ -68,4 +68,3 @@ rte_eal_intr_init(void) {return 0 ; } -
lib/librte_eal/common/eal_common_hexdump.c +1 -2
@@ -103,7 +103,7 @@ rte_memdump(FILE *f, const char * title, const void * buf, unsigned int len) line[0 ] ='\0' ;for (i =0 , out =0 ; i < len; i++) { -// Make sure we do not overrun the line buffer length. +// Make sure we do not overrun the line buffer length. if ( out >= (LINE_LEN -4 ) ) {fprintf (f,"%s" , line); out =0 ;
@@ -118,4 +118,3 @@ rte_memdump(FILE *f, const char * title, const void * buf, unsigned int len)fflush (f); } -
lib/librte_eal/common/eal_common_launch.c +0 -1
@@ -116,4 +116,3 @@ rte_eal_mp_wait_lcore(void)rte_eal_wait_lcore (lcore_id); } } -
lib/librte_eal/common/eal_common_log.c +0 -1
@@ -331,4 +331,3 @@ rte_eal_common_log_init(FILE *default_log)rte_openlog_stream (default_log);return 0 ; } -
lib/librte_eal/common/include/generic/rte_cycles.h +4 -4
@@ -130,12 +130,12 @@ rte_get_hpet_hz(void);* then the HPET functions are unavailable and should not be called. * * @param make_default -* If set, the hpet timer becomes the default timer whose values are -* returned by the rte_get_timer_hz/cycles API calls +* If set, the hpet timer becomes the default timer whose values are +* returned by the rte_get_timer_hz/cycles API calls * * @return -* 0 on success, -* -1 on error, and the make_default parameter is ignored. +* 0 on success, +* -1 on error, and the make_default parameter is ignored. */ int rte_eal_hpet_init (int make_default);
lib/librte_eal/common/include/rte_hexdump.h +10 -10
@@ -49,15 +49,15 @@ extern "C" {* Dump out memory in a special hex dump format. * * @param f -* A pointer to a file for output +* A pointer to a file for output * @param title -* If not NULL this string is printed as a header to the output. +* If not NULL this string is printed as a header to the output. * @param buf -* This is the buffer address to print out. +* This is the buffer address to print out. * @param len -* The number of bytes to dump out +* The number of bytes to dump out * @return -* None. +* None. */ extern void
@@ -67,15 +67,15 @@ rte_hexdump(FILE *f, const char * title, const void * buf, unsigned int len);* Dump out memory in a hex format with colons between bytes. * * @param f -* A pointer to a file for output +* A pointer to a file for output * @param title -* If not NULL this string is printed as a header to the output. +* If not NULL this string is printed as a header to the output. * @param buf -* This is the buffer address to print out. +* This is the buffer address to print out. * @param len -* The number of bytes to dump out +* The number of bytes to dump out * @return -* None. +* None. */ void
lib/librte_eal/common/include/rte_interrupts.h +0 -1
@@ -118,4 +118,3 @@ int rte_intr_disable(struct rte_intr_handle *intr_handle);#endif #endif -
lib/librte_eal/common/include/rte_memory.h +1 -1
@@ -196,7 +196,7 @@ phys_addr_t rte_mem_phy2mch(uint32_t memseg_id, const phys_addr_t phy_addr);* * @return * 0: successfully -* negative: error +* negative: error */ int rte_xen_dom0_memory_init (void );
lib/librte_eal/common/include/rte_pci.h +5 -5
@@ -239,10 +239,10 @@ do { \* a domain prefix (i.e. domain returned is always 0) * * @param input -* The input string to be parsed. Should have the format XX:XX.X +* The input string to be parsed. Should have the format XX:XX.X * @param dev_addr -* The PCI Bus-Device-Function address to be returned. Domain will always be -* returned as 0 +* The PCI Bus-Device-Function address to be returned. Domain will always be +* returned as 0 * @return * 0 on success, negative on error. */
@@ -262,9 +262,9 @@ eal_parse_pci_BDF(const char *input, struct rte_pci_addr *dev_addr)* a domain prefix. * * @param input -* The input string to be parsed. Should have the format XXXX:XX:XX.X +* The input string to be parsed. Should have the format XXXX:XX:XX.X * @param dev_addr -* The PCI Bus-Device-Function address to be returned +* The PCI Bus-Device-Function address to be returned * @return * 0 on success, negative on error. */
lib/librte_eal/linuxapp/eal/Makefile +0 -1
@@ -119,4 +119,3 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP)-include/exec-env := \ DEPDIRS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += lib/librte_eal/common include $(RTE_SDK)/mk/rte.lib.mk -
lib/librte_eal/linuxapp/eal/eal_interrupts.c +0 -1
@@ -894,4 +894,3 @@ rte_eal_intr_init(void)return -ret; } -
lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c +1 -1
@@ -463,7 +463,7 @@ dom0_memory_reserve(uint32_t rsv_size) }sort_viraddr (rsv_mm_info, num_block); - +for (i =0 ; i< num_block; i++) {/*
Signature · 1 line
2.1.4
PATCH 3/9 cmdline: fix whitespace
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
Get rid of trailing whitespace, etc.
--- lib/librte_cmdline/cmdline_cirbuf.c | 1 - lib/librte_cmdline/cmdline_parse.c | 1 - lib/librte_cmdline/cmdline_rdline.c | 1 - 3 files changed, 3 deletions(-)
lib/librte_cmdline/cmdline_cirbuf.c +0 -1
@@ -464,4 +464,3 @@ cirbuf_get_tail(struct cirbuf * cbuf) {return cbuf->buf[cbuf->end]; } -
lib/librte_cmdline/cmdline_parse.c +0 -1
@@ -561,4 +561,3 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state, }return 0 ; } -
lib/librte_cmdline/cmdline_rdline.c +0 -1
@@ -695,4 +695,3 @@ rdline_miniprintf(struct rdline *rdl, const char * buf, unsigned int val) } } } -
Signature · 1 line
2.1.4
PATCH 4/9 vhost: fix trailing whitespace
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
--- lib/librte_vhost/libvirt/qemu-wrap.py | 13 ++++++------- lib/librte_vhost/vhost_rxtx.c | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-)
lib/librte_vhost/libvirt/qemu-wrap.py +6 -7
@@ -49,17 +49,17 @@ # # 3.a) Set the VM to use the launch script # -# Set the emulator path contained in the +# Set the emulator path contained in the # <emulator><emulator/> tags # -# e.g replace <emulator>/usr/bin/qemu-kvm<emulator/> +# e.g replace <emulator>/usr/bin/qemu-kvm<emulator/> # with <emulator>/usr/bin/qemu-wrap.py<emulator/> # # 3.b) Set the VM's device's to use vhost-net offload # # <interface type="network"> -# <model type="virtio"/> -# <driver name="vhost"/> +# <model type="virtio"/> +# <driver name="vhost"/> # <interface/> # # 4. Enable libvirt to access our userpace device file by adding it to
@@ -229,7 +229,7 @@ def get_vhost_fd(): # flags onto the end ############################################# def modify_netdev_arg(arg): - + global fd_list vhost_in_use = 0 s = ''
@@ -259,7 +259,7 @@ def modify_netdev_arg(arg): s+=opt - return s + return s #############################################
@@ -364,4 +364,3 @@ def main(): if __name__ == "__main__": main() -
lib/librte_vhost/vhost_rxtx.c +1 -1
@@ -615,7 +615,7 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, uint16_t queue_id,if (unlikely (m ==NULL )) {RTE_LOG (ERR ,VHOST_DATA ,"Failed to allocate memory for mbuf.\n" ); -break ; +break ; } seg_offset =0 ; seg_avail = m->buf_len -RTE_PKTMBUF_HEADROOM ;
Signature · 1 line
2.1.4
PATCH 5/9 lib: fix misc whitespace
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
More places with trailing whitespace, and empty blank lines
--- lib/librte_compat/rte_compat.h | 8 ++++---- lib/librte_hash/rte_fbk_hash.c | 1 - lib/librte_lpm/rte_lpm.c | 1 - lib/librte_malloc/malloc_heap.c | 1 - 4 files changed, 4 insertions(+), 7 deletions(-)
lib/librte_compat/rte_compat.h +4 -4
@@ -54,16 +54,16 @@* foo is exported as a global symbol. * * 2) rename the existing function int foo(char *string) to -* int __vsym foo_v20(char *string) +* int __vsym foo_v20(char *string) * * 3) Add this macro immediately below the function -* VERSION_SYMBOL(foo, _v20, 2.0); +* VERSION_SYMBOL(foo, _v20, 2.0); * * 4) Implement a new version of foo. -* char foo(int value, int otherval) { ...} +* char foo(int value, int otherval) { ...} * * 5) Mark the newest version as the default version -* BIND_DEFAULT_SYMBOL(foo, 2.1); +* BIND_DEFAULT_SYMBOL(foo, 2.1); * */
lib/librte_hash/rte_fbk_hash.c +0 -1
@@ -226,4 +226,3 @@ rte_fbk_hash_free(struct rte_fbk_hash_table *ht)rte_free (ht);rte_free (te); } -
lib/librte_lpm/rte_lpm.c +0 -1
@@ -1006,4 +1006,3 @@ rte_lpm_delete_all(struct rte_lpm *lpm)/* Delete all rules form the rules table. */ memset (lpm->rules_tbl,0 ,sizeof (lpm->rules_tbl[0 ]) * lpm->max_rules); } -
lib/librte_malloc/malloc_heap.c +0 -1
@@ -206,4 +206,3 @@ malloc_heap_get_stats(const struct malloc_heap *heap, socket_stats->alloc_count = heap->alloc_count;return 0 ; } -
Signature · 1 line
2.1.4
PATCH 6/9 app: fix whitespace
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
Fix trailing whitespace, space before tab and empty lines at end of file.
--- app/cmdline_test/cmdline_test.py | 3 +-- app/cmdline_test/cmdline_test_data.py | 1 - app/test-pmd/csumonly.c | 1 - app/test-pmd/mempool_anon.c | 4 ++-- app/test-pmd/testpmd.c | 8 +++---- app/test/autotest.py | 1 - app/test/autotest_data.py | 28 ++++++++++++------------ app/test/autotest_runner.py | 41 +++++++++++++++++------------------ app/test/autotest_test_funcs.py | 1 - app/test/process.h | 12 +++++----- app/test/test_acl.h | 4 ++-- app/test/test_sched.c | 8 +++---- 12 files changed, 53 insertions(+), 59 deletions(-)
app/cmdline_test/cmdline_test.py +1 -2
@@ -67,7 +67,7 @@ def runHistoryTest(child): while i < history_size / 10: # add 1 to prevent from parsing as octals child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER) - # the app will simply print out the number + # the app will simply print out the number child.expect(str(i + 100000000), timeout=1) i += 1 # scroll back history
@@ -111,4 +111,3 @@ except: sys.exit(1) child.close() sys.exit(0) -
app/cmdline_test/cmdline_test_data.py +0 -1
@@ -309,4 +309,3 @@ tests = [ "Sequence" : CTRL_D*3, "Result" : None}, ] -
app/test-pmd/csumonly.c +0 -1
@@ -706,4 +706,3 @@ struct fwd_engine csum_fwd_engine = { .port_fwd_end = NULL, .packet_fwd = pkt_burst_checksum_forward, }; -
app/test-pmd/mempool_anon.c +2 -2
@@ -130,8 +130,8 @@ mempool_anon_create(const char *name, unsigned elt_num, unsigned elt_size, (rc = get_phys_map(va, pa, pg_num, pg_sz)) == 0) { /* - * Check that allocated size is big enough to hold elt_num - * objects and a calcualte how many bytes are actually required. + * Check that allocated size is big enough to hold elt_num + * objects and a calcualte how many bytes are actually required. */ if ((usz = rte_mempool_xmem_usage(va, elt_num, total_size, pa,
app/test-pmd/testpmd.c +4 -4
@@ -1822,10 +1822,10 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, struct dcb_config *dcb_conf) {uint8_t i; -/* -* Builds up the correct configuration for dcb+vt based on the vlan tags array -* given above, and the number of traffic classes available for use. -*/ +/* +* Builds up the correct configuration for dcb+vt based on the vlan tags array +* given above, and the number of traffic classes available for use. +*/ if (dcb_conf->dcb_mode ==DCB_VT_ENABLED ) {struct rte_eth_vmdq_dcb_conf vmdq_rx_conf;struct rte_eth_vmdq_dcb_tx_conf vmdq_tx_conf;
app/test/autotest.py +0 -1
@@ -73,4 +73,3 @@ for test_group in autotest_data.non_parallel_test_group_list: runner.add_non_parallel_test_group(test_group) runner.run_all_tests() -
app/test/autotest_data.py +14 -14
@@ -56,7 +56,7 @@ parallel_test_group_list = [ { "Prefix": "group_1", "Memory" : all_sockets(8), - "Tests" : + "Tests" : [ { "Name" : "Timer autotest",
@@ -69,7 +69,7 @@ parallel_test_group_list = [ "Command" : "debug_autotest", "Func" : default_autotest, "Report" : None, - }, + }, { "Name" : "Errno autotest", "Command" : "errno_autotest",
@@ -87,7 +87,7 @@ parallel_test_group_list = [ "Command" : "common_autotest", "Func" : default_autotest, "Report" : None, - }, + }, { "Name" : "Dump log history", "Command" : "dump_log_history",
@@ -111,7 +111,7 @@ parallel_test_group_list = [ { "Prefix": "group_2", "Memory" : "32", - "Tests" : + "Tests" : [ { "Name" : "Memory autotest",
@@ -166,7 +166,7 @@ parallel_test_group_list = [ { "Prefix": "group_3", "Memory" : all_sockets(1024), - "Tests" : + "Tests" : [ { "Name" : "LPM autotest",
@@ -209,7 +209,7 @@ parallel_test_group_list = [ { "Prefix": "group_4", "Memory" : all_sockets(128), - "Tests" : + "Tests" : [ { "Name" : "PCI autotest",
@@ -252,7 +252,7 @@ parallel_test_group_list = [ { "Prefix": "group_5", "Memory" : "16", - "Tests" : + "Tests" : [ { "Name" : "Spinlock autotest",
@@ -289,7 +289,7 @@ parallel_test_group_list = [ { "Prefix": "group_6", "Memory" : all_sockets(620), - "Tests" : + "Tests" : [ { "Name" : "Function reentrancy autotest",
@@ -369,7 +369,7 @@ non_parallel_test_group_list = [ { "Prefix": "mempool_perf", "Memory" : all_sockets(256), - "Tests" : + "Tests" : [ { "Name" : "Cycles autotest",
@@ -388,7 +388,7 @@ non_parallel_test_group_list = [ { "Prefix": "memcpy_perf", "Memory" : all_sockets(512), - "Tests" : + "Tests" : [ { "Name" : "Memcpy performance autotest",
@@ -401,7 +401,7 @@ non_parallel_test_group_list = [ { "Prefix": "hash_perf", "Memory" : all_sockets(512), - "Tests" : + "Tests" : [ { "Name" : "Hash performance autotest",
@@ -466,7 +466,7 @@ non_parallel_test_group_list = [ { "Prefix": "timer_perf", "Memory" : all_sockets(512), - "Tests" : + "Tests" : [ { "Name" : "Timer performance autotest",
@@ -476,14 +476,14 @@ non_parallel_test_group_list = [ }, ] }, - + # # Please always make sure that ring_perf is the last test! # { "Prefix": "ring_perf", "Memory" : all_sockets(512), - "Tests" : + "Tests" : [ { "Name" : "Ring performance autotest",
app/test/autotest_runner.py +20 -21
119 lines not on this page · raw message
app/test/autotest_test_funcs.py +0 -1
@@ -295,4 +295,3 @@ def ring_autotest(child, test_name): return -1, "Fail [Bad watermark]" return 0, "Success" -
app/test/process.h +6 -6
@@ -67,14 +67,14 @@ process_dup(const char *const argv[], int numargs, const char *env_value)/* make a copy of the arguments to be passed to exec */ for (i =0 ; i < numargs; i++) argv_cpy[i] =strdup (argv[i]); -#ifdef RTE_LIBRTE_XEN_DOM0 - argv_cpy[i] =strdup ("--xen-dom0" ); - argv_cpy[i +1 ] =NULL ; +#ifdef RTE_LIBRTE_XEN_DOM0 + argv_cpy[i] =strdup ("--xen-dom0" ); + argv_cpy[i +1 ] =NULL ; num = numargs +1 ; -#else +#else argv_cpy[i] =NULL ; num = numargs; -#endif +#endif /* close all open file descriptors, check /proc/self/fd to only * call close on open fds. Exclude fds 0, 1 and 2*/
@@ -96,7 +96,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value) }/* parent process does a wait */ while (wait (&status) != pid) - ; + ;return status; }
app/test/test_acl.h +2 -2
@@ -35,8 +35,8 @@#define TEST_ACL_H_ struct ipv4_7tuple { -uint16_t vlan; -uint16_t domain; +uint16_t vlan; +uint16_t domain;uint8_t proto;uint32_t ip_src;uint32_t ip_dst;
app/test/test_sched.c +4 -4
@@ -46,10 +46,10 @@#include <rte_sched.h> -#define SUBPORT 0 -#define PIPE 1 -#define TC 2 -#define QUEUE 3 +#define SUBPORT 0 +#define PIPE 1 +#define TC 2 +#define QUEUE 3static struct rte_sched_subport_params subport_param[] = { {
Signature · 1 line
2.1.4
PATCH 7/9 examples: fix whitespace
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
--- examples/cmdline/commands.c | 1 - .../dpdk_qat/config_files/shumway/dh89xxcc_qa_dev0.conf | 2 -- .../dpdk_qat/config_files/shumway/dh89xxcc_qa_dev1.conf | 2 -- .../dpdk_qat/config_files/stargo/dh89xxcc_qa_dev0.conf | 2 -- examples/kni/main.c | 1 - examples/l2fwd/main.c | 1 - examples/l3fwd-power/main.c | 8 ++++---- examples/multi_process/client_server_mp/mp_server/args.c | 1 - examples/netmap_compat/lib/compat_netmap.c | 6 +++--- examples/qos_sched/app_thread.c | 2 -- examples/qos_sched/args.c | 1 - examples/qos_sched/cfg_file.c | 2 -- examples/qos_sched/main.c | 1 - examples/qos_sched/main.h | 2 +- examples/qos_sched/stats.c | 1 - examples/quota_watermark/qw/init.c | 2 +- examples/quota_watermark/qw/init.h | 1 - examples/vhost/main.c | 9 ++++----- examples/vhost_xen/main.c | 16 ++++++++-------- examples/vhost_xen/vhost_monitor.c | 6 ++---- 20 files changed, 23 insertions(+), 44 deletions(-)
examples/cmdline/commands.c +0 -1
@@ -281,4 +281,3 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_help, NULL, }; -
examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev0.conf +0 -2
@@ -291,5 +291,3 @@ Cy15CoreAffinity = 23 NumberCyInstances = 0 NumberDcInstances = 0 NumProcesses = 0 - -
examples/dpdk_qat/config_files/shumway/dh89xxcc_qa_dev1.conf +0 -2
@@ -290,5 +290,3 @@ Cy15CoreAffinity = 31 NumberCyInstances = 0 NumberDcInstances = 0 NumProcesses = 0 - -
examples/dpdk_qat/config_files/stargo/dh89xxcc_qa_dev0.conf +0 -2
@@ -233,5 +233,3 @@ Cy7CoreAffinity = 7 NumberCyInstances = 0 NumberDcInstances = 0 NumProcesses = 0 - -
examples/kni/main.c +0 -1
@@ -926,4 +926,3 @@ main(int argc, char** argv)return 0 ; } -
examples/l2fwd/main.c +0 -1
@@ -705,4 +705,3 @@ main(int argc, char **argv)return 0 ; } -
examples/l3fwd-power/main.c +4 -4
@@ -873,7 +873,7 @@ main_loop(__attribute__((unused)) void *dummy) rx_queue->freq_up_hint =power_freq_scaleup_heuristic (lcore_id, portid, queueid); - } + }/* Prefetch first packets */ for (j =0 ; j <PREFETCH_OFFSET && j < nb_rx; j++) {
@@ -915,8 +915,8 @@ main_loop(__attribute__((unused)) void *dummy)/** * All Rx queues empty in recent consecutive polls, * sleep in a conservative manner, meaning sleep as -* less as possible. -*/ +* less as possible. +*/ for (i =1 , lcore_idle_hint = qconf->rx_queue_list[0 ].idle_hint; i < qconf->n_rx_queue; ++i) {
@@ -929,7 +929,7 @@ main_loop(__attribute__((unused)) void *dummy)/** * execute "pause" instruction to avoid context * switch for short sleep. -*/ +*/ rte_delay_us (lcore_idle_hint); else/* long sleep force runing thread to suspend */
examples/multi_process/client_server_mp/mp_server/args.c +0 -1
@@ -170,4 +170,3 @@ parse_app_args(uint8_t max_ports, int argc, char *argv[]) }return 0 ; } -
examples/netmap_compat/lib/compat_netmap.c +3 -3
@@ -550,7 +550,7 @@ tx_sync_ring(struct netmap_ring *ring, uint8_t port, uint16_t ring_number, burst_size = (uint16_t )RTE_MIN (n_used_slots,RTE_DIM (tx_mbufs));for (i =0 ; i < burst_size; i++) { - tx_mbufs[i] =rte_pktmbuf_alloc (pool); + tx_mbufs[i] =rte_pktmbuf_alloc (pool);if (tx_mbufs[i] ==NULL ) goto err;
@@ -638,7 +638,7 @@ rte_netmap_init(const struct rte_netmap_conf *conf) port_num =RTE_MAX_ETHPORTS ; port_rings =2 * conf->max_rings; port_slots = port_rings * conf->max_slots; - port_bufs = port_slots; + port_bufs = port_slots; nmif_sz =NETMAP_IF_RING_OFS (port_rings, port_rings, port_slots); sz = nmif_sz * port_num;
@@ -870,7 +870,7 @@ rte_netmap_poll(struct pollfd *fds, nfds_t nfds, int timeout) idx =FD_TO_IDX (fds[i].fd);if ((port = fd_port[idx].port) >=RTE_DIM (ports) || - ports[port].fd != idx) { + ports[port].fd != idx) { fds[i].revents |=POLLERR ; ret++;
examples/qos_sched/app_thread.c +0 -2
@@ -291,5 +291,3 @@ app_mixed_thread(struct thread_conf **confs) conf_idx =0 ; } } - -
examples/qos_sched/args.c +0 -1
@@ -483,4 +483,3 @@ app_parse_args(int argc, char **argv)return 0 ; } -
examples/qos_sched/cfg_file.c +0 -2
@@ -608,5 +608,3 @@ cfg_load_subport(struct cfg_file *cfg, struct rte_sched_subport_params *subport_return 0 ; } - -
examples/qos_sched/main.c +0 -1
@@ -252,4 +252,3 @@ main(int argc, char **argv)return 0 ; } -
examples/qos_sched/main.h +1 -1
@@ -70,7 +70,7 @@ extern "C" {#define MAX_DATA_STREAMS (RTE_MAX_LCORE/2)#define MAX_SCHED_SUBPORTS 8 -#define MAX_SCHED_PIPES 4096 +#define MAX_SCHED_PIPES 4096#ifndef APP_COLLECT_STAT #define APP_COLLECT_STAT 1
examples/qos_sched/stats.c +0 -1
@@ -313,4 +313,3 @@ pipe_stat(uint8_t port_id, uint32_t subport_id, uint32_t pipe_id)return 0 ; } -
examples/quota_watermark/qw/init.c +1 -1
@@ -130,7 +130,7 @@ void init_ring(int lcore_id, uint8_t port_id)char ring_name[RTE_RING_NAMESIZE ];snprintf (ring_name,RTE_RING_NAMESIZE , -"core%d_port%d" , lcore_id, port_id); +"core%d_port%d" , lcore_id, port_id); ring =rte_ring_create (ring_name,RING_SIZE ,rte_socket_id (),RING_F_SP_ENQ |RING_F_SC_DEQ );
examples/quota_watermark/qw/init.h +0 -1
@@ -41,4 +41,3 @@ void pair_ports(void);void setup_shared_variables (void );#endif /* _INIT_H_ */ -
examples/vhost/main.c +4 -5
@@ -61,7 +61,7 @@/* * Calculate the number of buffers needed per port */ -#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \ +#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \ (num_switching_cores*MAX_PKT_BURST) + \ (num_switching_cores*RTE_TEST_TX_DESC_DEFAULT) +\ (num_switching_cores*MBUF_CACHE_SIZE))
@@ -78,10 +78,10 @@#define MBUF_DATA_SIZE_ZCP RTE_MBUF_DEFAULT_BUF_SIZE#define MBUF_CACHE_SIZE_ZCP 0 -#define MAX_PKT_BURST 32/* Max burst size for RX/TX */ -#define BURST_TX_DRAIN_US 100/* TX drain every ~100us */ +#define MAX_PKT_BURST 32/* Max burst size for RX/TX */ +#define BURST_TX_DRAIN_US 100/* TX drain every ~100us */ -#define BURST_RX_WAIT_US 15/* Defines how long we wait between retries on RX */ +#define BURST_RX_WAIT_US 15/* Defines how long we wait between retries on RX */ #define BURST_RX_RETRIES 4/* Number of retries on RX. */ #define JUMBO_FRAME_MAX_SIZE 0x2600
@@ -3063,4 +3063,3 @@ main(int argc, char *argv[])return 0 ; } -
examples/vhost_xen/main.c +8 -8
@@ -61,7 +61,7 @@/* * Calculate the number of buffers needed per port */ -#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \ +#define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) + \ (num_switching_cores*MAX_PKT_BURST) + \ (num_switching_cores*RTE_TEST_TX_DESC_DEFAULT) +\ (num_switching_cores*MBUF_CACHE_SIZE))
@@ -87,9 +87,9 @@#define TX_HTHRESH 0/* Default values of TX host threshold reg. */ #define TX_WTHRESH 0/* Default values of TX write-back threshold reg. */ -#define MAX_PKT_BURST 32/* Max burst size for RX/TX */ -#define MAX_MRG_PKT_BURST 16/* Max burst for merge buffers. Set to 1 due to performance issue. */ -#define BURST_TX_DRAIN_US 100/* TX drain every ~100us */ +#define MAX_PKT_BURST 32/* Max burst size for RX/TX */ +#define MAX_MRG_PKT_BURST 16/* Max burst for merge buffers. Set to 1 due to performance issue. */ +#define BURST_TX_DRAIN_US 100/* TX drain every ~100us */ /* State of virtio device. */ #define DEVICE_NOT_READY 0
@@ -725,7 +725,7 @@ link_vmdq(struct virtio_net *dev)/* Register the MAC address. */ ret =rte_eth_dev_mac_addr_add (ports[0 ], &dev->mac_address, (uint32_t )dev->device_fh); -if (ret) { +if (ret) {RTE_LOG (ERR ,VHOST_DATA ,"(%" PRIu64") Failed to add device MAC address to VMDQ\n" , dev->device_fh);return -1 ;
@@ -1461,9 +1461,9 @@ main(int argc, char *argv[]) nb_ports =RTE_MAX_ETHPORTS ;/* -* Update the global var NUM_PORTS and global array PORTS -* and get value of var VALID_NUM_PORTS according to system ports number -*/ +* Update the global var NUM_PORTS and global array PORTS +* and get value of var VALID_NUM_PORTS according to system ports number +*/ valid_num_ports =check_ports_num (nb_ports);if ((valid_num_ports ==0 ) || (valid_num_ports >MAX_SUP_PORTS )) {
examples/vhost_xen/vhost_monitor.c +2 -4
@@ -181,8 +181,8 @@ add_config_ll_entry(struct virtio_net_config_ll *new_ll_dev) ll_root = new_ll_dev; }else {/* increment through the ll until we find un unused device_id, -* insert the device at that entry -*/ +* insert the device at that entry +*/ while ((ll_dev->next !=NULL ) && (ll_dev->dev.device_fh == (ll_dev->next->dev.device_fh -1 ))) ll_dev = ll_dev->next;
@@ -590,5 +590,3 @@ init_virtio_xen(struct virtio_net_device_ops const *const ops)return -1 ;return 0 ; } - -
Signature · 1 line
2.1.4
PATCH 8/9 mk, scripts: remove useless blank lines
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
--- mk/rte.extapp.mk | 1 - mk/rte.extlib.mk | 1 - mk/rte.extobj.mk | 1 - mk/toolchain/gcc/rte.toolchain-compat.mk | 1 - mk/toolchain/icc/rte.toolchain-compat.mk | 1 - scripts/gen-config-h.sh | 1 - scripts/validate-abi.sh | 2 -- 7 files changed, 8 deletions(-)
mk/rte.extapp.mk +0 -1
@@ -50,4 +50,3 @@ all: else include $(RTE_SDK)/mk/rte.app.mk endif -
mk/rte.extlib.mk +0 -1
@@ -50,4 +50,3 @@ all: else include $(RTE_SDK)/mk/rte.lib.mk endif -
mk/rte.extobj.mk +0 -1
@@ -50,4 +50,3 @@ all: else include $(RTE_SDK)/mk/rte.obj.mk endif -
mk/toolchain/gcc/rte.toolchain-compat.mk +0 -1
@@ -84,4 +84,3 @@ else MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS)) endif endif -
mk/toolchain/icc/rte.toolchain-compat.mk +0 -1
@@ -73,4 +73,3 @@ else MACHINE_CFLAGS := $(patsubst -march=%,-xSSE3,$(MACHINE_CFLAGS)) endif endif -
scripts/gen-config-h.sh +0 -1
@@ -42,4 +42,3 @@ sed 's,CONFIG_\(.*\)=\(.*\)$,#undef \1\ #define \1 \2,' | sed 's,\# CONFIG_\(.*\) is not set$,#undef \1,' echo "#endif /* __RTE_CONFIG_H */" -
scripts/validate-abi.sh +0 -2
@@ -241,5 +241,3 @@ done git reset --hard log "INFO" "ABI CHECK COMPLETE. REPORTS ARE IN compat_report directory" cleanup_and_exit 0 - -
Signature · 1 line
2.1.4
PATCH 9/9 drivers: fix whitespace
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
Note: ignored whitespace issues in base (external code).
--- drivers/net/e1000/em_rxtx.c | 1 - drivers/net/e1000/igb_rxtx.c | 1 - drivers/net/pcap/rte_eth_pcap.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)
drivers/net/e1000/em_rxtx.c +0 -1
@@ -1862,4 +1862,3 @@ eth_em_tx_init(struct rte_eth_dev *dev)/* This write will effectively turn on the transmit unit. */ E1000_WRITE_REG (hw,E1000_TCTL , tctl); } -
drivers/net/e1000/igb_rxtx.c +0 -1
@@ -2394,4 +2394,3 @@ eth_igbvf_tx_init(struct rte_eth_dev *dev) } } -
drivers/net/pcap/rte_eth_pcap.c +1 -1
@@ -760,7 +760,7 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues,return 0 ; -error: +error:rte_free (data);rte_free (pci_dev);rte_free (*internals);
Signature · 1 line
2.1.4
Re: [PATCH 9/9] drivers: fix whitespace
Quoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stephen Hemminger
Sent: Thursday, June 4, 2015 10:43 PM
To: [email protected]
Cc: Stephen Hemminger
Subject: [dpdk-dev] [PATCH 9/9] drivers: fix whitespace
Quoted 5 lines
From: Stephen Hemminger <[email protected]>
Note: ignored whitespace issues in base (external code).
Signed-off-by Stephen Hemminger <[email protected]>
Quoted 39 lines
--- drivers/net/e1000/em_rxtx.c | 1 - drivers/net/e1000/igb_rxtx.c | 1 - drivers/net/pcap/rte_eth_pcap.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)drivers/net/e1000/em_rxtx.c index renamed from drivers/net/e1000/em_rxtx.c +0
-03a79e8b..fdc825f 100644
drivers/net/e1000/em_rxtx.c +0
-1@@ -1862,4 +1862,3 @@ eth_em_tx_init(struct rte_eth_dev *dev)/* This write will effectively turn on the transmit unit. */ E1000_WRITE_REG (hw,E1000_TCTL , tctl); } -drivers/net/e1000/igb_rxtx.c index renamed from drivers/net/e1000/igb_rxtx.c +0
-0f586311..43d6703 100644
drivers/net/e1000/igb_rxtx.c +0
-1@@ -2394,4 +2394,3 @@ eth_igbvf_tx_init(struct rte_eth_dev *dev) } } -drivers/net/pcap/rte_eth_pcap.c +1
-1@@ -760,7 +760,7 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues, return 0; -error: +error:rte_free (data);rte_free (pci_dev);
rte_free(*internals);
--
2.1.4
Thomas Monjalon
Applied2015-06-04 07:43, Stephen Hemminger:
Quoted 5 lines
Ran the current code base through a script which:
- removes trailing whitespace
- removes space before tabs
- removes blank lines at end of file
Quoted 10 lines
Stephen Hemminger (9):
kni: fix whitespace
eal: fix whitespace
cmdline: fix whitespace
vhost: fix trailing whitespace
lib: fix misc whitespace
app: fix whitespace
examples: fix whitespace
mk, scripts: remove useless blank lines
drivers: fix whitespace
Applied, thanks