vpp icon indicating copy to clipboard operation
vpp copied to clipboard

Add value to classify entry

Open hesingh opened this issue 4 years ago • 0 comments

The VPP bihash supports a key-value pair to provision an entry for a table. For example, see

https://github.com/FDio/vpp/blob/master/src/vppinfra/bihash_48_8.h#L39

However, the VPP classifier entry does not support a value. This PR adds a u64 value to the classifier entry.

The use case is the following value for my 5G UPF on matching a classifier entry. Current classifier code with its opaque_index node and metadata cannot support my value.

struct pkt_filter4_0_value {
    enum pkt_filter4_0_actions action;
    union {
        struct {
        } drop4;
        struct {
            uint8_t abits;
            uint16_t ig_strip;
            uint16_t outer_desc;
            uint32_t teid;
            uint32_t ip;
            uint32_t src_ip;
            uint16_t dstPort;
            uint8_t filt_dir;
            uint8_t reflec_qos;
        } permit4;
        struct {
            uint8_t abits;
            uint16_t ig_strip;
            uint64_t srcAddr;
            uint64_t dstAddr;
            uint16_t etherType;
        } add_eth4;
    } u;
};

hesingh avatar Jan 19 '21 01:01 hesingh