summaryrefslogtreecommitdiffstats
path: root/src/dpdk/lib
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-07-19 10:12:20 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-07-24 14:01:11 +0300
commit8b0119ed99f893106a560ccb9db31c99e1d293eb (patch)
tree7e3eb6ef214af20fa975f28779a28479bfd73d5a /src/dpdk/lib
parent3c106ce73a4a54863ed1c3df47c09eb1e63fadaf (diff)
dpdk0716 move:DPDK file patches
Diffstat (limited to 'src/dpdk/lib')
-rw-r--r--src/dpdk/lib/librte_ether/rte_eth_ctrl.h5
-rw-r--r--src/dpdk/lib/librte_ether/rte_ethdev.c34
-rw-r--r--src/dpdk/lib/librte_ether/rte_ethdev.h2
-rw-r--r--src/dpdk/lib/librte_mbuf/rte_mbuf.h5
4 files changed, 45 insertions, 1 deletions
diff --git a/src/dpdk/lib/librte_ether/rte_eth_ctrl.h b/src/dpdk/lib/librte_ether/rte_eth_ctrl.h
index c3a2c9e4..96145e86 100644
--- a/src/dpdk/lib/librte_ether/rte_eth_ctrl.h
+++ b/src/dpdk/lib/librte_ether/rte_eth_ctrl.h
@@ -420,6 +420,8 @@ struct rte_eth_l2_flow {
struct rte_eth_ipv4_flow {
uint32_t src_ip; /**< IPv4 source address in big endian. */
uint32_t dst_ip; /**< IPv4 destination address in big endian. */
+ // TREX_PATCH (ip_id)
+ uint16_t ip_id; /**< IPv4 IP ID to match */
uint8_t tos; /**< Type of service to match. */
uint8_t ttl; /**< Time to live to match. */
uint8_t proto; /**< Protocol, next header in big endian. */
@@ -590,6 +592,9 @@ struct rte_eth_fdir_action {
/**< If report_status is RTE_ETH_FDIR_REPORT_ID_FLEX_4 or
RTE_ETH_FDIR_REPORT_FLEX_8, flex_off specifies where the reported
flex bytes start from in flexible payload. */
+ // TREX_PATCH
+ // Index for statistics counter that will count FDIR matches.
+ uint16_t stat_count_index;
};
/**
diff --git a/src/dpdk/lib/librte_ether/rte_ethdev.c b/src/dpdk/lib/librte_ether/rte_ethdev.c
index 0a6e3f18..47ea4696 100644
--- a/src/dpdk/lib/librte_ether/rte_ethdev.c
+++ b/src/dpdk/lib/librte_ether/rte_ethdev.c
@@ -1479,6 +1479,40 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
}
}
+// TREX_PATCH
+// return in stats, statistics starting from start, for len counters.
+int
+rte_eth_fdir_stats_get(uint8_t port_id, uint32_t *stats, uint32_t start, uint32_t len)
+{
+ struct rte_eth_dev *dev;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
+
+ dev = &rte_eth_devices[port_id];
+
+ // Only xl710 support this
+ i40e_trex_fdir_stats_get(dev, stats, start, len);
+
+ return 0;
+}
+
+// TREX_PATCH
+// zero statistics counters, starting from start, for len counters.
+int
+rte_eth_fdir_stats_reset(uint8_t port_id, uint32_t *stats, uint32_t start, uint32_t len)
+{
+ struct rte_eth_dev *dev;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
+
+ dev = &rte_eth_devices[port_id];
+
+ // Only xl710 support this
+ i40e_trex_fdir_stats_reset(dev, stats, start, len);
+
+ return 0;
+}
+
int
rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
{
diff --git a/src/dpdk/lib/librte_ether/rte_ethdev.h b/src/dpdk/lib/librte_ether/rte_ethdev.h
index 4dac364a..6c99c88b 100644
--- a/src/dpdk/lib/librte_ether/rte_ethdev.h
+++ b/src/dpdk/lib/librte_ether/rte_ethdev.h
@@ -767,6 +767,8 @@ struct rte_fdir_conf {
struct rte_eth_fdir_masks mask;
struct rte_eth_fdir_flex_conf flex_conf;
/**< Flex payload configuration. */
+ // TREX_PATCH
+ uint8_t flexbytes_offset;
};
/**
diff --git a/src/dpdk/lib/librte_mbuf/rte_mbuf.h b/src/dpdk/lib/librte_mbuf/rte_mbuf.h
index 101485fb..9e607992 100644
--- a/src/dpdk/lib/librte_mbuf/rte_mbuf.h
+++ b/src/dpdk/lib/librte_mbuf/rte_mbuf.h
@@ -1059,6 +1059,9 @@ rte_mbuf_refcnt_set(struct rte_mbuf *m, uint16_t new_value)
static inline uint16_t
rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
{
+ // TREX_PATCH - The code in #if 0 caused tx queue to hang when running:
+ // sudo ./t-rex-64-o -f avl/sfr_delay_10_1g_no_bundeling.yaml -m 35 -p -d 100
+#if 0
/*
* The atomic_add is an expensive operation, so we don't want to
* call it in the case where we know we are the uniq holder of
@@ -1070,7 +1073,7 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
rte_mbuf_refcnt_set(m, 1 + value);
return 1 + value;
}
-
+#endif
return (uint16_t)(rte_atomic16_add_return(&m->refcnt_atomic, value));
}