John Daley [Thu, 29 Oct 2015 18:45:16 +0000 (11:45 -0700)]
enic: improve Tx packet rate
For every packet sent, a completion was being requested and the
posted_index register on the nic was being updated. Instead, request a
completion and update the posted index once per burst after all
packets have been sent by the burst function.
Signed-off-by: John Daley <johndale@cisco.com> Acked-by: Sujith Sankar <ssujith@cisco.com>
Zhe Tao [Fri, 30 Oct 2015 14:16:35 +0000 (22:16 +0800)]
i40e: add vector Rx
The vPMD RX function uses the multi-buffer and SSE instructions to
accelerate the RX speed, but now the pktype cannot be supported by the vPMD RX,
because it will decrease the performance heavily.
Signed-off-by: Zhe Tao <zhe.tao@intel.com> Acked-by: Cunming Liang <cunming.liang@intel.com>
Yuanhan Liu [Thu, 29 Oct 2015 03:37:45 +0000 (11:37 +0800)]
vhost: fix build with kernel < 3.8
Fix build error:
virtio-net.c:80:89: error: ‘VIRTIO_NET_F_MQ’ undeclared here
rte_virtio_net.h:109: error: ‘VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX’ undeclared here
Above two virtio-net MQ macros are introduced since kernel v3.8.
For older kernel, we should not reference them directly, hence,
this patch introduced two wrapper macros, with proper values
being set depending on we support MQ or not.
Fixes: b09b198bfb5c ("vhost-user: announce queue number in message") Reported-by: Yongjie Gu <yongjiex.gu@intel.com> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Tested-by: David Marchand <david.marchand@6wind.com>
Zhe Tao [Fri, 30 Oct 2015 04:57:35 +0000 (12:57 +0800)]
i40e: support flow control
Feature Add: Rx/Tx flow control support for the i40e
All the Rx/Tx LFC enable/disable operation is done by the F/W,
so PMD driver need to use the Set PHY Config AD command to trigger the PHY
to do the auto-negotiation, after the Tx/Rx pause ability is negotiated,
the F/W will help us to set the related LFC enable/disable registers.
PMD driver also need to configure the related registers to control
how often to send the pause frame and what the value in the pause frame.
Jingjing Wu [Wed, 21 Oct 2015 02:17:51 +0000 (10:17 +0800)]
i40evf: fix write back with virtual channel 1.1
If DPDK is used on VF while the host is using Linux Kernel driver
as PF driver on FVL NIC, then VF Rx is reported only in batches of
4 packets. It is due to the kernel driver assumes VF driver is working
in interrupt mode, but DPDK VF is working in Polling mode.
This patch fixes this issue by using the V1.1 virtual channel with
Linux i40e PF driver.
Jingjing Wu [Mon, 19 Oct 2015 06:31:57 +0000 (14:31 +0800)]
i40e: drop flow control frames from VF
This patch adds a workaround to drop flow control frames from being
transmitted from VSIs.
With this patch in place a malicious VF cannot send flow control or PFC
packets out on the wire.
Michael Qiu [Fri, 7 Aug 2015 03:29:16 +0000 (11:29 +0800)]
app/testpmd: modify mac in csum forwarding
For some ethnet-switch like intel RRC, all the packet forwarded
out by DPDK will be dropped in switch side, so the packet
generator will never receive the packet.
Signed-off-by: Michael Qiu <michael.qiu@intel.com> Acked-by: Jijiang Liu <jijiang.liu@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yong Liu [Thu, 29 Oct 2015 09:18:41 +0000 (17:18 +0800)]
e1000: add Rx interrupt handler
When datapath rxq interrupt is enabled, enable related device rxq.
Remove the interrupt handler after device stopped.
e1000 only support one type of interrupt cause, so remove lsc interrupt
handler if rxq enabled.
Signed-off-by: Marvin Liu <yong.liu@intel.com> Acked-by: Cunming Liang <cunming.liang@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:33 +0000 (13:27 +0800)]
ixgbe: support new flow director modes for X550
Implement the new CLIs for fdir mac vlan and tunnel modes, including
flow_director_filter and flow_director_mask. Set the mask of fdir.
Add, delete or update the entities of filter.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:32 +0000 (13:27 +0800)]
app/testpmd: new flow director commands
The different fdir mode needs different parameters, so, the parameter *mode*
is introduced to the CLI flow_director_filter and flow_director_mask. This
parameter can pormpt the user to input the appropriate parameters for different
mode.
Please be aware, as we should set the fdir mode, the value of the parameter
pkt-filter-mode, when we start testpmd. We cannot set a different mode for
mask or filter.
The new CLIs are added for the mac vlan and tunnel modes, like this,
flow_director_mask X mode MAC-VLAN vlan XXXX mac XX,
flow_director_mask X mode Tunnel vlan XXXX mac XX tunnel-type X tunnel-id XXXX,
flow_director_filter X mode MAC-VLAN add/del/update mac XX:XX:XX:XX:XX:XX
vlan XXXX flexbytes (X,X) fwd/drop queue X fd_id X,
flow_director_filter X mode Tunnel add/del/update mac XX:XX:XX:XX:XX:XX
vlan XXXX tunnel NVGRE/VxLAN tunnel-id XXXX flexbytes (X,X) fwd/drop queue X
fd_id X.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Mon, 26 Oct 2015 05:27:31 +0000 (13:27 +0800)]
app/testpmd: show new flow director modes
There're fdir mask and supported flow type in the output of the CLI,
show port fdir. But not every parameter has meaning for all the fdir
modes, and the supported flow type is meaningless for mac vlan and
tunnel modes. So, we output different thing for different mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Harry van Haaren [Wed, 28 Oct 2015 16:08:00 +0000 (16:08 +0000)]
igb: fix build without ieee1588 enabled
This patch marks rxq with RTE_SET_USED in
rx_desc_hlen_type_rss_to_pkt_flags(), when
ieee1588 is disabled. Previously a compilation
error occurred on unused-parameter.
Fixes: 1ce6591e238a ("igb: fix ieee1588 frame identification in i210") Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 13:05:40 +0000 (21:05 +0800)]
ixgbevf: support RSS reta/hash query and update
This patch implements the VF RSS reta/hash query and update function
on 10G NICs. But the update function is only provided for x550. Because
the other NICs don't have the separate registers for VF, we don't want
to let a VF NIC change the shared RSS reta/hash registers. It may cause
PF and other VF NICs' behavior change without being noticed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 13:05:39 +0000 (21:05 +0800)]
ixgbevf: support RSS config on x550
On x550, there're separate registers provided for VF RSS while on the other
10G NICs, for example, 82599, VF and PF share the same registers.
This patch lets x550 use the VF specific registers when doing RSS configuration
on VF. The behavior of other 10G NICs doesn't change.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 13:05:38 +0000 (21:05 +0800)]
ixgbe: support 512 RSS entries on x550
Comparing with the older NICs, x550's RSS redirection table is enlarged to 512
entries. As the original code is for the NICs which have a 128 entries RSS table,
it means only part of the RSS table is set on x550. So, RSS cannot work as
expected on x550, it doesn't redirect the packets evenly.
This patch configs the entries beyond 128 on x550 to let RSS work well, and also
update the query and update functions to support 512 entries.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Wenzhuo Lu [Fri, 23 Oct 2015 05:52:25 +0000 (13:52 +0800)]
ixgbe: drop flow control frames from VF
This patch will drop flow control frames from being transmitted
from VSIs.
With this patch in place a malicious VF cannot send flow control
or PFC packets out on the wire.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
Incorrect operator in ixgbe_get_eeprom & ixgbe_set_eeprom prevents
last byte of EEPROM being read/written, and hence cannot be dumped
or updated in entirity using these functions.
Fixes: 0198848a47f5 ("ixgbe: add access to specific device info") Signed-off-by: Remy Horton <remy.horton@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Harry van Haaren [Tue, 27 Oct 2015 10:22:14 +0000 (10:22 +0000)]
ixgbe: add MAC short packet discard count to Rx errors
This patch adds the mspdc (MAC Short Packet Discard Count)
to the total rx errors, as discussed on the dev@dpdk mailing
list: http://comments.gmane.org/gmane.comp.networking.dpdk.devel/23717
Suggested-by: Igor Ryzhov <iryzhov@arccn.ru> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Harry van Haaren [Tue, 20 Oct 2015 09:23:19 +0000 (10:23 +0100)]
ixgbe: remove jabber count from Rx errors
Remove receive jabber count (rjc) from ierrors count as the
register overlaps with the CRC error register, previously
causing some packets to be counted twice.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Maryam Tahhan <maryam.tahhan@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Ixgbe based 82598 and 82599 have different priority receive link-on
register addresses. This is solved in base/ by providing in the
PXONRXC and PXONXCNT as separate macros. This patch ensures the
correct address is read, avoiding reading garbage values.
Also PXON2OFFCNT doesn't exist in 82598, so it is not read for
that MAC.
This issue has existed since the drivers were imported into DPDK,
but was not easily discoverable as xstats were not available.
Tested using testpmd> show port xstats all
Fixes: af75078fece3 ("first public release") Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 11 Sep 2015 02:00:16 +0000 (10:00 +0800)]
ixgbevf: fix TSO support
When setting TSO on VF ixgbe NICs, for example, 82599, x550, the
prompt that TSO is not supported will be printed. But TSO is
supported by VF ixgbe NICs.
We should add TSO to the capability flag, so, we will not see the
wrong prompt.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Pablo de Lara [Mon, 19 Oct 2015 13:20:03 +0000 (14:20 +0100)]
igb: fix ieee1588 frame identification in i210
Fixed issue where the flag PKT_RX_IEEE1588_PTP was not being set
in Intel I210 NIC, as EtherType in RX descriptor is in bits 8:10 of
Packet Type and not in the default bits 0:2.
Fixes known issue "IEEE1588 support possibly not working
with an Intel Ethernet Controller I210 NIC"
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wang Xiao W [Wed, 21 Oct 2015 07:55:26 +0000 (15:55 +0800)]
igb: enable TSO support
This patch enables igb TSO feature, the feature works on both PF and VF.
The TCP segmentation offload needs to write the offload related information
into the advanced context descriptors, which is similar to checksum offload.
Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Harry van Haaren [Thu, 22 Oct 2015 15:18:04 +0000 (16:18 +0100)]
e1000: fix total byte statistics
This patch fixes a bug in reading the 64 bit register reading
which was causing the total octets counters to show zero.
Now the code reads both the lower and higher 32 bits.
Tested in testpmd, byte values are correct.
Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)") Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:18 +0000 (10:51 +0800)]
e1000/base: synchronize PHY interface on non-ME systems
On power up, the MAC - PHY interface needs to be set to PCIe, even if
cable is disconnected. In ME systems, the ME handles this on exit from
Sx(Sticky mode) state. In non-ME, the driver handles it. Added a check
for non-ME system to the driver code that handles that.
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:03 +0000 (10:51 +0800)]
e1000/base: prevent ULP flow if cable connected
Enabling ulp on link down when cable is connect caused an infinite
loop of linkup/down indications in the NDIS driver.
After discussed, correct flow is to enable ULP only when cable is
disconnected.
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:00 +0000 (10:51 +0800)]
e1000/base: support different EEARBC for i210
EEARBC has changed on i210. It means EEARBC has a different address on
i210 than on other NICs. So, add a new entity named EEARBC_I210 to the
register list and make sure the right one is being used on i210.
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:53 +0000 (10:50 +0800)]
e1000/base: add defaults for i210 Rx/Tx PBSIZE
These are the defaults for the packet buffer size registers that need to
be explicitly set back if someone changes them and comes back to a normal
driver.
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:09 +0000 (10:51 +0800)]
e1000/base: fix K1 configuration
This patch is for the following updates to the K1 configurations:
Tx idle period for entering K1 should be 128 ns.
Minimum Tx idle period in K1 should be 256 ns.
e1000_check_for_link_media_swap() is supposed to check PHY page 0 for
copper and PHY page 1 for "other" (fiber) link. We switched back from
page 1 to page 0 too soon, before e1000_check_for_link_82575() is
executed and we were never finding link on fiber (other).
Note: The precedence of link type is controlled by the PHY settings.
If the link is copper, as the M88E1112 page address is set to 1, it should be
set back to 0 before checking this link.
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:11 +0000 (10:51 +0800)]
e1000/base: fix beacon duration for i217
Fix for I217 Packet Loss issue - The Management Engine sets the FEXTNVM4
Beacon Duration incorrectly. This fix ensures that the correct value will
always be set. Correct value for this field is 8 usec.
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:04 +0000 (10:51 +0800)]
e1000/base: fix TIPG for non 10 half duplex mode
TIPG value is increased when setting speed to 10 half to prevent
packet loss. However, it was never decreased again when speed
changes. This caused performance issues in the NDIS driver.
Fix this to restore TIPG to default value on non 10 half.
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:54 +0000 (10:50 +0800)]
e1000/base: fix reset of DH89XXCC SGMII
For DH89XXCC_SGMII, write flush leaves registers of this device trashed
(0xFFFFFFFF). Added check for this device.
Also, after both for Port SW Reset and Device Reset case, platform should
wait at least 3ms before reading any registers. Since waiting is
conditionally executed only for Device Reset - removed the condition.
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:16 +0000 (10:51 +0800)]
e1000/base: fix EEPROM access for i210
The i210 has two EEPROM access registers that are located in
non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously
and EEMNGCTL should also be corrected.
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:50 +0000 (10:50 +0800)]
e1000/base: fix jumbo frame CRC failures
This is a patch to change the value of register 776.20[11:2] for jumbo
mode from 0x1A to 0x1F. This is to enlarge the gap between read and
write pointers in the TX Fifo.
And replace the magic number with a macro by the way.
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:49 +0000 (10:50 +0800)]
e1000/base: fix link flap on 82579
Several customers have reported a link flap issue on 82579. The symptoms
are random and intermittent link losses when 82579 is connected to specific
switches. Issue has been root caused as interoperability problem between
the NIC and at least some Broadcom PHYs in the Energy Efficient Ethernet
wake mechanism.
To fix the issue, we are disabling the Phase Locked Loop shutdown in 100M
Low Power Idle. This solution will cause an increase of power in 100M EEE
link. It may cost additional 28mW in this specific mode.
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:58 +0000 (10:50 +0800)]
e1000/base: check more errors for ESB2 init and reset
Adding code where missing to handle case where calls to
e1000_read_kmrn_reg_80003es2lan and e1000_write_kmrn_reg_80003es2lan return
an error value.
Also, when accessing the E1000_KMRNCTRLSTA_INBAND_PARAM offset to disable
far-end loopback on 80003es2lan devices, make the handling of a read or
write failure consistent between hw_init and hw_reset.
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:55 +0000 (10:50 +0800)]
e1000/base: check more NVM read errors
Adding code to a case where e1000_nvn_read is called, but there is no
consideration for when the read fails (returns an error code).
Also, this patch adds an error message to a base NVM reading function that
is missing it for consistency.
This patch is not covering all cases of these conditions, it only covers
the code used by the e1000e driver.
Wenzhuo Lu [Fri, 16 Oct 2015 02:50:52 +0000 (10:50 +0800)]
e1000/base: return code after setting receive address register
Previously, the rar_set functions were of type void, and when they failed
to program an address register they would, at most, put a message into
the log and end. The fact that they failed to program an address into a
address register, if checked for, should be captured and passed back to
the caller so that the drivers can deal with the situation (or not) as
they deem best.
Drivers can ignore or use the return value. No change to base drivers
is mandated by this change unless a driver wants to handle the failure
to program an address register (e.g. evaluate the return value).
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:10 +0000 (10:51 +0800)]
e1000/base: remove obsolete comment
The "FIXME" comment is revomed from e1000_acquire_swfw_sync_80003es2lan
but forgotten being removed from e1000_acquire_swfw_sync_82575 while
the similar changes were made to both.
Changchun Ouyang [Thu, 22 Oct 2015 12:35:53 +0000 (20:35 +0800)]
virtio: fix deadloop after wrong config read
The old code adjusts the config bytes we want to read depending on
what kind of features we have, but we later cast the entire buf we
read with "struct virtio_net_config", which is obviously wrong.
The wrong config reading results to a dead loop at virtio_send_command()
while starting testpmd.
The right way to go is to read related config bytes when corresponding
feature is set, which is exactly what this patch does.
Changchun Ouyang [Thu, 22 Oct 2015 12:35:52 +0000 (20:35 +0800)]
vhost: use queue id instead of constant ring index
Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id
instead, which will be set to a proper value for a specific queue
when we have multiple queue support enabled.
For now, queue_id is still set with VIRTIO_RXQ or VIRTIO_TXQ,
so it should not break anything.
Yuanhan Liu [Fri, 18 Sep 2015 08:01:10 +0000 (16:01 +0800)]
vhost-user: prepare multiple queue setup
All queue pairs, including the default (the first) queue pair,
are allocated dynamically, when a vring_call message is received
first time for a specific queue pair.
This is a refactor work for enabling vhost-user multiple queue;
it should not break anything as it does no functional changes:
we don't support mq set, so there is only one mq at max.
Yuanhan Liu [Thu, 22 Oct 2015 12:35:49 +0000 (20:35 +0800)]
vhost-user: support protocol features
The two protocol features messages are introduced by qemu vhost
maintainer(Michael) for extendting vhost-user interface. Here is
an excerpta from the vhost-user spec:
Any protocol extensions are gated by protocol feature bits,
which allows full backwards compatibility on both master
and slave.
The vhost-user multiple queue features will be treated as a vhost-user
extension, hence, we have to implement the two messages first.
VHOST_USER_PROTOCOL_FEATURES is initialized to 0, as we don't support
any yet.
Rich Lane [Fri, 25 Sep 2015 20:37:16 +0000 (13:37 -0700)]
eal: default to using all cores
This is a useful default for simple applications where the assignment
of lcores to CPUs doesn't matter. It's also useful for more complex
applications that automatically assign tasks to cores based on the
NUMA topology.
Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
Panu Matilainen [Thu, 15 Oct 2015 11:49:05 +0000 (14:49 +0300)]
eal: make the -n argument optional
Obtaining the correct value of memory channels, especially from a
running system, can be anything from difficult to plain impossible.
Since the value is merely an optimization and does not affect functionality
otherwise, its pointless to force such a guess on users initially, such
things belong to performance tuning phase.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com> Acked-by: David Marchand <david.marchand@6wind.com>
Stephen Hurd [Fri, 21 Aug 2015 02:25:21 +0000 (19:25 -0700)]
app/testpmd: detect numa socket count
Currently, there is a MAX_SOCKET macro which artificially limits the
number of NUMA sockets testpmd can use. Anything on a higher socket
ends up using socket zero. This patch replaces this with a variable
set during set_default_fwd_lcores_config() and uses RTE_MAX_NUMA_NODES
where a hard-coded max number of sockets is required.
Signed-off-by: Stephen Hurd <shurd@broadcom.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Jasvinder Singh [Thu, 22 Oct 2015 14:03:03 +0000 (15:03 +0100)]
cfgfile: increase entry name and value sizes
This patch refers to the ABI change proposed for
librte_cfgfile(rte_cfgfile.h). In order to allow
for longer names and values, the values of macro
CFG_NAME_LEN and CFG_VAL_LEN is increased.
This is a supplement for previous patch that was incomplete.
Previous commit message: This is a modification of qos_sched
example to use librte_cfgfile for parsing configuration file.
Fixes: db935d0171dd ("examples/qos_sched: use librte_cfgfile") Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Christoph Gysin [Tue, 29 Sep 2015 06:53:01 +0000 (09:53 +0300)]
eal: fix C++ build
'virtual' is a keyword and can't be used if the code is to compile with
C++ compilers.
If rte_devargs.h was included in C++ code, compilation with clang++
failed with an error. g++ did not fail, but only because of a bug
that treats it as an anonymous struct with a decl-specifier which it
ignores.
This simply renames the member to 'virt'.
Reported-by: Ming Zhao <mzhao@luminatewireless.com> Signed-off-by: Christoph Gysin <christoph.gysin@gmail.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Acked-by: David Marchand <david.marchand@6wind.com>
Wen-Chi Yang [Fri, 5 Jun 2015 02:46:36 +0000 (10:46 +0800)]
eal/linux: make alarm not affected by system time jump
Due to eal_alarm_callback() and rte_eal_alarm_set() use gettimeofday()
to get the current time, and gettimeofday() is affected by jumps.
For example, set up a rte_alarm which will be triggerd next second (
current time + 1 second) by rte_eal_alarm_set(). And the callback
function of this rte_alarm sets up another rte_alarm which will be
triggered next second (current time + 2 second).
Once we change the system time when the callback function is triggered,
it is possible that rte alarm functionalities work out of expectation.
Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC_RAW, &now)
could avoid this phenomenon.
Signed-off-by: Wen-Chi Yang <wolkayang@gmail.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>