aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/classification.h
diff options
context:
space:
mode:
authorNicolas Morey-Chaisemartin <nmorey@kalray.eu>2015-10-09 09:34:07 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-10-22 15:46:22 +0300
commit9e6d99621dc532190d318a6786364d057e688478 (patch)
tree496c710d95e517875fec9cffd1be359ee95f6856 /include/odp/api/classification.h
parentc20acf806263c5e4d64728768535aae097e10610 (diff)
api: classification: add ODP_PMR_CUSTOM_FRAME
The application can now specify a packet offset in PMR rules. This offset is absolute from the frame start. It is used to extract the PMR value. This is useful to support arbitrary backplane protocols and extensions. Signed-off-by: BenoƮt Ganne <bganne@kalray.eu> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include/odp/api/classification.h')
-rw-r--r--include/odp/api/classification.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
index a62528c2b..380d91b15 100644
--- a/include/odp/api/classification.h
+++ b/include/odp/api/classification.h
@@ -237,6 +237,11 @@ typedef enum odp_pmr_term {
ODP_PMR_IPSEC_SPI, /**< IPsec session identifier(*val=uint32_t)*/
ODP_PMR_LD_VNI, /**< NVGRE/VXLAN network identifier
(*val=uint32_t)*/
+ ODP_PMR_CUSTOM_FRAME, /**< Custom match rule, offset from start of
+ frame. The match is defined by the offset, the
+ expected value, and its size. They must be
+ applied before any other PMR.
+ (*val=uint8_t[val_sz])*/
/** Inner header may repeat above values with this offset */
ODP_PMR_INNER_HDR_OFF = 32
@@ -250,6 +255,9 @@ typedef struct odp_pmr_match_t {
const void *val; /**< Value to be matched */
const void *mask; /**< Masked set of bits to be matched */
uint32_t val_sz; /**< Size of the term value */
+ uint32_t offset; /**< User-defined offset in packet
+ Used if term == ODP_PMR_CUSTOM_FRAME only,
+ ignored otherwise */
} odp_pmr_match_t;
/**