* [dpdk-dev] [PATCH] net/i40e: add check for ethertype filter
@ 2017-04-27 11:02 Beilei Xing
2017-04-28 8:05 ` Wu, Jingjing
0 siblings, 1 reply; 3+ messages in thread
From: Beilei Xing @ 2017-04-27 11:02 UTC (permalink / raw)
To: jingjing.wu; +Cc: dev
LLDP rule is not supported in ethertype filter.
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_flow.c | 1 +
lib/librte_net/rte_ether.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 0a0181f..24e1c65 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -608,6 +608,7 @@ i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
if (filter->ether_type == ETHER_TYPE_IPv4 ||
filter->ether_type == ETHER_TYPE_IPv6 ||
+ filter->ether_type == ETHER_TYPE_LLDP ||
filter->ether_type == outer_tpid) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
index ff3d065..c448bf3 100644
--- a/lib/librte_net/rte_ether.h
+++ b/lib/librte_net/rte_ether.h
@@ -333,6 +333,7 @@ struct vxlan_hdr {
#define ETHER_TYPE_1588 0x88F7 /**< IEEE 802.1AS 1588 Precise Time Protocol. */
#define ETHER_TYPE_SLOW 0x8809 /**< Slow protocols (LACP and Marker). */
#define ETHER_TYPE_TEB 0x6558 /**< Transparent Ethernet Bridging. */
+#define ETHER_TYPE_LLDP 0x88CC /**< LLDP Protocol. */
#define ETHER_VXLAN_HLEN (sizeof(struct udp_hdr) + sizeof(struct vxlan_hdr))
/**< VXLAN tunnel header length. */
--
2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: add check for ethertype filter
2017-04-27 11:02 [dpdk-dev] [PATCH] net/i40e: add check for ethertype filter Beilei Xing
@ 2017-04-28 8:05 ` Wu, Jingjing
2017-05-05 15:20 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Wu, Jingjing @ 2017-04-28 8:05 UTC (permalink / raw)
To: Xing, Beilei; +Cc: dev
> -----Original Message-----
> From: Xing, Beilei
> Sent: Thursday, April 27, 2017 7:02 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] net/i40e: add check for ethertype filter
>
> LLDP rule is not supported in ethertype filter.
>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> ---
> drivers/net/i40e/i40e_flow.c | 1 +
> lib/librte_net/rte_ether.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index
> 0a0181f..24e1c65 100644
> --- a/drivers/net/i40e/i40e_flow.c
> +++ b/drivers/net/i40e/i40e_flow.c
> @@ -608,6 +608,7 @@ i40e_flow_parse_ethertype_pattern(struct rte_eth_dev
> *dev,
>
> if (filter->ether_type == ETHER_TYPE_IPv4 ||
> filter->ether_type == ETHER_TYPE_IPv6 ||
> + filter->ether_type == ETHER_TYPE_LLDP ||
> filter->ether_type == outer_tpid) {
> rte_flow_error_set(error, EINVAL,
>
> RTE_FLOW_ERROR_TYPE_ITEM,
> diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h index
> ff3d065..c448bf3 100644
> --- a/lib/librte_net/rte_ether.h
> +++ b/lib/librte_net/rte_ether.h
> @@ -333,6 +333,7 @@ struct vxlan_hdr {
> #define ETHER_TYPE_1588 0x88F7 /**< IEEE 802.1AS 1588 Precise Time
> Protocol. */ #define ETHER_TYPE_SLOW 0x8809 /**< Slow protocols (LACP
> and Marker). */ #define ETHER_TYPE_TEB 0x6558 /**< Transparent Ethernet
> Bridging. */
> +#define ETHER_TYPE_LLDP 0x88CC /**< LLDP Protocol. */
>
> #define ETHER_VXLAN_HLEN (sizeof(struct udp_hdr) + sizeof(struct vxlan_hdr))
> /**< VXLAN tunnel header length. */
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
> --
> 2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: add check for ethertype filter
2017-04-28 8:05 ` Wu, Jingjing
@ 2017-05-05 15:20 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-05-05 15:20 UTC (permalink / raw)
To: Xing, Beilei; +Cc: dev, Wu, Jingjing
> > LLDP rule is not supported in ethertype filter.
> >
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
>
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-05 15:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 11:02 [dpdk-dev] [PATCH] net/i40e: add check for ethertype filter Beilei Xing
2017-04-28 8:05 ` Wu, Jingjing
2017-05-05 15:20 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).