#include <errno.h>
#include <stdint.h>
#include <rte_log.h>
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
#include <rte_flow_driver.h>
#include <rte_ether.h>
#include <rte_ip.h>
return ENOTSUP;
}
- /* check that the suppied mask exactly matches capabilty */
+ /* check that the supplied mask exactly matches capability */
if (!mask_exact_match((const uint8_t *)&supported_mask,
(const uint8_t *)item->mask, sizeof(*mask))) {
ENICPMD_LOG(ERR, "IPv4 exact match mask");
return ENOTSUP;
}
- /* check that the suppied mask exactly matches capabilty */
+ /* check that the supplied mask exactly matches capability */
if (!mask_exact_match((const uint8_t *)&supported_mask,
(const uint8_t *)item->mask, sizeof(*mask))) {
ENICPMD_LOG(ERR, "UDP exact match mask");
return ENOTSUP;
}
- /* check that the suppied mask exactly matches capabilty */
+ /* check that the supplied mask exactly matches capability */
if (!mask_exact_match((const uint8_t *)&supported_mask,
(const uint8_t *)item->mask, sizeof(*mask))) {
ENICPMD_LOG(ERR, "TCP exact match mask");
if (!mask)
mask = &rte_flow_item_eth_mask;
- memcpy(enic_spec.d_addr.addr_bytes, spec->dst.addr_bytes,
+ memcpy(enic_spec.dst_addr.addr_bytes, spec->dst.addr_bytes,
RTE_ETHER_ADDR_LEN);
- memcpy(enic_spec.s_addr.addr_bytes, spec->src.addr_bytes,
+ memcpy(enic_spec.src_addr.addr_bytes, spec->src.addr_bytes,
RTE_ETHER_ADDR_LEN);
- memcpy(enic_mask.d_addr.addr_bytes, mask->dst.addr_bytes,
+ memcpy(enic_mask.dst_addr.addr_bytes, mask->dst.addr_bytes,
RTE_ETHER_ADDR_LEN);
- memcpy(enic_mask.s_addr.addr_bytes, mask->src.addr_bytes,
+ memcpy(enic_mask.src_addr.addr_bytes, mask->src.addr_bytes,
RTE_ETHER_ADDR_LEN);
enic_spec.ether_type = spec->type;
enic_mask.ether_type = mask->type;
}
/**
- * Build the intenal enic filter structure from the provided pattern. The
+ * Build the internal enic filter structure from the provided pattern. The
* pattern is validated as the items are copied.
*
* @param pattern[in]
* @param items_info[in]
* Info about this NICs item support, like valid previous items.
* @param enic_filter[out]
- * NIC specfilc filters derived from the pattern.
+ * NIC specific filters derived from the pattern.
* @param error[out]
*/
static int
}
/**
- * Build the intenal version 1 NIC action structure from the provided pattern.
+ * Build the internal version 1 NIC action structure from the provided pattern.
* The pattern is validated as the items are copied.
*
* @param actions[in]
* @param enic_action[out]
- * NIC specfilc actions derived from the actions.
+ * NIC specific actions derived from the actions.
* @param error[out]
*/
static int
}
/**
- * Build the intenal version 2 NIC action structure from the provided pattern.
+ * Build the internal version 2 NIC action structure from the provided pattern.
* The pattern is validated as the items are copied.
*
* @param actions[in]
* @param enic_action[out]
- * NIC specfilc actions derived from the actions.
+ * NIC specific actions derived from the actions.
* @param error[out]
*/
static int
if (gp->mask_flags & FILTER_GENERIC_1_IPV6)
sprintf(ip6, "%s ",
- (gp->val_flags & FILTER_GENERIC_1_IPV4)
+ (gp->val_flags & FILTER_GENERIC_1_IPV6)
? "ip6(y)" : "ip6(n)");
else
sprintf(ip6, "%s ", "ip6(x)");
return -rte_errno;
}
enic_filter->type = enic->flow_filter_mode;
+ if (enic->adv_filters)
+ enic_filter->type = FILTER_DPDK_1;
ret = enic_copy_filter(pattern, enic_filter_cap, enic,
enic_filter, error);
return ret;