aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNithin Dabilpuram <ndabilpuram@marvell.com>2020-10-06 22:18:58 +0530
committerMatias Elo <matias.elo@nokia.com>2020-11-02 13:58:47 +0200
commitd2e08fbd389adbae9f7d1f5117696524cd520918 (patch)
treecdd2ffc076d1a9582c44bb29d05051920233fd3a /include
parente4b71c5618b8121bffda43d03fd5944c6b1bf103 (diff)
api: pktio: add pktout no packet refs offload
Currently ODP spec provides support for holding references to packets and thereby those packets are not freed by platform after transmission if they have more than one reference. This support is useful when using stack that needs retransmissions like TCP or some fragmentation implementations. Most of the other forwarding/pipeline applications will not be using this support as they don't hold any references and forward traffic after packet manipulations. Since there is a performance hit in some platforms for supporting ref count update and validation in odp_pktout_send(), this patch adds support to indicate via pktio config if PKTIO can optimize the fastpath for case where packets sent for transmission will not have multiple references and platform/HW can always free them post transmission. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/spec/packet_io.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index a1322a109..ef6a18522 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -414,6 +414,20 @@ typedef union odp_pktout_config_opt_t {
/** Insert SCTP checksum on packet by default */
uint64_t sctp_chksum : 1;
+ /** Packet references not used on packet output
+ *
+ * When set, application indicates that it will not transmit
+ * packet references on this packet IO interface.
+ * Since every ODP implementation supports it, it is always
+ * ok to set this flag.
+ *
+ * 0: Packet references may be transmitted on the
+ * interface (the default value).
+ * 1: Packet references will not be transmitted on the
+ * interface.
+ */
+ uint64_t no_packet_refs : 1;
+
} bit;
/** All bits of the bit field structure