summaryrefslogtreecommitdiffstats
path: root/src/dpdk/drivers/net/i40e
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-07-31 11:16:27 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-07-31 11:21:40 +0300
commitdceb010b01e9f8a0e9c905370d39f149f01cab7e (patch)
tree562201fb20db07440462f27e4d8b95ad3ce84611 /src/dpdk/drivers/net/i40e
parent81c896604a50486d8b658dc559f7b98492d778e5 (diff)
dpdk 16.07 - merges of final version changes
Diffstat (limited to 'src/dpdk/drivers/net/i40e')
-rw-r--r--src/dpdk/drivers/net/i40e/i40e_ethdev.c14
-rw-r--r--src/dpdk/drivers/net/i40e/i40e_fdir.c3
-rw-r--r--src/dpdk/drivers/net/i40e/i40e_rxtx.c4
-rw-r--r--src/dpdk/drivers/net/i40e/i40e_rxtx_vec.c2
4 files changed, 12 insertions, 11 deletions
diff --git a/src/dpdk/drivers/net/i40e/i40e_ethdev.c b/src/dpdk/drivers/net/i40e/i40e_ethdev.c
index 94b8cb7d..2ee9326e 100644
--- a/src/dpdk/drivers/net/i40e/i40e_ethdev.c
+++ b/src/dpdk/drivers/net/i40e/i40e_ethdev.c
@@ -31,7 +31,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/queue.h>
#include <stdio.h>
#include <errno.h>
#include <stdint.h>
@@ -51,6 +50,7 @@
#include <rte_alarm.h>
#include <rte_dev.h>
#include <rte_eth_ctrl.h>
+#include <rte_tailq.h>
#include "i40e_logs.h"
#include "base/i40e_prototype.h"
@@ -4206,6 +4206,7 @@ i40e_vsi_release(struct i40e_vsi *vsi)
struct i40e_pf *pf;
struct i40e_hw *hw;
struct i40e_vsi_list *vsi_list;
+ void *temp;
int ret;
struct i40e_mac_filter *f;
uint16_t user_param = vsi->user_param;
@@ -4218,25 +4219,23 @@ i40e_vsi_release(struct i40e_vsi *vsi)
/* VSI has child to attach, release child first */
if (vsi->veb) {
- TAILQ_FOREACH(vsi_list, &vsi->veb->head, list) {
+ TAILQ_FOREACH_SAFE(vsi_list, &vsi->veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
- TAILQ_REMOVE(&vsi->veb->head, vsi_list, list);
}
i40e_veb_release(vsi->veb);
}
if (vsi->floating_veb) {
- TAILQ_FOREACH(vsi_list, &vsi->floating_veb->head, list) {
+ TAILQ_FOREACH_SAFE(vsi_list, &vsi->floating_veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
- TAILQ_REMOVE(&vsi->floating_veb->head, vsi_list, list);
}
}
/* Remove all macvlan filters of the VSI */
i40e_vsi_remove_all_macvlan_filter(vsi);
- TAILQ_FOREACH(f, &vsi->mac_list, next)
+ TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp)
rte_free(f);
if (vsi->type != I40E_VSI_MAIN &&
@@ -4818,6 +4817,7 @@ i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on)
{
int i, num;
struct i40e_mac_filter *f;
+ void *temp;
struct i40e_mac_filter_info *mac_filter;
enum rte_mac_filter_type desired_filter;
int ret = I40E_SUCCESS;
@@ -4842,7 +4842,7 @@ i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on)
i = 0;
/* Remove all existing mac */
- TAILQ_FOREACH(f, &vsi->mac_list, next) {
+ TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) {
mac_filter[i] = f->mac_info;
ret = i40e_vsi_delete_mac(vsi, &f->mac_info.mac_addr);
if (ret) {
diff --git a/src/dpdk/drivers/net/i40e/i40e_fdir.c b/src/dpdk/drivers/net/i40e/i40e_fdir.c
index 4f9a6b48..990937ec 100644
--- a/src/dpdk/drivers/net/i40e/i40e_fdir.c
+++ b/src/dpdk/drivers/net/i40e/i40e_fdir.c
@@ -1152,7 +1152,8 @@ i40e_fdir_filter_programming(struct i40e_pf *pf,
#ifdef TREX_PATCH
rte_cpu_to_le_32((fdir_action->stat_count_index <<
#else
- rte_cpu_to_le_32((pf->fdir.match_counter_index <<
+ rte_cpu_to_le_32(
+ ((uint32_t)pf->fdir.match_counter_index <<
#endif
I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) &
I40E_TXD_FLTR_QW1_CNTINDEX_MASK);
diff --git a/src/dpdk/drivers/net/i40e/i40e_rxtx.c b/src/dpdk/drivers/net/i40e/i40e_rxtx.c
index a6488898..444e8c0b 100644
--- a/src/dpdk/drivers/net/i40e/i40e_rxtx.c
+++ b/src/dpdk/drivers/net/i40e/i40e_rxtx.c
@@ -1436,10 +1436,10 @@ i40e_recv_scattered_pkts(void *rx_queue,
i40e_rxd_pkt_type_mapping((uint8_t)((qword1 &
I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT));
if (pkt_flags & PKT_RX_RSS_HASH)
- rxm->hash.rss =
+ first_seg->hash.rss =
rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss);
if (pkt_flags & PKT_RX_FDIR)
- pkt_flags |= i40e_rxd_build_fdir(&rxd, rxm);
+ pkt_flags |= i40e_rxd_build_fdir(&rxd, first_seg);
#ifdef RTE_LIBRTE_IEEE1588
pkt_flags |= i40e_get_iee15888_flags(first_seg, qword1);
diff --git a/src/dpdk/drivers/net/i40e/i40e_rxtx_vec.c b/src/dpdk/drivers/net/i40e/i40e_rxtx_vec.c
index 05cb415e..51fb282a 100644
--- a/src/dpdk/drivers/net/i40e/i40e_rxtx_vec.c
+++ b/src/dpdk/drivers/net/i40e/i40e_rxtx_vec.c
@@ -269,7 +269,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
* D. fill info. from desc to mbuf
*/
- for (pos = 0, nb_pkts_recd = 0; pos < RTE_I40E_VPMD_RX_BURST;
+ for (pos = 0, nb_pkts_recd = 0; pos < nb_pkts;
pos += RTE_I40E_DESCS_PER_LOOP,
rxdp += RTE_I40E_DESCS_PER_LOOP) {
__m128i descs[RTE_I40E_DESCS_PER_LOOP];