From 46375cfa2cadb88f625feeb02bd6ec2eb43d9501 Mon Sep 17 00:00:00 2001 From: Intel Date: Thu, 20 Dec 2012 00:00:00 +0100 Subject: [PATCH] ethdev: add ipv6 support to fdir Signed-off-by: Intel --- lib/librte_ether/rte_ethdev.c | 4 ---- lib/librte_ether/rte_ethdev.h | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 6dec9876ae..7aadbd3159 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1361,10 +1361,6 @@ rte_eth_dev_fdir_set_masks(uint8_t port_id, struct rte_fdir_masks *fdir_mask) return (-ENOSYS); } - /* IPv6 mask are not supported */ - if (fdir_mask->src_ipv6_mask) - return (-ENOTSUP); - FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_set_masks, -ENOTSUP); return (*dev->dev_ops->fdir_set_masks)(dev, fdir_mask); } diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 55a4e42f4e..1cfb76a61a 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -537,6 +537,11 @@ struct rte_fdir_masks { uint8_t vlan_prio; /** If set to 1, flexbytes is relevant in filters. */ uint8_t flexbytes; + /** If set to 1, set the IPv6 masks. Otherwise set the IPv4 masks. */ + uint8_t set_ipv6_mask; + /** When set to 1, comparison of destination IPv6 address with IP6AT + registers is meaningful. */ + uint8_t comp_ipv6_dst; /** Mask of Destination IPv4 Address. All bits set to 1 define the relevant bits to use in the destination address of an IPv4 packet when matching it against FDIR filters. */ @@ -548,6 +553,10 @@ struct rte_fdir_masks { /** Mask of Source IPv6 Address. All bits set to 1 define the relevant BYTES to use in the source address of an IPv6 packet when matching it against FDIR filters. */ + uint16_t dst_ipv6_mask; + /** Mask of Destination IPv6 Address. All bits set to 1 define the + relevant BYTES to use in the destination address of an IPv6 packet + when matching it against FDIR filters. */ uint16_t src_ipv6_mask; /** Mask of Source Port. All bits set to 1 define the relevant bits to use in the source port of an IP packets when matching it -- 2.20.1