aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/odp_packet_dpdk.c
AgeCommit message (Collapse)Author
2023-08-08linux-dpdk: pktio: optimize packet receive codeMatias Elo
Remove if branch from packet_init() as all data touched by the function is now located on the same cache line. Packet data prefetch has been removed from input_pkts_minimal() to avoid excessive prefetching. Packet header prefetch utilizes now odp_prefetch_store() as the header fields are being initialized. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 7fb172232 "linux-gen: dpdk: simplify mbuf to packet conversion function"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port 451455aa1 "linux-gen: dpdk: add simplified pkt to mbuf conversion ↵Matias Elo
function variant" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-08-08Port d989083e7 "linux-gen: pktio: enqueue packets to destination queues from ↵Matias Elo
pktio devices" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-04-18Port 482a09995 "linux-gen: dpdk: remove usage of odp_errno"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-04-05linux-dpdk: pktio: add configuration option for enabling multi segment txMatias Elo
Add new configuration option 'pktio_dpdk:tx_offload_multi_segs' for enabling multi segment transmit offload. This offload may not be supported by some PMDs and may lower maximum throughput, so the options is not enabled by default. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-03-02linux-dpdk: pktio: handle dpdk namespace updateMatias Elo
Add RTE_ETH prefix to all DPDK pktio macros and enums. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2023-03-02linux-dpdk: packet: add missing include for isdigit()Matias Elo
Add missing ctype.h header include for isdigit(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-12-13Port 05f20b780 "linux-gen: dpdk: implement new packet input queue size ↵Matias Elo
parameter" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-12-13Port 5569a6511 "linux-gen: pktio: use ODP_PKTIN_MAX_QUEUES and ↵Matias Elo
ODP_PKTOUT_MAX_QUEUES" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-11-17Port 32a630e38 "linux-gen: debug: prefix implementation internal debug macros"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-10-04linux-dpdk: pktio: check link status return valueMatias Elo
rte_eth_link_get() API has been updated to have a return value. Check the return value and use rte_eth_link_get_nowait() variant to avoid possible extra delays. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-09-23linux-dpdk: pktio: use only native dpdk functions for promisc modeMatias Elo
Remove old now unnecessary workarounds for enabling promisc mode on some DPDK devices. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-09-23Port ea447d6dc "linux-gen: pktio: increment in_discards when packet cannot ↵Matias Elo
be classified" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-09-23Port 8460de0f6 "linux-gen: dpdk: pack pkt_dpdk_t control path data"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-09-23Port fa265bfb5 "linux-gen: pool: use pool entry pointer as pool handle"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-09-23Port b24a8e736 "linux-gen: remove an extra level of hierarchy from ↵Matias Elo
pktio_entry_t" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-09-23Port 70ad66b41 "linux-gen: pktio: increment in_errors counter on parse errors"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-09-23Port 330ec08b2 "linux-gen: pktio: dpdk: remove pkt_dpdk_t::supported_ptypes"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-09-23Port cdfad45f2 "linux-gen: pktio: dpdk: remove packet parse functions"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-06-30linux-dpdk: pktio: optimize packet receive functionMatias Elo
Use inlined input_pkts() function. The non-inlined _odp_input_pkts() function is still used by eventdev. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-06-30Port aa5867332 “linux-gen: pktio: dpdk: move reading ↵Matias Elo
pkt_dpdk_t::supported_ptypes” Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-06-30linux-dpdk: pktio: include rx mbuf alloc failures in discards counterMatias Elo
Include packets dropped due to RX mbuf allocation failures in odp_pktio_stats_t.in_discards. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-30linux-dpdk: pktio: increase default rx and tx descriptor countsMatias Elo
Increase default number of RX and TX descriptors to 1024 for improved packet forwarding performance. Use rte_eth_dev_adjust_nb_rx_tx_desc() to adjust descriptor counts automatically to values supported by the used poll mode driver. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-30linux-dpdk: pktio: refactor statistic countersMatias Elo
Remove old unused RX counters (DPDK counters are used instead) and utilize correct atomic counter for packets discarded by ODP software. Add missing capability for outbound discarded packets. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-30linux-dpdk: pktio: refactor pkt_dpdk_t structMatias Elo
Refactor pkt_dpdk_t struct by collecting fast path data to the beginning of the struct. Unused 'ifname' member has been removed. As a result, the maximum size of pkt_dpdk_t has been reduced from 1536 bytes (with 128 byte cache lines) to 1408 bytes. With more common 64 byte cache line size only 1216 bytes are required. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-30linux-dpdk: pktio: remove unnecessary errno read/write from sendMatias Elo
DPDK API does not specify that rte_errno is set after rte_eth_tx_burst() failures, so remove the unnecessary code. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-25linux-dpdk: pktio: header include clean-upMatias Elo
Add missing, remove unnecessary, and group existing includes. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-25linux-dpdk: pktio: fix packet parse failure handlingMatias Elo
Add missing handling for packets which were dropped due to packet parsing failures. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-25Port ae347d563 "linux-gen: pktio: always call *_packet_parse_common()"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-25Port d7b705a71 "linux-gen: dpdk: add support for DPDK 21.11"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-25Port 223e2d2e8 "linux-gen: dpdk: check rte_eth_dev_info_get() return value"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-25Port 37072db5a "linux-gen: cls: move parse call out of ↵Matias Elo
_odp_cls_classify_packet()" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-05-25Port d494be4f7 "linux-gen: pktio: fix classification result handling"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-04-27linux-dpdk: remove deprecated dpdk codeMatias Elo
The supported DPDK versions are currently v19.11 and v20.11. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-04-26linux-dpdk: packet: fix potential division by zeroMatias Elo
Avoid division by zero if 'dev_info.tx_desc_lim.nb_align == 0'. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2022-04-22Port 53c71abf6 "linux-gen: dpdk: implement new packet output queue size ↵Matias Elo
parameter" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2022-04-22Port 321f334eb "linux-gen: packet: rename internal classifier metadata copy ↵Matias Elo
function" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-07-16linux-dpdk: pktio: set new unsupported statistics counter values to zeroMatias Elo
Set unsupported broadcast/multicast statistic counter values to zero. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-07-16Port 1ca4ff18e "linux-gen: dpdk: implement extra statistics counters functions"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-07-16Port ba5e8b770 "linux-gen: dpdk: add support for per queue statistics counters"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-07-16Port 4416f95d1 "linux-gen: dpdk: set per rx/tx queue statistics mappings"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-07-16Port 912c80c29 "linux-gen: pktio: implement statistics counters capabilities"Matias Elo
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-06-18linux-dpdk: pktio: use names other than index also as dpdk portsVijay Ram Inavolu
setup_pkt_dpdk() only allows netdev string to be a port number. This is to allow passing all other supported DPDK ports as well. Signed-off-by: Vijay Ram Inavolu <vinavolu@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2021-06-11linux-dpdk: pktio: don't enable input hashing automaticallyMatias Elo
Don't enable input hashing automatically. An application may reasonably expect that all packets will end up in the same input queue when input hashing is not enabled in odp_pktin_queue_param_t. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-06-11linux-dpdk: pktio: don't fail on unsupported input hash protocolMatias Elo
Since there is no capability for the supported input hash protocols it's better to just print a debug message instead of fail odp_pktin_queue_config() if an unsupported input hash protocol was selected. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
2021-05-31linux-dpdk: pktio: implement in_packets/out_packets countersMatias Elo
Implement new odp_pktio_stats_t.in_packets/out_packets packet IO statistics counters. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-31linux-dpdk: pktio: remove usage of deprecated in_unknown_protos counterMatias Elo
odp_pktio_stats_t.in_unknown_protos statistics counter has been deprecated. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-05-26Port 706e1e6b2 "linux-gen: rename remaining global symbols in the static ↵Matias Elo
library" Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
2021-03-31linux-dpdk: pktio: use generic loop interfaceMatias Elo
Remove dependency to DPDK ring pmd driver, which caused linking problems as it's not part of the top level DPDK API. Also, this simplifies the fast path pktio code. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>