Commit Graph

13520 Commits

Author SHA1 Message Date
Jay Ding
891f8260dd net/bnxt: add Tx TruFlow table config for P4 device
Add TX direction TruFlow table type config to be
compatible with other devices. For P4 device, the TX cfg
is duplicated from RX.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:14:11 +01:00
Jay Ding
d1bd289752 net/bnxt: support TruFlow and AFM SRAM partitioning
Implement set/get_sram_policy which support both Rx/Tx
direction truflow type the specific SRAM bank.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:13:53 +01:00
Jay Ding
4d05ce4e68 net/bnxt: add TruFlow API to get SRAM resources
Implement tf_get_sram_resources to return SRAM
partition information, including bank count and
SRAM profile number.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:13:34 +01:00
Kishore Padmanabha
8f142af983 net/bnxt: modify VF representor allocation sequence
When the VF representor interface is created, the VF pair relationship
is established between the VF and it is representor. If the pair
already exists then the pair needs to be deleted before allocation.
This could happen if the application is abruptly killed and restarted.
If the deletion of an existing VF rep is not done then hw pipeline is
not cleaned and a new allocation shall leave the hw in inconsistent
state.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:13:13 +01:00
Kishore Padmanabha
0adfa2b665 net/bnxt: support socket direct feature
Added support for socket direct feature. This feature
allows to ignore the incoming interface and use other fields
in the packet to identify the flow and forward.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:12:52 +01:00
Kishore Padmanabha
6639a8b692 net/bnxt: update log messages in TruFlow path
Some of the error level log messages are made debug level messages.
When Truflow is not enabled then Truflow init error messages are
moved to debug level instead.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:12:30 +01:00
Shahaji Bhosle
4d2c429177 net/bnxt: fix type casting
Typecast flow_item type, action_item type and the ENUMs to uint32_t
before comparing.

Bugzilla ID: 821
Fixes: bdf4a3c631 ("net/bnxt: support tunnel offload")

Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:12:13 +01:00
Kishore Padmanabha
9ba1e16716 net/bnxt: remove devargs option for stats accumulation
The accumulation of flow counters is not determined by the application
device arguments anymore. Instead it is now dictated by the platform
capabilities whether to do software based accumulation or not.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:11:56 +01:00
Shahaji Bhosle
3d372e8d38 net/bnxt: increase flow scale for Thor
* Updated defines and data types to allow 256 VFRs.
* Increased the encap record cache to support 256 to 4K entries. So
  VxLAN connections can be scaled to 4K entries.

Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:11:36 +01:00
Jay Ding
588e333ee6 net/bnxt: get TruFlow version
Implement tf_get_version that returns TruFlow version
numbers and CFA resources capabilities.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:11:15 +01:00
Kishore Padmanabha
3258083996 net/bnxt: support inner IP header for GRE tunnel flows
This change allows adding IP header matches for GRE flows that
does not specify outer IP header in the flow match pattern.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 22:11:00 +01:00
Ajit Khaparde
0d0dd1773e net/bnxt: enable wildcard match for ingress flows
Enabled wildcard match support for IPv4 ingress flows.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
2021-11-04 21:57:17 +01:00
Kishore Padmanabha
08e593a2d8 net/bnxt: add suffix to unsigned long flow signatures
The flow signature is of type unsigned long value and needs to be
suffixed with UL. This patch addresses ISO C90 compilation error.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 21:56:52 +01:00
Ajit Khaparde
b3c8396d39 net/bnxt: remove unused functions
Remove unused functions from the code.
Specifically the following functions are being removed.

bnxt_get_iface_mac();
bnxt_get_vnic_id();
bnxt_get_parent_vnic_id();
bnxt_get_bp();
bnxt_get_svif();
bnxt_get_fw_func_id();
bnxt_get_parif();
bnxt_get_phy_port_id();
bnxt_get_vport();
bnxt_get_interface_type();

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 21:56:11 +01:00
Kishore Padmanabha
be3af03f55 net/bnxt: add capability option for socket redirect
Added support for socket redirect feature capability so applications
can enable or disable this feature. This patch contains the template
changes.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 21:53:09 +01:00
Farah Smith
06d1a5d056 net/bnxt: support clear on read
Add clear on read stats support for Thor. Currently, the
flow stats are not cleared after they are read from the FW.
This patch adds support for clear on read. Since clear on
read support is added for flow stats in Thor, the flow
accumulation is enabled on Thor as well.

Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 21:52:45 +01:00
Kishore Padmanabha
a738cbfe0d net/bnxt: fix out of bounds access in hash list
The number of hash bucket list calculation is fixed.
Added check to avoid the out of bounds condition.

Fixes: 0001cc58d3 ("net/bnxt: support generic hash table")
Cc: stable@dpdk.org

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 21:52:18 +01:00
Kishore Padmanabha
34a7ff5a92 net/bnxt: support multi root capability
Update driver to read the multi root capability and ignore
PCI address check while creating ulp session when multi root
capability is enabled in the hardware. DPDK HSI version updated
from 1.10.2.44 to 1.10.2.68.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 21:51:52 +01:00
Kishore Padmanabha
c674c133f1 net/bnxt: support NAT for dest IP and port combination
* Added support for NAT action for destination IP and port
  combination for Thor devices.
* Consolidated the encapsulation and NAT entries for scaling flows
  with NAT actions.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-04 21:51:14 +01:00
Viacheslav Galaktionov
ce1f72dc4f net/sfc: allow control threads for counter queue polling
MAE counters can be polled from a control thread if no service core is
allocated for this.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2021-11-04 17:57:00 +01:00
Andrew Rybchenko
50448dd3ab net/sfc: merge Rx and Tx doorbell counters into one
Datapath queue is either Rx or Tx, so just one counter is sufficient
for doorbells. It can count Tx doorbells in the case of Tx queue and
Rx doorbells in the case of Rx queue.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-04 17:42:05 +01:00
Jiawen Wu
3d4f43ea31 net/txgbe: fix packet statistics
Fix specific length packet statistics caused by wrong register
addresses.

Fixes: 24a4c76aff ("net/txgbe: add error types and registers")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2021-11-04 17:17:28 +01:00
Huisong Li
ff6dc76e40 net/hns3: refactor multi-process initialization
Currently, the logic of the PF and VF initialization codes for multiple
process is the same. A common function can be extracted to initialize
and unload multiple process.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Huisong Li
443242212b net/hns3: unregister MP action on close for secondary
This patch fixes lack of unregistering MP action for secondary process
when PMD is closed.

Fixes: 9570b1fdbd ("net/hns3: check multi-process action register result")
Fixes: 23d4b61fee ("net/hns3: support multiple process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Huisong Li
841f869353 net/hns3: fix multi-process action register and unregister
The multi-process has the following problems:
1) After a port in primary process is closed, the mp action of the
   process is unregistered. Which will cause that other device in the
   primary process cannot respond to requests from secondary processes.
2) Because variable "hns3_inited" is set to true without returning an
   initial value, the mp action cannot be registered again after it is
   unregistered.
3) The mp action of primary and secondary process need to be registered
   only once regardless of port numbers in the process. That's what
   variable "hns3_inited" does. But the variable is difficult to
   understand.

This patch adds a hns3_process_local_data structure to resolve above
problems.

Fixes: 9570b1fdbd ("net/hns3: check multi-process action register result")
Fixes: 23d4b61fee ("net/hns3: support multiple process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Huisong Li
3232637177 net/hns3: fix secondary process reference count
The "secondary_cnt" will be increased when a secondary process
initialized. But the value of this variable is not decreased when the
secondary process exits, which causes the primary process senses that
the secondary process still exists. As a result, the primary process
fails to send messages to the secondary process after the secondary
process exits.

Fixes: 23d4b61fee ("net/hns3: support multiple process")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2021-11-04 15:11:32 +01:00
Dapeng Yu
3378e71244 net/ice: fix flow redirect
It's possible that a switch rule can't be redirect successfully due
to kernel driver is busy to handle an ongoing VF reset, so the
redirect action need to be deferred into next redirect request which
is promised by kernel driver after VF reset done.

This patch uses the saved flow rule's data to replay switch rule
remove/add during next flow redirect.

Fixes: 397b4b3c50 ("net/ice: enable flow redirect on switch")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 11:55:22 +01:00
Dapeng Yu
9fda31c322 net/ice: save rule on switch filter creation
The VSI number, lookup elements and rule information for creating switch
filter are abandoned when switch filter is created in original
implementation.

This patch saved the abandoned data in RTE flow, it is for future
use on replay when handling exception at flow redirect.

Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 11:54:36 +01:00
Yuying Zhang
7f89f41860 net/ice: fix order of flow filter parser list
The order of flow filter parser list was not definite and
linked to the register order of parsers. It caused ACL filter
covered by switch filter in some cases.

This patch fixed order of parser list to guarantee the usage
of each filter. Below lists the order.
ACL filter > Switch filter > FDIR > Hash filter.

Fixes: e4a0a7599d ("net/ice: fix flow priority support in non-pipeline mode")
Cc: stable@dpdk.org

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 11:47:43 +01:00
Tudor Cornea
f86d553cc1 net/af_packet: fix ignoring full ring on Tx
The poll call can return POLLERR which is ignored, or it can return
POLLOUT, even if there are no free frames in the mmap-ed area.

We can account for both of these cases by re-checking if the next
frame is empty before writing into it.

We have attempted to reproduce this issue with pktgen-dpdk, using the
following configuration.

pktgen -l 1-4 -n 4 --proc-type=primary --no-pci --no-telemetry \
    --no-huge -m 512 \
    --vdev=net_af_packet0,iface=eth1,blocksz=16384,framesz=8192, \
    framecnt=2048,qpairs=1,qdisc_bypass=0 \
    -- \
    -P \
    -T \
    -m "3.0" \
    -f themes/black-yellow.theme

We configure a low tx rate (~ 335 packets / second) and a small
packet size, of about 300 Bytes from the pktgen CLI.

set 0 size 300
set 0 rate 0.008
set 0 burst 1
start 0

After bringing the interface down, and up again, we seem to arrive
in a state in which the tx rate is inconsistent, and does not recover.

ifconfig eth1 down; sleep 7; ifconfig eth1 up

[1] http://code.dpdk.org/pktgen-dpdk/pktgen-20.11.2/source/INSTALL.md

Fixes: 364e08f2bb ("af_packet: add PMD for AF_PACKET-based virtual devices")
Cc: stable@dpdk.org

Signed-off-by: Mihai Pogonaru <pogonarumihai@gmail.com>
Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-04 12:56:32 +01:00
Igor Romanov
b75d85b766 net/sfc: support Xilinx Riverhead VF
Add the device and vendor numbers to the PCI ID map so
that a VF can be probed.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-04 12:41:34 +01:00
John Daley
db79f2d5c9 net/enic: support GTP header flow matching
The GTP, GTP-U, GTP-C header fields can be matched, however NIC does not
support GTP tunneling so no items after the GTP header can be specified.
If a GTP-U or GTP-C item is specified without a preceding UDP item, the
UDP destination port is implicitly matched. For GTP, the destination UDP
port must be specified but its value is not enforced.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
2021-11-04 12:34:46 +01:00
Ting Xu
1b9c68120a net/ice: enable protocol agnostic flow offloading in RSS
Enable protocol agnostic flow offloading to support raw pattern input
for RSS hash flow rule creation. It is based on Parser Library feature.
Current rte_flow raw API is utilized.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 04:15:29 +01:00
Ting Xu
0837da2e27 net/ice/base: support add HW profile for RSS raw flow
Based on the parser library, we can directly set HW profile and
associate VSI for RSS raw flows. Add symmetric hash configuration
for raw flow.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-04 04:10:43 +01:00
Hyong Youb Kim
af397b3c93 net/enic: avoid error message when no advanced filtering
Probing the availability of Flow Manager API may print the following
error log.

PMD: rte_enic_pmd: Devcmd 88 failed with error code -1

The error indicates a flow manager operation failed and happens when
advanced filtering is disabled on vNIC. It is harmless but confusing
to the user. Since advanced filtering is a prerequisite, check first
if it is available and avoid the error message altogether.

Fixes: ea7768b5bb ("net/enic: add flow implementation based on Flow Manager API")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2021-11-03 19:56:55 +01:00
Hyong Youb Kim
bcd68b6841 net/enic: fix crash caused by changing MTU
Changing MTU after the device start causes a segfault in the Rx
handler. The MTU handler (enic_set_mtu) performs the following steps.
1. Stop NIC Rx
2. Change Rx handler '(struct rte_eth_dev)->rx_pkt_burst' to
   the dummy handler and sleep a while to quiesce
3. Re-allocate/initialize Rx structures
4. Change Rx handler back to the real handler
   (e.g. enic_noscatter_recv_pkts)

enic_set_mtu does not update the recently introduced fast-path pointer
'(struct rte_eth_fp_ops)->rx_pkt_burst'. Since rte_eth_rx_burst only
uses the fast-path pointer, it keeps invoking the real Rx handler, not
the dummy one set by (2). And, (3) causes a segfault in the real Rx
handler (e.g. dereferencing freed structures).

Fix the segfault by updating the fast-path pointer as well.

Fixes: c87d435a4d ("ethdev: copy fast-path API into separate structure")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2021-11-03 19:41:15 +01:00
Rakesh Kudurumalla
5ee3457b08 net/cnxk: integrate BPF count get mailbox
Bandwidth profile count is updated in meter capabilities during device
initialization using mbox interface.

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:15:08 +01:00
Nithin Dabilpuram
a9729f7e14 event/cnxk: disable drop Rx error on vector enable
Disable drop_re i.e dropping packets with receive errors on
vector enable for few cn10k revisions due to HW errata.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:05:47 +01:00
Nithin Dabilpuram
dfe5f0a1f5 net/cnxk: allow FC on LBK and enable TM BP on Rx pause
Allow flow control on LBK VF's and enable TM to listen on
backpressure when Rx pause is enabled.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:05:47 +01:00
Srujana Challa
3c3ea76cff net/cnxk: support CPT CTX write through microcode op
Adds support to write CPT CTX through microcode op(SET_CTX/WRITE_SA)
for cn10k inline mode.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:05:47 +01:00
Nithin Dabilpuram
58debb813a common/cnxk: enable TM to listen on Rx pause frames
Enable TM topology to listen on backpressure received when
Rx pause frame is enabled. Only one TM node in Tl3/TL2 per
channel can listen on backpressure on that channel.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:05:47 +01:00
Maxime Coquelin
ab4bb42406 vhost: rename driver callbacks struct
As previously announced, this patch renames struct
vhost_device_ops to struct rte_vhost_device_ops.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
2021-11-03 11:59:27 +01:00
Junfeng Guo
25be39cc17 net/ice: enable protocol agnostic flow offloading in FDIR
Protocol agnostic flow offloading in Flow Director is enabled by this
patch based on the Parser Library, using existing rte_flow raw API.

Note that the raw flow requires:
1. byte string of raw target packet bits.
2. byte string of mask of target packet.

Here is an example:
FDIR matching ipv4 dst addr with 1.2.3.4 and redirect to queue 3:

flow create 0 ingress pattern raw \
pattern spec \
00000000000000000000000008004500001400004000401000000000000001020304 \
pattern mask \
000000000000000000000000000000000000000000000000000000000000ffffffff \
/ end actions queue index 3 / mark id 3 / end

Note that mask of some key bits (e.g., 0x0800 to indicate ipv4 proto)
is optional in our cases. To avoid redundancy, we just omit the mask
of 0x0800 (with 0xFFFF) in the mask byte string example. The prefix
'0x' for the spec and mask byte (hex) strings are also omitted here.

Also update the ice feature list with rte_flow item raw.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-03 13:01:31 +01:00
Junfeng Guo
8ebb93942b net/ice/base: add function to set HW profile for raw flow
Based on the parser library, we can directly set HW profile and
associate the main/ctrl vsi.

This patch set also updated the base code BSD release version.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-03 13:00:27 +01:00
Junfeng Guo
dea1ebd374 net/ice/base: add method to disable FDIR swap option
In this patch, we introduced a new parameter to enable/disable the
FDIR SWAP option by setting the swap and inset register set with
certain values.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-11-03 13:00:06 +01:00
Stephen Hemminger
211262d925 net/bnxt: fix firmware version query
UBSan testing revealed undefined shift here.

The firmware returns the version in bytes; and shifting a 8 bit
quantity here can lead to undefined behaviour or truncation.
The fix is to promote the bytes to 32 bit before shifting.

Bugzilla ID: 838
Fixes: 9a891c1764 ("net/bnxt: update HWRM to version 1.9.2")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-11-03 05:12:29 +01:00
Ivan Malov
69fbb4e9b5 net/sfc: ignore direction attributes in transfer flows
[1] has deprecated the use of direction attributes in "transfer"
flows. Ignore them during the transition period.

[1]
commit 9d2a349b38 ("ethdev: deprecate direction attributes in transfer flows")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-02 19:26:13 +01:00
Ivan Malov
46c6714ffd net/sfc: support port representor related flow actions
Add support for actions PORT_REPRESENTOR and REPRESENTED_PORT.

The former should be used instead of ambiguous PORT_ID.

The latter sends traffic to the entity represented by
the given ethdev (network port or VF).

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-02 19:26:13 +01:00
Ivan Malov
0fb3e8a910 net/sfc: support represented port flow item
Add support for item REPRESENTED_PORT to match on traffic entering
the embedded switch from the entity represented by the given
ethdev (network port or VF).

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-02 19:26:13 +01:00
Ivan Malov
79b28b4920 net/sfc: assign correct m-ports to independent switch ports
In accordance with patches [1-4], MAE admin ethdev represents a
network port and not the PF which it sits on. Rework the way
how "ethdev" and "entity" m-ports are assigned in SW switch
port entries of independent ethdevs. Explain in comments.

[1] commit 081e42dab1 ("ethdev: add port representor item to flow API")
[2] commit 49863ae2bf ("ethdev: add represented port item to flow API")
[3] commit 8edb6bc026 ("ethdev: add port representor action to flow API")
[4] commit 88caad251c ("ethdev: add represented port action to flow API")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-11-02 19:26:13 +01:00