[dpdk-dev] [RFC] ethdev: add sanity packet checks
Thomas Monjalon
thomas at monjalon.net
Sun Feb 28 21:14:16 CET 2021
28/02/2021 20:48, Ori Kam:
> Currently, DPDK application can offload the checksum check,
> and report it in the mbuf.
>
> However, this approach doesn't work if the traffic
> is offloaded and should not arrive to the application.
>
> This commit introduces rte flow item that enables
s/rte flow/rte_flow/
> matching on the checksum of the L3 and L4 layers,
> in addition to other checks that can determine if
> the packet is valid.
> some of those tests can be packet len, data len,
> unsupported flags, and so on.
>
> The full check is HW dependent.
What is the "full check"?
How much it is HW dependent?
> + * RTE_FLOW_ITEM_TYPE_SANITY_CHECKS
> + *
> + * Enable matching on packet validity based on HW checks for the L3 and L4
> + * layers.
> + */
> +struct rte_flow_item_sanity_checks {
> + uint32_t level;
> + /**< Packet encapsulation level the item should apply to.
> + * @see rte_flow_action_rss
> + */
> +RTE_STD_C11
> + union {
> + struct {
Why there is no L2 check?
> + uint32_t l3_ok:1;
> + /**< L3 layer is valid after passing all HW checking. */
> + uint32_t l4_ok:1;
> + /**< L4 layer is valid after passing all HW checking. */
l3_ok and l4_ok looks vague.
What does it cover exactly?
> + uint32_t l3_ok_csum:1;
> + /**< L3 layer checksum is valid. */
> + uint32_t l4_ok_csum:1;
> + /**< L4 layer checksum is valid. */
> + uint32_t reserved:28;
> + };
> + uint32_t value;
> + };
> +};
More information about the dev
mailing list