Skip to contentSkip to conversation

enic: migrating to new fdir api

PATCH Applied Sujith Sankar 2 participants 3 messages Apr 9, 2015 – Apr 20, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 enic: migrating to new fdir api

This patch helps enic migrate to the new flow-director API.

It takes care of the following.

1.  The change in fdir_filter structure and stats structure
2.  DPDK interface functions in enic_ethdev.c
3.  ENIC driver functions that deal with the VIC adapter
---
 lib/librte_pmd_enic/enic.h        | 12 +++---
 lib/librte_pmd_enic/enic_clsf.c   | 43 ++++++++++++++++------
 lib/librte_pmd_enic/enic_ethdev.c | 77 ++++++++++++++++++++++++++-------------
 3 files changed, 89 insertions(+), 43 deletions(-)
lib/librte_pmd_enic/enic.h +7 -5
index a50bff1..acdd0f6 100644
@@ -80,13 +80,13 @@
 #define ENICPMD_FDIR_MAX           64
 
 struct enic_fdir_node {
-	struct rte_fdir_filter filter;
+	struct rte_eth_fdir_filter filter;
 	u16 fltr_id;
 	u16 rq_index;
 };
 
 struct enic_fdir {
-	struct rte_eth_fdir stats;
+	struct rte_eth_fdir_stats stats;
 	struct rte_hash *hash;
 	struct enic_fdir_node *nodes[ENICPMD_FDIR_MAX];
 };
@@ -110,7 +110,7 @@ struct enic {
 	pthread_t err_intr_thread;
 	int promisc;
 	int allmulti;
-	uint8_t ig_vlan_strip_en;
+	u8 ig_vlan_strip_en;
 	int link_status;
 	u8 hw_ip_checksum;
 
@@ -154,10 +154,12 @@ static inline struct enic *pmd_priv(struct rte_eth_dev *eth_dev)
 	return (struct enic *)eth_dev->data->dev_private;
 }
 
+extern void enic_fdir_stats_get(struct enic *enic,
+	struct rte_eth_fdir_stats *stats);
 extern int enic_fdir_add_fltr(struct enic *enic,
-	struct rte_fdir_filter *params, u16 queue, u8 drop);
+	struct rte_eth_fdir_filter *params);
 extern int enic_fdir_del_fltr(struct enic *enic,
-	struct rte_fdir_filter *params);
+	struct rte_eth_fdir_filter *params);
 extern void enic_free_wq(void *txq);
 extern int enic_alloc_intr_resources(struct enic *enic);
 extern int enic_setup_finish(struct enic *enic);
lib/librte_pmd_enic/enic_clsf.c +31 -12

73 lines not on this page · raw message

lib/librte_pmd_enic/enic_ethdev.c +51 -26

98 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw
In reply to a message not in the archive

2015-04-09 14:59, Sujith Sankar:

Quoted 9 lines

This patch helps enic migrate to the new flow-director API.

It takes care of the following.

1.  The change in fdir_filter structure and stats structure
2.  DPDK interface functions in enic_ethdev.c
3.  ENIC driver functions that deal with the VIC adapter

Applied, thanks

Now the old flow director API may be totally removed.

#3 lore raw

2015-04-20 15:37, Thomas Monjalon:

Quoted 9 lines

2015-04-09 14:59, Sujith Sankar:

Quoted 8 lines

This patch helps enic migrate to the new flow-director API.

It takes care of the following.

1.  The change in fdir_filter structure and stats structure
2.  DPDK interface functions in enic_ethdev.c
3.  ENIC driver functions that deal with the VIC adapter
Quoted 5 lines
Quoted 1 line

Applied, thanks

Now the old flow director API may be totally removed.

Please remove use of rte_fdir_filter for key_len.
Thanks