Commit Graph

370 Commits

Author SHA1 Message Date
Fei Qin
b22af30045 net/nfp: fix return path in TSO processing
When enable TSO, nfp_net_nfdk_tx_tso() fills segment information in Tx
descriptor. However, the return path for TSO is lost and the LSO related
fields of Tx descriptor is filled with zeros which prevents packets from
being sent.

This patch fixes the return path in TSO processing function to make sure
TSO works fine.

Fixes: c73dced48c ("net/nfp: add NFDk Tx")
Cc: stable@dpdk.org

Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
2022-11-22 02:59:21 +01:00
Chaoyong He
7aa745d788 net/nfp: fix Rx descriptor DMA address for VNIC
When using flower firmware application, and the ctrl vNIC receiving a
packet that is larger than the mbuf size, the Rx function will break the
receive loop and sent a free list descriptor with random DMA address.

Fix this by moving the increment of the free list descriptor counter
to after the packet size have been checked and acted on.

Fixes: a36634e87e ("net/nfp: add flower ctrl VNIC Rx/Tx")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 15:00:01 +01:00
Chaoyong He
3fd6400393 net/nfp: fix Rx descriptor DMA address for PF
When using flower firmware application, and the PF receiving a packet
that is larger than the mbuf size, the Rx function will break the
receive loop and sent a free list descriptor with random DMA address.

Fix this by moving the increment of the free list descriptor counter
to after the packet size have been checked and acted on.

Fixes: cf559c2a1d ("net/nfp: add flower PF Rx/Tx")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 15:00:01 +01:00
Chaoyong He
0c48f5ad44 net/nfp: fix Rx descriptor DMA address
When receiving a packet that is larger than the mbuf size, the Rx
function will break the receive loop and sent a free list descriptor
with random DMA address.

Fix this by moving the increment of the free list descriptor counter
to after the packet size have been checked and acted on.

Fixes: bb340f56fc ("net/nfp: fix memory leak in Rx")
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 15:00:01 +01:00
Chaoyong He
860d735d32 net/nfp: fix mask table free
The free process of mask table has problem, should use
'rte_hash_free()' rather than 'rte_free()'.

Fixes: ac09376096 ("net/nfp: add structures and functions for flow offload")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-18 13:40:24 +01:00
Abdullah Ömer Yamaç
7dde9c844a drivers: omit symbol map when unneeded
In this patch, we removed the necessity of the version files and
you don't need to update these files for each release, you can just
remove them.

Suggested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-11-14 15:22:46 +01:00
Chaoyong He
98e675a4e9 net/nfp: fix out-of-bounds write for VXLAN
Fix the check logic of the index of the array, which
caused the out of bounds write problem.

Coverity issue: 381616
Fixes: c55abf6141 ("net/nfp: support RSS on VXLAN inner layer")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-11-06 10:30:28 +01:00
Chaoyong He
9082336048 net/nfp: support new solution for tunnel decap action
The new version of flower firmware application add the support of
a new tunnel decap action solution.

It changes the structure of tunnel neighbor, and use a feature flag
to indicate which tunnel decap action solution is used.

Add the logic of read extra features from firmware, and store it in
the app private structure.

Adjust the data structure and related logic to make the PMD support
both version of tunnel decap action solutions.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
52a83356a6 net/nfp: support IPv6 NVGRE decap flow action
Add the offload support of decap action of IPv6 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
3f7aa85b6f net/nfp: support IPv4 NVGRE decap flow action
Add the offload support of decap action of IPv4 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
cb69acd0bb net/nfp: support IPv6 NVGRE flow item
Add the corresponding logics to support the offload of
IPv6 NVGRE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
162fc0de03 net/nfp: support IPv4 NVGRE flow item
Add the corresponding logics to support the offload of
IPv4 NVGRE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
5f5e836005 net/nfp: prepare for IPv6 GRE tunnel decap flow action
Add the related data structure and logics, prepare for
the decap action of IPv6 GRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
8891d6700c net/nfp: prepare for IPv4 GRE tunnel decap flow action
Add the related data structure and logics, prepare for
the decap action of IPv4 GRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
fff680eef7 net/nfp: support IPv6 NVGRE encap flow action
Add the offload support of encap action of IPv6 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
88cce05380 net/nfp: support IPv4 NVGRE encap flow action
Add the offload support of encap action of IPv4 NVGRE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
590ec35723 net/nfp: support IPv6 GENEVE decap flow action
Add the offload support of decap action for IPv6 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
646a8653b5 net/nfp: support IPv4 GENEVE decap flow action
Add the offload support of decap action for IPv4 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
dc1171dd03 net/nfp: support IPv6 GENEVE flow item
Add the corresponding logics to support the offload of
IPv6 GENEVE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
d59b2b0b9d net/nfp: support IPv4 GENEVE flow item
Add the corresponding logics to support the offload of
IPv4 GENEVE item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
98fa36eccc net/nfp: support IPv6 GENEVE encap flow action
Add the offload support of encap action for IPv6 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
a2a1153b6f net/nfp: support IPv4 GENEVE encap flow action
Add the offload support of encap action for IPv4 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
e0843562c5 net/nfp: support IPv6 VXLAN decap flow action
Add the offload support of decap action for IPv6 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
60bc1764a9 net/nfp: support IPv4 VXLAN decap flow action
Add the offload support of decap action for IPv4 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
8ee18bad76 net/nfp: prepare for IPv6 UDP tunnel decap flow action
Add the related data structure and functions, prepare for
the decap action of IPv6 UDP tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
d3c33bdf1f net/nfp: prepare for IPv4 UDP tunnel decap flow action
Add the related data structure and functions, prepare for
the decap action of IPv4 UDP tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
c3b7254093 net/nfp: support IPv6 VXLAN encap flow action
Add the offload support of encap action for IPv6 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
724662b4ce net/nfp: support IPv4 VXLAN encap flow action
Add the offload support of encap action for IPv4 VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
36fb222db9 net/nfp: prepare for IPv6 tunnel encap flow action
Add the related data structure and functions, prepare for
the encap action of IPv6 tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
f382761cd2 net/nfp: prepare for IPv4 tunnel encap flow action
Add the related data structure and functions, prepare for
the encap action of IPv4 tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
ea6f2fa073 net/nfp: support IPv6 VXLAN flow item
Add the corresponding data structure and logics, to support
the offload of IPv6 VXLAN item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
d617b75a71 net/nfp: support IPv4 VXLAN flow item
Add the corresponding data structure and logics, to support
the offload of IPv4 VXLAN item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
a5b876a5aa net/nfp: fix CPP bridge service exit
The CPP (Command Pull Push) bridge service is needed for some debug
tools, but if no debug tools has ever been run, the initial logic of
CPP bridge service will block in accept() function call, and the
DPDK app can't exit normally.

Fixes: bab0e6f48b ("net/nfp: fix infinite loop")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
2022-10-25 10:53:33 +02:00
Chaoyong He
39d82d2098 net/nfp: fix promiscuous mode for representor port
The original functions of promiscuous mode can't process the
representor port rightly, revise the logic to do that.

Fixes: e1124c4f8a ("net/nfp: add flower representor framework")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
2022-10-24 14:30:43 +02:00
Chaoyong He
3202b003be net/nfp: support IPv6 DSCP flow action
Add the corresponding logics to support the offload of
set IPv6 DSCP action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
9c665d70f7 net/nfp: support IPv4 DSCP flow action
Add the corresponding logics to support the offload of
set IPv4 DSCP action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
ac12e126c4 net/nfp: support TTL flow action
Add the corresponding data structure and logics, to support
the offload of set TTL action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
87986df09d net/nfp: support TP destination flow action
Add the corresponding logics to support the offload of set
TP dest port action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
fc185097bb net/nfp: support TP source flow action
Add the corresponding data structure and logics, to support
the offload of set TP source port action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
51384f79b2 net/nfp: support IPv6 destination flow action
Add the corresponding logics to support the offload of
set dest IPv6 address action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
596ae22172 net/nfp: support IPv6 source flow action
Add the corresponding data structure and logics, to support
the offload of set source IPv6 address action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
f85c1e05bf net/nfp: support IPv4 destination flow action
Add the corresponding logics to support the offload of
set dest IPv4 address action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
ab80975b0a net/nfp: support IPv4 source flow action
Add the corresponding data structure and logics, to support
the offload of set source IPv4 address action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
eb9277cb2f net/nfp: support VLAN push flow action
Add the corresponding data structure and logics, to support
the offload of push_vlan action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
0203474d75 net/nfp: support VLAN pop flow action
Add the corresponding data structure and logics, to support
the offload of pop_vlan action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
eecc7ca308 net/nfp: support MAC destination flow action
Add the corresponding logics to support the offload of
set dest MAC action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
4f69831545 net/nfp: support MAC source flow action
Add the corresponding data structure and logics, to support
the offload of set source MAC action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
cdb4743541 net/nfp: support SCTP flow item
Add the corresponding logics to support the offload
of SCTP item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
17956c4e6f net/nfp: support UDP flow item
Add the corresponding logics to support the offload
of UDP item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00
Chaoyong He
4b768cc836 net/nfp: support TCP flow item
Add the corresponding data structure and logics, to support
the offload of TCP item.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-21 15:00:25 +02:00