aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNithin Dabilpuram <ndabilpuram@marvell.com>2020-10-06 18:50:34 +0530
committerMatias Elo <matias.elo@nokia.com>2020-11-02 13:32:03 +0200
commitd60070db11bf794c4dd13aa2f95c569653f429da (patch)
tree83c11706f39020f1ab318394e3febdf3dfd02abc /include
parent9220b824cf95583206879c8175fa929de6ea2681 (diff)
api: pktio: add pktio capability for skip offset support
Current odp_pktio_skip_set() is supposed to work on all platforms. Since this API is HW dependent as it asks ingress parser to skip X bytes before starting to parse packet for standard L2/L3 protocols, it may not be supported by every platforms. Hence adding a set_op capability in packet_io for reporting if a given platform supports it or not. Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/spec/packet_io.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index a361e8452..a1322a109 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -543,6 +543,8 @@ typedef union odp_pktio_set_op_t {
uint32_t promisc_mode : 1;
/** MAC address */
uint32_t mac_addr : 1;
+ /** Per port header offset(skip)set */
+ uint32_t skip_offset : 1;
} op;
/** All bits of the bit field structure.
* This field can be used to set/clear all flags, or bitwise
@@ -1122,6 +1124,11 @@ int odp_pktio_error_cos_set(odp_pktio_t pktio, odp_cos_t error_cos);
* @param pktio Ingress port pktio handle.
* @param offset Number of bytes the classifier must skip.
*
+ * This option is input to packet input parser/classifier indicating
+ * how many bytes of data should be skipped from start of packet,
+ * before parsing starts. So this option effects all packet input
+ * protocol identification and other offloads.
+ *
* @retval 0 on success
* @retval <0 on failure
*