Commit Graph

939 Commits

Author SHA1 Message Date
Bernard Iremonger
6a42e7ef9d app/testpmd: parse flow command line for ESP
add ITEM_ESP
add ITEM_ESP_SPI
update release notes for testpmd changes
add sample ESP rules in testpmd guide

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-01-17 19:59:18 +01:00
Rory Sexton
65388f4c4c ethdev: add L2TPv3 over IP header to flow API
This patch adds the new flow item RTE_FLOW_ITEM_TYPE_L2TPV3OIP to
flow API to match a L2TPv3 over IP header. This patch supports only
L2TPv3 over IP header format which is different to L2TPv2/L2TPv3
over UDP. The difference in header formats between L2TPv3 over IP
and L2TP over UDP require a separate implementation for each.

Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: Dariusz Jagus <dariuszx.jagus@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-01-17 19:46:26 +01:00
Dekel Peled
dcd05da0ae app/testpmd: fix GENEVE flow item
Previous patch added support of GENEVE pattern item in flow rule.
Function flow_item_default_mask() was not updated, so using it with
GENEVE item returns null.
Using testpmd command "set raw_decap" or "set raw_encap" with
GENEVE item, without specifying any parameters, results in
segmentation fault.

This patch updates function flow_item_default_mask(),
adding case to handle GENEVE item.

Fixes: 0f4203fe9d ("app/testpmd: support GENEVE pattern item in flow rules")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-01-17 19:46:02 +01:00
Suanming Mou
8482ffe4b6 ethdev: add IPv4/IPv6 DSCP rewrite action
For some overlay network, such as VXLAN, the DSCP field in the new outer
IP header after VXLAN decapsulation may need to be updated accordingly.

This commit introduce the DSCP modify action for IPv4 and IPv6.

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-01-17 19:46:02 +01:00
Stephen Hemminger
5e516c8983 app/testpmd: call cleanup on exit
The rte_eal_cleanup code is not exercised by testpmd which
is the most used DPDK test tool. Add a call at end of program.

This helps exercise free and close paths which can
be checked with tools like valgrind.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2020-01-17 19:46:01 +01:00
Ciara Power
c11562a121 app/testpmd: fix device mcast list error handling
The multicast set list function now has a return value, which is checked
by the calling functions. A rollback occurs on detection of failure, to
realign local config with the device config.

The error print statement in the function had included the port_id and
mc_addr_nb values in the wrong order, these are now swapped.

Fixes: 8fff667578 ("app/testpmd: new command to add/remove multicast MAC addresses")
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:45:23 +01:00
Kalesh AP
e1d44d0ad6 app/testpmd: show MAC addresses added to a port
Patch adds a runtime function to display the unicast and
multicast MAC addresses added to a port.

Syntax:
	show port (port_id) macs|mcast_macs

Usage:
testpmd> show port 0 macs
Number of MAC address added: 1
  B0:26:28:7F:F5:C1
testpmd>
testpmd> show port 0 mcast_macs
Number of Multicast MAC address added: 0
testpmd>
testpmd> mac_addr add 0 B0:26:28:7F:22:33
testpmd> mac_addr add 0 B0:26:28:7F:22:34
testpmd> show port 0 macs
Number of MAC address added: 3
  B0:26:28:7F:F5:C1
  B0:26:28:7F:22:33
  B0:26:28:7F:22:34
testpmd>
testpmd> mac_addr remove 0 B0:26:28:7F:22:33
testpmd> show port 0 macs
Number of MAC address added: 2
  B0:26:28:7F:F5:C1
  B0:26:28:7F:22:34

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:45:23 +01:00
Pavan Nikhilesh
7392ad06f5 app/testpmd: use better randomness for Tx split
Use rte_rand() instead of random() for better randomness.

Coverity issue: 337666
Fixes: 79bec05b32 ("app/testpmd: add ability to split outgoing packets")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-26 18:05:15 +01:00
David Marchand
9e6b36c34c app/testpmd: reduce memory consumption
Following [1], testpmd memory consumption has skyrocketted.
The rte_port structure has gotten quite fat.

struct rte_port {
[...]
  struct rte_eth_rxconf rx_conf[65536];            /* 266280 3145728 */
  /* --- cacheline 53312 boundary (3411968 bytes) was 40 bytes ago --- */
  struct rte_eth_txconf tx_conf[65536];            /* 3412008 3670016 */
  /* --- cacheline 110656 boundary (7081984 bytes) was 40 bytes ago --- */
[...]
  /* size: 8654936, cachelines: 135234, members: 31 */
[...]

testpmd handles RTE_MAX_ETHPORTS ports (32 by default) which means that it
needs ~256MB just for this internal representation.

The reason is that a testpmd rte_port (the name is quite confusing, as
it is a local type) maintains configurations for all queues of a port.
But where you would expect testpmd to use RTE_MAX_QUEUES_PER_PORT as the
maximum queue count, the rte_port uses MAX_QUEUE_ID set to 64k.

Prefer the ethdev maximum value.

After this patch:
struct rte_port {
[...]
  struct rte_eth_rxconf      rx_conf[1025];        /*  8240 49200 */
  /* --- cacheline 897 boundary (57408 bytes) was 32 bytes ago --- */
  struct rte_eth_txconf      tx_conf[1025];        /* 57440 57400 */
  /* --- cacheline 1794 boundary (114816 bytes) was 24 bytes ago --- */
[...]
  /* size: 139488, cachelines: 2180, members: 31 */
[...]

With this, we can ask for less memory in test-null.sh.

[1]: https://git.dpdk.org/dpdk/commit/?id=436b3a6b6e62

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-26 18:05:15 +01:00
Stephen Hemminger
149677c9a3 app/testpmd: fix memory leak on detach
The RTE_FOREACH_MATCHING_DEV iterator requires that
if a break is done before the end of the loop,
the function rte_eth_iterator_cleanup() must be called.

Fixes: 55e51c9624 ("app/testpmd: add device related commands")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-11-26 18:05:15 +01:00
Matan Azrad
43d0e30498 app/testpmd: fix invalid port detaching
The port was not validated before detaching.

Ignore port detach operation when the port is not valid.

Fixes: f8e5baa266 ("app/testpmd: check not detaching device twice")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-11-21 00:18:02 +01:00
David Marchand
8fad2e5ab2 app/testpmd: report invalid command line parameter
We currently do not check that a non option string has been passed to
testpmd.

Example:
$ ./master/app/testpmd --no-huge -m 512 --vdev net_null0 \
	--vdev net_null1 -- -i nb-cores=2 --total-num-mbuf 2048
[...]
testpmd> show config fwd
io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support
enabled, MP allocation mode: native
Logical Core 1 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00

Here nb-cores=2 is just ignored, while the (probably sleepy) user did not
notice this.

Validate that all strings passed to testpmd are part of a known option.

After this patch:
$ ./master/app/testpmd --no-huge -m 512 --vdev net_null0 \
	--vdev net_null1 -- -i nb-cores=2 --total-num-mbuf 2048
[...]
Invalid parameter: nb-cores=2
EAL: Error - exiting with code: 1
  Cause: Command line incorrect

While at it, when passing an unknown option, print the string that gets
refused by getopt_long to help the user.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 17:36:06 +01:00
Dekel Peled
d56ec3dcad app/testpmd: fix cleanup of Tx metadata offload
Commit in fixes tag removed the match_metadata Tx offload.
This patch removes the option to select this offload from testpmd
menu, help text and documentation.

It also modifies the cmd_show_tx_metadata_parsed() function, to
display the value correctly, and the dump_pkt_burst() function to
display the relevant (Tx/Rx) metadata only.

Fixes: 9bf26e1318 ("ethdev: move egress metadata to dynamic field")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-11-20 17:36:06 +01:00
Reshma Pattan
5fde1a7592 net: use IPV4 VHL constant
Use new macro RTE_IPV4_VHL_DEF instead of IP_VHL_DEF
wherever applicable.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 17:36:06 +01:00
Stephen Hemminger
08a234788e cmdline: remove unnecessary #ifdef
The #ifdef to conditionally include <sys/socket.h> on BSD
is unnecessary. It is harmless to include the header on other
OS's. An extra include is better than an #ifdef.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2019-11-12 18:35:17 +01:00
Dekel Peled
4a72909224 app/testpmd: set maximum LRO packet size
This patch implements use of the API for LRO aggregated packet
max size.
It adds command-line and runtime commands to configure this value,
and adds option to show the supported value.
Documentation is updated accordingly.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-12 01:44:05 +01:00
Pavan Nikhilesh
b0a9354ae7 app/testpmd: disable packet type parsing by default
Disable packey type parsing on port init, user can enable ptype parsing
by issuing set ptype command.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-11 16:15:37 +01:00
Pavan Nikhilesh
e48491afb8 app/testpmd: add command to set supported packet types
Add command to set supported ptype mask.
Usage:
	set port <port_id> ptype_mask <ptype_mask>

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-11 16:15:37 +01:00
Pavan Nikhilesh
5d30897295 ethdev: add mbuf RSS update as an offload
Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf:#️⃣:rss`.
PMDs notify the validity of `rte_mbuf:#️⃣rss` to the application
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.

Also update testpmd rx_offload command to include RSS_HASH

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-11 16:15:36 +01:00
Stephen Hemminger
bd67b67724 app/testpmd: block xstats for hidden ports
All the other testpmd commands block access to devices that
are owned. Looks like xstat got overlooked.

Fixes: bfd5051b43 ("app/testpmd: new command to get extended statistics")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-11-11 14:23:02 +01:00
Ori Kam
1c69df45f8 app/testpmd: support hairpin
This commit introduce the hairpin queues to the testpmd.
the hairpin queue is configured using --hairpinq=<n>
the hairpin queue adds n queue objects for both the total number
of TX queues and RX queues.
The connection between the queues are 1 to 1, first Rx hairpin queue
will be connected to the first Tx hairpin queue

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-08 23:15:05 +01:00
Xiaoyu Min
2b4cd8ad5e app/testpmd: fix IP next proto in set raw decap/encap
The IP's next protocol will be specified by user when set IP-in-IP
tunnel header via set raw decap/encap commands.

Currently this field is wrongly set to zero if there is no upper layer.
This leads to the encapsulated IP-in-IP tunnel header is not correct.

This next protocol field should be leave it as-is if there is no upper
layer or value is already set.

Fixes: 30626def03 ("app/testpmd: support raw encap/decap actions")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-08 23:15:05 +01:00
Kiran Kumar K
fae9aa717d app/testpmd: support checking descriptor status
Adding support to check TX and RX descriptor status.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-08 23:15:05 +01:00
Viacheslav Ovsiienko
9bf26e1318 ethdev: move egress metadata to dynamic field
The dynamic mbuf fields were introduced by [1]. The egress metadata is
good candidate to be moved from statically allocated field tx_metadata to
dynamic one. Because mbufs are used in half-duplex fashion only, it is
safe to share this dynamic field with ingress metadata.

The shared dynamic field contains either egress (if application going to
transmit mbuf with tx_burst) or ingress (if mbuf is received with rx_burst)
metadata and can be accessed by RTE_FLOW_DYNF_METADATA() macro or with
rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper
routines. PKT_TX_DYNF_METADATA/PKT_RX_DYNF_METADATA flag will be set
along with the data.

The mbuf dynamic field must be registered by calling
rte_flow_dynf_metadata_register() prior accessing the data.

The availability of dynamic mbuf metadata field can be checked with
rte_flow_dynf_metadata_avail() routine.

DEV_TX_OFFLOAD_MATCH_METADATA offload and configuration flag is removed.
The metadata support in PMDs is engaged on dynamic field registration.

Metadata feature is getting complex. We might have some set of actions
and items that might be supported by PMDs in multiple combinations,
the supported values and masks are the subjects to query by perfroming
trials (with rte_flow_validate).

[1] http://patches.dpdk.org/patch/62040/

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-11-08 23:15:05 +01:00
Viacheslav Ovsiienko
e02ecc1324 ethdev: extend flow metadata
Currently, metadata can be set on egress path via mbuf tx_metadata field
with PKT_TX_METADATA flag and RTE_FLOW_ITEM_TYPE_META matches metadata.

This patch extends the metadata feature usability.

1) RTE_FLOW_ACTION_TYPE_SET_META

When supporting multiple tables, Tx metadata can also be set by a rule and
matched by another rule. This new action allows metadata to be set as a
result of flow match.

2) Metadata on ingress

There's also need to support metadata on ingress. Metadata can be set by
SET_META action and matched by META item like Tx. The final value set by
the action will be delivered to application via metadata dynamic field of
mbuf which can be accessed by RTE_FLOW_DYNF_METADATA() macro or with
rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper
routines. PKT_RX_DYNF_METADATA flag will be set along with the data.

The mbuf dynamic field must be registered by calling
rte_flow_dynf_metadata_register() prior to use SET_META action.

The availability of dynamic mbuf metadata field can be checked
with rte_flow_dynf_metadata_avail() routine.

If application is going to engage the metadata feature it registers
the metadata  dynamic fields, then PMD checks the metadata field
availability and handles the appropriate fields in datapath.

For loopback/hairpin packet, metadata set on Rx/Tx may or may not be
propagated to the other path depending on hardware capability.

MARK and METADATA look similar and might operate in similar way,
but not interacting.

Initially, there were proposed two metadata related actions:

- RTE_FLOW_ACTION_TYPE_FLAG
- RTE_FLOW_ACTION_TYPE_MARK

These actions set the special flag in the packet metadata, MARK action
stores some specified value in the metadata storage, and, on the packet
receiving PMD puts the flag and value to the mbuf and applications can
see the packet was threated inside flow engine according to the appropriate
RTE flow(s). MARK and FLAG are like some kind of gateway to transfer some
per-packet information from the flow engine to the application via
receiving datapath. Also, there is the item of type RTE_FLOW_ITEM_TYPE_MARK
provided. It allows us to extend the flow match pattern with the capability
to match the metadata values set by MARK/FLAG actions on other flows.

From the datapath point of view, the MARK and FLAG are related to the
receiving side only. It would useful to have the same gateway on the
transmitting side and there was the feature of type RTE_FLOW_ITEM_TYPE_META
was proposed. The application can fill the field in mbuf and this value
will be transferred to some field in the packet metadata inside the flow
engine. It did not matter whether these metadata fields are shared because
of MARK and META items belonged to different domains (receiving and
transmitting) and could be vendor-specific.

So far, so good, DPDK proposes some entities to control metadata inside
the flow engine and gateways to exchange these values on a per-packet basis
via datapaths.

As we can see, the MARK and META means are not symmetric, there is absent
action which would allow us to set META value on the transmitting path.
So, the action of type:

- RTE_FLOW_ACTION_TYPE_SET_META was proposed.

The next, applications raise the new requirements for packet metadata.
The flow ngines are getting more complex, internal switches are introduced,
multiple ports might be supported within the same flow engine namespace.
From the DPDK points of view, it means the packets might be sent on one
eth_dev port and received on the other one, and the packet path inside
the flow engine entirely belongs to the same hardware device. The simplest
example is SR-IOV with PF, VFs and the representors. And there is a
brilliant opportunity to provide some out-of-band channel to transfer
some extra data from one port to another one, besides the packet data
itself. And applications would like to use this opportunity.

It is supposed for application to use trials (with rte_flow_validate)
to detect which metadata features (FLAG, MARK, META) actually supported
by PMD and underlying hardware. It might depend on PMD configuration,
system software, hardware settings, etc., and should be detected
in run time.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-11-08 23:15:04 +01:00
Haiyue Wang
8dedb54699 ethdev: enhance burst mode information API
Change the type of burst mode information from bit field to free string
data, so that each PMD can describe the Rx/Tx busrt functions flexibly.

Fixes: eb5902504a ("ethdev: add API for getting burst mode information")
Fixes: 6b6609f68c ("net/i40e: support Rx/Tx burst mode info")
Fixes: e9a10e6c21 ("net/ice: support Rx/Tx burst mode info")
Fixes: 7fe108edcf ("app/testpmd: show Rx/Tx burst mode description")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Ray Kinsella <ray.kinsella@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-08 23:15:04 +01:00
Viacheslav Ovsiienko
9a2f44c762 ethdev: add flow tag
A tag is a transient data which can be used during flow match. This can be
used to store match result from a previous table so that the same pattern
need not be matched again on the next table. Even if outer header is
decapsulated on the previous match, the match result can be kept.

Some device expose internal registers of its flow processing pipeline and
those registers are quite useful for stateful connection tracking as it
keeps status of flow matching. Multiple tags are supported by specifying
index.

Example testpmd commands are:

  flow create 0 ingress pattern ... / end
    actions set_tag index 2 value 0xaa00bb mask 0xffff00ff /
            set_tag index 3 value 0x123456 mask 0xffffff /
            vxlan_decap / jump group 1 / end

  flow create 0 ingress pattern ... / end
    actions set_tag index 2 value 0xcc00 mask 0xff00 /
            set_tag index 3 value 0x123456 mask 0xffffff /
            vxlan_decap / jump group 1 / end

  flow create 0 ingress group 1
    pattern tag index is 2 value spec 0xaa00bb value mask 0xffff00ff /
            eth ... / end
    actions ... jump group 2 / end

  flow create 0 ingress group 1
    pattern tag index is 2 value spec 0xcc00 value mask 0xff00 /
            tag index is 3 value spec 0x123456 value mask 0xffffff /
            eth ... / end
    actions ... / end

  flow create 0 ingress group 2
    pattern tag index is 3 value spec 0x123456 value mask 0xffffff /
            eth ... / end
    actions ... / end

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-11-08 23:15:04 +01:00
Thomas Monjalon
14cba9ee22 cmdline: replace FreeBSD ifdef for IP address parsing
The constants like AF_INET are in sys/socket.h in FreeBSD.
The #ifdef macro __FreeBSD__ is replaced with RTE_EXEC_ENV_FREEBSD
in order to be consistent across DPDK files, and allow to grep
for EXEC_ENV among other benefits.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2019-11-08 15:34:10 +01:00
David Marchand
974be46e9e mem: hide internal heap header
Let's avoid exporting structures without an identified usecase.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-10-27 10:39:56 +01:00
Xiaoyu Min
739e045bf2 app/testpmd: support multiple raw encap/decap
In some scenarios, the raw_encap/raw_decap actions could be multiple in
one single flow (e,g. hirepin flow):

  ... actions raw_decap / raw_encap / raw_decap / raw_encap / ...

This requires the testpmd supports multiple raw_encap/raw_decap data
settings as well.

With the multiple raw_encap/raw_decap settings, the testpmd commands –
set raw_encap / set raw_decap will become:

  set raw_encap <index> <item pattern>
  set raw_decap <index> <item pattern>

And the actions – raw_encap/raw_decap also could optionally choose which
global raw_encap/raw_decap confs to be used by index:

  ... actions raw_decap index 1 / raw_encap index 2 / ...

If there is no `index` specified, the default index is 0:

  set raw_encap <item pattern>
  ... actions raw_decap / raw_encap / ...

which will use raw_encap index 0.

In addition to the set raw_encap/raw_decap commands,

  show <raw_encap/raw_decap> <index>
  show <raw_encap/raw_decap> all

are also introduced into in order to check which index is set and to
what.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-10-25 19:23:22 +02:00
Peng Huang
0322272c9f app/testpmd: fix Tx checksum when TSO enabled
This patch fixed the TX checksum value problem when enabled TSO in
tunnel packets, because outer UDP checksum calculation depend on
the TSO configuration.

Fixes: 0f62d63593 ("app/testpmd: support tunneled TSO in checksum engine")
Cc: stable@dpdk.org

Signed-off-by: Peng Huang <peng.huang@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-10-25 19:23:22 +02:00
Flavia Musatescu
512d873ff1 net: add new header file for VXLAN
The VXLAN related definitions and structures are moved from
rte_ether.h to a new header file: rte_xvlan.h.

Also introducing a new define macro for VXLAN default port id:
RTE_VXLAN_DEFAULT_PORT

Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
2019-10-25 19:00:22 +02:00
Wisam Jaddo
6977f14517 app/testpmd: fix missing GENEVE item in raw encap
Fixes: 0f4203fe9d ("app/testpmd: support GENEVE pattern item in flow rules")
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-10-25 19:00:22 +02:00
Ting Xu
d8e5e69f3a app/testpmd: add GTP parsing and Tx checksum offload
Enable testpmd to forward GTP packet in csum fwd mode.

A GTP header structure (without optional fields and extension header)
is defined in new rte_gtp.h.
A parser function in testpmd is added.  GTPU and GTPC packets are both
supported, with respective UDP destination port and GTP message type.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-25 19:00:22 +02:00
Ferruh Yigit
f6e63e59e7 app/testpmd: fix global variable multiple definitions
Some flow config related global variables are defined in a header file
which was causing multiple definitions of the variables, fixed it by
moving them to the .c file.

Issue has been detected by '-fno-common' gcc flag.

Also while being there,
removed duplicated 'ACTION_RAW_ENCAP_MAX_DAT definition,
moved 'vxlan_encap_conf' & 'nvgre_encap_conf' initialization to
  'cmdline_flow.c' which is better location than 'testpmd.c'
relocated 'action_raw_encap_data' & 'action_raw_decap_data' struct
   definitions slightly within the file

Fixes: 1960be7d32 ("app/testpmd: add VXLAN encap/decap")
Fixes: dcd962fc6b ("app/testpmd: add NVGRE encap/decap")
Fixes: a1191d39cb ("app/testpmd: add MPLSoUDP encapsulation")
Fixes: 3e77031be8 ("app/testpmd: add MPLSoGRE encapsulation")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-25 23:16:23 +02:00
Yahui Cao
8b79b03630 app/testpmd: increase RSS max queue size
Max queue indices ACTION_RSS_QUEUE_NUM , which limits testpmd actions
rss queue size, has worked for a long time.

As more powered PMD is merged, more RSS queues are supported(e.g. Intel
ice driver FDIR supports up to 128 RSS queue numbers).

The original max queue indices number doesn't satisfy PMD's requirement
and it needs to become bigger.

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-23 16:43:10 +02:00
Kiran Kumar K
01b3156d33 ethdev: add HIGIG2 key field to flow API
Add new rte_flow_item_higig2_hdr in order to match higig2 header.
It is a layer 2.5 protocol and used in Broadcom switches.
Header format is based on the following document.
http://read.pudn.com/downloads558/doc/comm/2301468/HiGig_protocol.pdf

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2019-10-23 16:43:10 +02:00
Ciara Power
e71df49e08 app/testpmd: fix help for loop topology option
The testpmd --help option did not show all possible choices for port
topology previously. The loop topology option is now added.

Fixes: 3e2006d618 ("app/testpmd: add loopback topology")
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-23 16:43:10 +02:00
Simei Su
15e67d41c0 app/testpmd: support extended RSS offload types
This patch adds cmdline support for extended rss types configuration.

Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
2019-10-23 16:43:09 +02:00
Ting Xu
5e913bdb4f app/testpmd: fix CRC strip command
This patch fixed the bug that a failure appeared when config
rx_offload crc_strip using command "port config all crc-strip
on|off". The reason is that this command was removed in Commit
e5db17a1e5. The current command is "port config <port_id>
rx_offload keep_crc on|off" instead.

In this patch, some codes left over about 'crc_strip' are
removed to make the current command clearer.

Fixes: e5db17a1e5 ("app/testpmd: remove duplicated Rx offload commands")
Cc: stable@dpdk.org

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-10-23 16:43:09 +02:00
Haiyue Wang
7fe108edcf app/testpmd: show Rx/Tx burst mode description
Add the 'Burst mode' section into command 'show rxq|txq info <port_id>
<queue_id>' to show the Rx/Tx burst mode description like:
  "Burst mode: Vector AVX2 Scattered"

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-10-23 16:43:09 +02:00
Vivek Sharma
fb1a5a0fd6 app/testpmd: introduce Rx offloads option
Introduce boot time argument for configuring all rx offloads.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-23 16:43:09 +02:00
Vivek Sharma
b85778768a app/testpmd: introduce QinQ offload option
Introduce boot time argument for configuring QinQ strip
offload.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-23 16:43:09 +02:00
Vivek Sharma
2a0b41984c app/testpmd: support QinQ offload in VLAN set command
Segregate QinQ from Extend Offload and support QinQ offload
in vlan set command. Merge all port wise rx vlan offloads in
command line help and documentation for a cleaner structure.

Fix port info display to distinguish between qinq strip and
extend offloads. Flatten all VLAN offload info into a single
line to reduce info length.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-23 16:43:09 +02:00
Vamsi Attunuru
9e06e39b3c app/testpmd: show supported packet types
Patch adds a runtime function to display port supported ptypes
in different layers.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-10-23 16:43:08 +02:00
Matan Azrad
971a815b9e app/testpmd: add bits per second to statistics
Traffic bps statistics is very useful for performance testing.

Add bits per second statistics for Rx and Tx.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Moti Haimovsky <motih@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-23 16:43:08 +02:00
David Marchand
384b0a33fe clean bare metal support traces
Bare metal support has been gone for quite some time but we still had
some checks on system includes.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-10-21 16:19:00 +02:00
Simei Su
1286c03567 app/testpmd: support symmetric Toeplitz hash
This patch adds command line support for Symmetric Toeplitz
hash configuration.

Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-10-07 15:00:58 +02:00
Ying A Wang
226c6e60c3 ethdev: add PPPoE to flow API
- RTE_FLOW_ITEM_TYPE_PPPOES: matches a PPPoE session header.

- RTE_FLOW_ITEM_TYPE_PPPOED: matches a PPPoE discovery header.

- RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID: matches a PPPoE session
  protocol identifier.

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-07 15:00:58 +02:00
Ying A Wang
346553db5b ethdev: add GTP extension header to flow API
- RTE_FLOW_ITEM_TYPE_GTP_PSC: matches a GTP
- RTE_FLOW_ITEM_TYPE_GTP_PSC: matches a GTP
  PDU extension header (PDU session container).

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-07 15:00:58 +02:00
Tao Zhu
84057fd07e app/testpmd: fix build for 16-byte Rx descriptor mode
This minor patch fixes unused variable ‘ret’ compile error When
CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC was selected.

Fixes: 6f51deb903 ("app/testpmd: check status of getting ethdev info")

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
2019-10-07 15:00:56 +02:00
Shougang Wang
1cde1b9a9b app/testpmd: fix crash on port reset
port reset cause crash when ports are not stopped. Fixed by refusing the
reset when port is not stopped.

Fixes: 97f1e19679 ("app/testpmd: add port reset command")
Cc: stable@dpdk.org

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-10-07 15:00:56 +02:00
Ivan Ilchenko
8835806ddc app/testpmd: check code of allmulticast mode switch
rte_eth_allmulticast_enable()/rte_eth_allmulticast_disable() return
value was changed from void to int, so this patch modify usage
of these functions across app/test-pmd
according to new return type.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-10-07 15:00:55 +02:00
Igor Romanov
a5279d2561 app/testpmd: check status of getting MAC address
Add a wrapper for rte_eth_macaddr_get() that prints an
error and returns a status code if the function fails.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-10-07 15:00:55 +02:00
Igor Romanov
e661a08ba9 app/testpmd: check status of getting link info
Add a wrapper for rte_eth_eth_link_get_nowait() that prints an
error and returns a status code if the function fails.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-10-07 15:00:54 +02:00
Igor Romanov
da328f7f11 ethdev: change xstats reset function to return int
Change rte_eth_xstats_reset() return value from void to int and
return negative errno values in case of error conditions.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-07 15:00:54 +02:00
Ivan Ilchenko
34fc105106 app/testpmd: check code of promiscuous mode switch
rte_eth_promiscuous_enable()/rte_eth_promiscuous_disable() return
value was changed from void to int, so this patch modify usage
of these functions across app/testpmd
according to new return type.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-10-07 15:00:54 +02:00
Ivan Ilchenko
6f51deb903 app/testpmd: check status of getting ethdev info
Add eth_dev_info_get_print_err() which is a wrapper for
rte_eth_dev_info_get() printing error if rte_eth_dev_info_get()
fails and returning its status code.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-10-07 14:45:35 +02:00
Andrew Rybchenko
78402e16ec ethdev: remove redundant device info cleanup before get
rte_eth_dev_info_get() always fills in device information memory
with zeros on entry.

Fixes: b671987985 ("ethdev: avoid getting uninitialized info for bad port")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-09-20 10:19:42 +02:00
Flavia Musatescu
e5db17a1e5 app/testpmd: remove duplicated Rx offload commands
The testpmd application provides two sets of commands for RX offload
flags configuration. The purpose of this patch is to eliminate this
duplication by removing the old set of commands:
“port config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|
hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off”

The other commands set that can be used instead in order to enable
or disable the same RX offloading flags on all RX queues of a port is:
"port config <port_id> rx_offload crc_strip|scatter|ipv4_cksum|
udp_cksum|tcp_cksum|timestamp|vlan_strip|vlan_filter|vlan_extend on|off"

This patch also fixes the "drop-en" command, which enables packets
dropping on all RX queues of all ports when no receive buffers available
“port config all drop-en on|off”

Fixes: 384161e006 ("app/testpmd: adjust on the fly VLAN configuration")
Cc: stable@dpdk.org

Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-08-28 11:28:36 +02:00
Amit Gupta
8b36297d15 app/testpmd: fix latency stats deinit on signal
On receiving signal, testpmd showing warning as
"LATENCY_STATS: failed to remove Rx/Tx callback"
because rte_latencystats_uninit is called without
checking if latencystats is enabled or not.

After this fix, rte_latencystats_uninit will be
called only if latencystats is enabled.

Fixes: 62d3216d61 ("app/testpmd: add latency statistics calculation")
Cc: stable@dpdk.org

Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
2019-08-08 12:13:05 +02:00
Stephen Hemminger
16267ceef6 app/testpmd: use exit instead of panic
rte_panic causes a backtrace (which is uniformative since all
these calls are in main). Instead use rte_exit and try and make the
messages informative.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-08-05 15:47:56 +02:00
Stephen Hemminger
a87ab9f799 app/testpmd: block secondary process
Since testpmd has several issues which keep it from working correctly
as a secondary process; abort if user tries to do it, rather than
running into later problems.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-08-05 15:47:51 +02:00
Stephen Hemminger
9201806e97 app/testpmd: allow log level on command line
Since testpmd registers log type after processing command
line arguments, it is not possible to do:
  # testpmd --log-level='testpmd:info' ...

Fix this by initializing logtype first.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-08-05 15:40:38 +02:00
David Marchand
5e16d9447a app/testpmd: rename ambiguous VF config variable
Caught while looking at the rx offloads code.

rx_mode is a global variable for the default rx configuration.
Rename the local rx_mode variable in cmd_set_vf_rxmode_parsed.

Fixes: 7741e4cf16 ("app/testpmd: VMDq and DCB updates")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-29 23:38:30 +02:00
David Marchand
3e6b0d5f69 app/testpmd: fix eth packet dump for small buffers
In the rather unlikely case where the first segment is too small to
contain an ethernet header, we can't go and directly dereference the
mbuf data buffer.

Using rte_pktmbuf_read is a little more expensive but this is still
acceptable for a debugging feature.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-29 23:30:33 +02:00
Ferruh Yigit
baa4f61a35 app/testpmd: fix MAC address parser for flow rule
MAC address parsing was causing failure [1],
this patch partially reverts the commit
commit b5ddce8959 ("app/testpmd: use new ethernet address parser")

[1]
testpmd> flow validate 0  priority  2 ingress group 0 pattern eth dst
is 98:03:9B:5C:D9:00 / end actions queue index  0 / end
Bad arguments

Fixes: b5ddce8959 ("app/testpmd: use new ethernet address parser")

Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
2019-07-23 14:31:36 +02:00
Stephen Hemminger
6937d2103e app/testpmd: add option to not start device
Some configuration options can not be tested properly with testpmd
because it automatically starts all ports. This makes it harder
to test driver handling of configuration options:
(for example rx_deferred_start).

Add new command line flag --disable-device-start which skips
the device start. The port can then be started manually later.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-23 14:31:35 +02:00
Nithin Dabilpuram
55e51c9624 app/testpmd: add device related commands
With the latest published interface of
rte_eal_hotplug_[add,remove](), and rte_eth_dev_close(),
rte_eth_dev_close() would cleanup all the data structures of
port's eth dev leaving the device common resource intact
if RTE_ETH_DEV_CLOSE_REMOVE is set in dev flags.

So a new command "detach device" (~hotplug remove) to work,
with device identifier like "port attach" is added
to be able to detach closed devices.

Also to display currently probed devices, another command
"show device info <identifier>|all" is also added as a
part of this change.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-23 14:31:35 +02:00
Xiaoyu Min
c82ddb3c0b app/testpmd: add GRE key for raw encap/decap
GRE key (rte_flow_item_type_gre_key) is also needed in
raw encapsulation/decapsulation.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-23 14:31:35 +02:00
Xiaoyu Min
d17775b198 app/testpmd: support MPLS TC and S bits
Open the MPLS's TC and S bits of rte_flow_item_mpls in command line.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-23 14:31:35 +02:00
Xiaoyu Min
30626def03 app/testpmd: support raw encap/decap actions
This patch intend to support
action_raw_encap/decap [1] in a generic and convenient way.

Two new commands - set raw_encap, set raw_decap are introduced just
like the other commands for encap/decap, i.e. set vxlan.

These two commands have corresponding global buffers
which can be used by PMD as the input buffer for raw encap/decap.

The commands use the rte_flow pattern syntax to help user build the
raw buffer in a convenient way.

A common way to use it:

- encap matched egress packet with VxLAN tunnel:
testpmd> set raw_encap eth src is 10:11:22:33:44:55 / vlan tci is 1
	 inner_type is 0x0800 / ipv4 / udp dst is 4789 / vxlan vni
	 is 2 / end_set
testpmd> flow create 0 egress pattern eth / ipv4 / end actions
	 raw_encap / end

- decap l2 header and encap GRE tunnel on matched egress packet:
testpmd> set raw_decap eth / end_set
testpmd> set raw_encap eth dst is 10:22:33:44:55:66 / ipv4 / gre
	 protocol is 0x0800 / end_set
testpmd> flow create 0 egress pattern eth / ipv4 / end actions
	 raw_decap / raw_encap / end

- decap VxLAN tunnel and encap l2 header on matched ingress packet:
testpmd> set raw_encap eth src is 10:11:22:33:44:55 type is 0x0800 /
	 end_set
testpmd> set raw_decap eth / ipv4 / udp / vxlan / end_set
testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is 250 /
         vxlan vni is 0x1234 / ipv4 / end actions raw_decap /
         raw_encap / queue index 1 / mark id 0x1234 / end

[1] http://mails.dpdk.org/archives/dev/2018-October/116092.html

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-23 14:31:35 +02:00
Xiaoyu Min
d7efcee90f app/testpmd: move VXLAN/NVGRE help in filters section
The help string of set vxlan*, set nvgre* are in "config" section.
But they actually do not alter NIC or testpmd's configuration and
they will be used by "flow" command later.

Put them in "filters" section along with "flow" command seems more
reasonable.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-23 14:31:35 +02:00
Viacheslav Ovsiienko
a1be9d7dfc app/testpmd: fix show port info routine
This patch updates "show port info [port_id]" command to display
the tx_desc_lim.nb_seg_max and tx_desc_lim.nb_mtu_seg_max fields
of rte_eth_dev_info structure.

Fixes: 4fb7e803eb ("ethdev: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-23 14:31:35 +02:00
Stephen Hemminger
b5ddce8959 app/testpmd: use new ethernet address parser
The cmdline_parse_ether_addr does not need to be used everywhere
in testpmd. Can use rte_ether_unformat_addr instead.
As an added bonus it eliminates some code for copying.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-08 21:26:52 +02:00
Xiaoyu Min
c6ef1454ae app/testpmd: match GRE key and present bits
Support matching on GRE key and present bits (C,K,S)

Example testpmd command could be:
  testpmd>flow create 0 ingress group 1 pattern eth / ipv4 /
	  gre / gre_key value is 0x12345678 / end
	  actions rss queues 1 0 end / mark id 196 / end

Which will match GRE packet with k present bit set and key value is
0x12345678.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2019-07-08 21:26:52 +02:00
Wei Zhao
74453ac9ef app/testpmd: fix queue offload configuration
When adding offloads from commandline, not only port
related configuration bits should be set, but also queue
related offloads configuration bits, or it will cause error.
For example, test in this process for ixgbe:
(1)./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 4
-- -i --portmask=0x1 --port-topology=loop --disable-crc-strip
(2)port stop all
(3)port config all crc-strip on
(4)port start all
we will see "Fail to configure port 0 rx queues" of warning info.

Fixes: 0074d02fca ("app/testpmd: convert to new Rx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-05 01:52:02 +02:00
Haiyue Wang
9a45c4981c app/testpmd: fix parsing RSS queue rule
Declare a local variable 'arg' to hold the pointer to ARGS_ENTRY_ARB,
otherwise, the pop 'arg' in 'parse_int' holds wrong data like 'arg->
offset = 5912737, arg->size = 0', this caused the parse failure.

If calling like 'push_args(ctx, ARGS_ENTRY_ARB..)', the below code for
assigning 'offset & size' will be missed for some gcc optimization.

parse_vc_action_rss_queue
    29c5:	c5 f9 ef c0          	vpxor  %xmm0,%xmm0,%xmm0
    29c9:	43 8d 44 24 68       	lea    0x68(%r12,%r12,1),%eax
    29ce:	48 c7 44 24 20 00 00 	movq   $0x0,0x20(%rsp)
    29d5:	00 00
    29d7:	c5 f8 29 44 24 10    	vmovaps %xmm0,0x10(%rsp)
    29dd:	89 44 24 18          	mov    %eax,0x18(%rsp)
    29e1:	48 63 83 0c 01 00 00 	movslq 0x10c(%rbx),%rax
    29e8:	c7 44 24 1c 02 00 00 	movl   $0x2,0x1c(%rsp)
    29ef:	00
    29f0:	c5 f8 29 04 24       	vmovaps %xmm0,(%rsp)

The above assembly code is from this modification with:
    gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
    Fedora release 30 (Thirty)
    5.1.11-300.fc30.x86_64

Fixes: d0ad8648b1 ("app/testpmd: fix RSS flow action configuration")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-07-05 01:52:02 +02:00
Saleh Alsouqi
a97ec9ba45 app/testpmd: fix MPLS IPv4 encapsulation fields
Having version and ihl set to 0 would result in a
corrupted/incorrect encapsulating packet for MPLS,
this commit sets these fields to 4 and 5 respectively
as defined in librte_net/rte_ip.h.

Fixes: 3e77031be8 ("app/testpmd: add MPLSoGRE encapsulation")
Fixes: a1191d39cb ("app/testpmd: add MPLSoUDP encapsulation")
Cc: stable@dpdk.org

Signed-off-by: Saleh Alsouqi <salehals@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-05 01:52:01 +02:00
Dekel Peled
27a2c1267f app/testpmd: add actions to modify TCP header fields
Add actions:
- INC_TCP_SEQ - Increase sequence number in the outermost TCP header.
- DEC_TCP_SEQ - Decrease sequence number in the outermost TCP header.
- INC_TCP_ACK - Increase acknowledgment number in the outermost TCP
                header.
- DEC_TCP_ACK - Decrease acknowledgment number in the outermost TCP
                header.

Original work by Xiaoyu Min.

This patch uses the new approach introduced by [1], using a new
macro ARG_ENTRY_HTON to pass a single integer argument to each of
the new actions.

[1] http://patches.dpdk.org/patch/55882/

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2019-07-05 01:52:01 +02:00
Morten Brørup
f0c2dc8201 net: move TCP flags from ethdev header
TCP flags were moved to the TCP header file from the Ethernet control
header file, and the RTE prefix was added to their names.

Missing TCP ECN flags were added.

The ALL mask did not include TCP ECN flags, so it was renamed to reflect
that it applies to N-tuple filtering only.

Updated other files affected by the renaming accordingly.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2019-07-03 12:57:30 +02:00
Wei Zhao
575e0fd1a0 app/testpmd: fix offloads config
There is no need to use default offloads configuration
if offloads configuration has been pass down from upper layer.
The default offloads are overwritten if not zero.

Fixes: 5e91aeef21 ("app/testpmd: fix offload flags after port config")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-03 12:57:30 +02:00
Ilya Maximets
75b66decdb eal: fix positive error codes from probe/remove
According to API, 'rte_dev_probe()' and 'rte_dev_remove()' must
return 0 or negative error code. Bus code returns positive values
if device wasn't recognized by any driver, so the result of
'bus->plug/unplug()' must be converted. 'local_dev_probe()' and
'local_dev_remove()' also has their internal API, so the conversion
should be done there.

Positive on remove means that device not found by driver.
Positive on probe means that there are no suitable buses/drivers,
i.e. device is not supported.

Users of these API fixed to provide a good example by respecting
DPDK API. This also will allow to catch such issues in the future.

Fixes: a3ee360f44 ("eal: add hotplug add/remove device")
Fixes: 244d513071 ("eal: enable hotplug on multi-process")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-06-29 21:28:38 +02:00
Tiwei Bie
08505c6f41 app/testpmd: drop the workaround for virtio-user
The RTE_ETH_DEV_CLOSE_REMOVE support has been enabled in
virtio-user, private resources for the port will be freed
by rte_eth_dev_close(), so there is no need to have this
workaround anymore.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-06-20 23:42:04 +02:00
Ferruh Yigit
163fbaafa2 app/testpmd: fix crash
Testpmd tries to calculate mbuf size based on "max Rx packet size" and
"max MTU segment number".
When driver set a "nb_mtu_seg_max" to zero, it causes division by zero
segmentation fault in testpmd.

If the PMD set "nb_mtu_seg_max" to zero, testpmd shouldn't try to
calculate the mbuf size.

Fixes: 33f9630fc2 ("app/testpmd: create mbuf based on max supported segments")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-16 12:53:46 +03:00
Sunil Kumar Kori
33f9630fc2 app/testpmd: create mbuf based on max supported segments
Configuring buffer size based following parameters:
- max-pkt-len
- max supported segments per MTU

Buffer size are configured as given below:
- If platform supports infinite segments per packet then default
  buffer size is used.
- If platform supports nb_mtu_seg_max segments then buffer size
  is configured as (max-pkt-len / nb_mtu_seg_max) + headroom

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-13 23:54:30 +09:00
David Marchand
0c9da7555d net: replace IPv4/v6 constants with uppercase name
Since we change these macros, we might as well avoid triggering complaints
from checkpatch because of mixed case.

old=RTE_IPv4
new=RTE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

old=RTE_ETHER_TYPE_IPv4
new=RTE_ETHER_TYPE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

old=RTE_ETHER_TYPE_IPv6
new=RTE_ETHER_TYPE_IPV6
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2019-06-03 16:54:54 +02:00
Olivier Matz
e73e3547ce net: add rte prefix to UDP structure
Add 'rte_' prefix to structures:
- rename struct udp_hdr as struct rte_udp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:46 +02:00
Olivier Matz
f41b5156fe net: add rte prefix to TCP structure
Add 'rte_' prefix to structures:
- rename struct tcp_hdr as struct rte_tcp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:46 +02:00
Olivier Matz
09d9ae1ac9 net: add rte prefix to SCTP structure
Add 'rte_' prefix to structures:
- rename struct sctp_hdr as struct rte_sctp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:46 +02:00
Olivier Matz
24ac604ef7 net: add rte prefix to IP defines
Add 'RTE_' prefix to defines:
- rename IPv4( as RTE_IPv4(.
- rename IPV4_MAX_PKT_LEN as RTE_IPV4_MAX_PKT_LEN.
- rename IPV4_HDR_IHL_MASK as RTE_IPV4_HDR_IHL_MASK.
- rename IPV4_IHL_MULTIPLIER as RTE_IPV4_IHL_MULTIPLIER.
- rename IPV4_HDR_DF_SHIFT as RTE_IPV4_HDR_DF_SHIFT.
- rename IPV4_HDR_MF_SHIFT as RTE_IPV4_HDR_MF_SHIFT.
- rename IPV4_HDR_FO_SHIFT as RTE_IPV4_HDR_FO_SHIFT.
- rename IPV4_HDR_DF_FLAG as RTE_IPV4_HDR_DF_FLAG.
- rename IPV4_HDR_MF_FLAG as RTE_IPV4_HDR_MF_FLAG.
- rename IPV4_HDR_OFFSET_MASK as RTE_IPV4_HDR_OFFSET_MASK.
- rename IPV4_HDR_OFFSET_UNITS as RTE_IPV4_HDR_OFFSET_UNITS.
- rename IPV4_ANY as RTE_IPV4_ANY.
- rename IPV4_LOOPBACK as RTE_IPV4_LOOPBACK.
- rename IPV4_BROADCAST as RTE_IPV4_BROADCAST.
- rename IPV4_ALLHOSTS_GROUP as RTE_IPV4_ALLHOSTS_GROUP.
- rename IPV4_ALLRTRS_GROUP as RTE_IPV4_ALLRTRS_GROUP.
- rename IPV4_MAX_LOCAL_GROUP as RTE_IPV4_MAX_LOCAL_GROUP.
- rename IPV4_MIN_MCAST as RTE_IPV4_MIN_MCAST.
- rename IPV4_MAX_MCAST as RTE_IPV4_MAX_MCAST.
- rename IS_IPV4_MCAST as RTE_IS_IPV4_MCAST.
- rename IPV6_HDR_FL_SHIFT as RTE_IPV6_HDR_FL_SHIFT.
- rename IPV6_HDR_TC_SHIFT as RTE_IPV6_HDR_TC_SHIFT.
- rename IPV6_HDR_FL_MASK as RTE_IPV6_HDR_FL_MASK.
- rename IPV6_HDR_TC_MASK as RTE_IPV6_HDR_TC_MASK.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:46 +02:00
Olivier Matz
a7c528e5d7 net: add rte prefix to IP structure
Add 'rte_' prefix to structures:
- rename struct ipv4_hdr as struct rte_ipv4_hdr.
- rename struct ipv6_hdr as struct rte_ipv6_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:46 +02:00
Olivier Matz
ecaeed4f1d net: add rte prefix to ICMP defines
Add 'RTE_' prefix to defines:
- rename IP_ICMP_ECHO_REPLY as RTE_IP_ICMP_ECHO_REPLY.
- rename IP_ICMP_ECHO_REQUEST as RTE_IP_ICMP_ECHO_REQUEST.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:46 +02:00
Olivier Matz
6d961b06d8 net: add rte prefix to ICMP structure
Add 'rte_' prefix to structures:
- rename struct icmp_hdr as struct rte_icmp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:45 +02:00
Olivier Matz
35b2d13fd6 net: add rte prefix to ether defines
Add 'RTE_' prefix to defines:
- rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN.
- rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN.
- rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN.
- rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN.
- rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN.
- rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN.
- rename ETHER_MTU as RTE_ETHER_MTU.
- rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN.
- rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID.
- rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN.
- rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU.
- rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR.
- rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR.
- rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4.
- rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6.
- rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP.
- rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN.
- rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP.
- rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ.
- rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG.
- rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588.
- rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW.
- rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB.
- rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP.
- rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS.
- rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM.
- rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN.
- rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE.
- rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4.
- rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6.
- rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH.
- rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH.
- rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS.
- rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP.
- rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG.
- rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN.

Do not update the command line library to avoid adding a dependency to
librte_net.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:45 +02:00
Olivier Matz
538da7a1ca net: add rte prefix to ether functions
Add 'rte_' prefix to functions:
- rename is_same_ether_addr() as rte_is_same_ether_addr().
- rename is_zero_ether_addr() as rte_is_zero_ether_addr().
- rename is_unicast_ether_addr() as rte_is_unicast_ether_addr().
- rename is_multicast_ether_addr() as rte_is_multicast_ether_addr().
- rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr().
- rename is_universal_ether_addr() as rte_is_universal_ether_addr().
- rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr().
- rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr().
- rename eth_random_addr() as rte_eth_random_addr().
- rename ether_addr_copy() as rte_ether_addr_copy().
- rename ether_format_addr() as rte_ether_format_addr().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:45 +02:00
Olivier Matz
6d13ea8e8e net: add rte prefix to ether structures
Add 'rte_' prefix to structures:
- rename struct ether_addr as struct rte_ether_addr.
- rename struct ether_hdr as struct rte_ether_hdr.
- rename struct vlan_hdr as struct rte_vlan_hdr.
- rename struct vxlan_hdr as struct rte_vxlan_hdr.
- rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr.

Do not update the command line library to avoid adding a dependency to
librte_net.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:45 +02:00
Olivier Matz
e482e0fa6a net: add rte prefix to ARP defines
Add 'RTE_' prefix to defines:
- rename ARP_HRD_ETHER as RTE_ARP_HRD_ETHER.
- rename ARP_OP_REQUEST as RTE_ARP_OP_REQUEST.
- rename ARP_OP_REPLY as RTE_ARP_OP_REPLY.
- rename ARP_OP_REVREQUEST as RTE_ARP_OP_REVREQUEST.
- rename ARP_OP_REVREPLY as RTE_ARP_OP_REVREPLY.
- rename ARP_OP_INVREQUEST as RTE_ARP_OP_INVREQUEST.
- rename ARP_OP_INVREPLY as RTE_ARP_OP_INVREPLY.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:44 +02:00
Olivier Matz
f2745bfebc net: add rte prefix to ARP structures
Also rename arp_hrd, arp_pro, arp_hln, arp_pln and arp_op fields
to avoid conflict with the #defines in gnu libc.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24 13:34:44 +02:00
Wei Zhao
5e91aeef21 app/testpmd: fix offload flags after port config
There is an error in function rxtx_port_config(), which may overwrite
offloads configuration get from function launch_args_parse() when run
testpmd app. So rxtx_port_config() should do "or" for port offloads.

Fixes: d44f8a485f ("app/testpmd: enable per queue configure")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Peng Yuan <yuan.peng@intel.com>
2019-05-13 17:06:27 +02:00