summaryrefslogtreecommitdiff
path: root/lib/librte_mbuf
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2019-11-05 14:19:31 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-08 23:15:05 +0100
commit9bf26e1318e3cd7a04115c8201255505e90cab83 (patch)
treecd43722e78ad3fd19cb326be88f40984dfa84404 /lib/librte_mbuf
parente02ecc132450aeb3d9705a78df6fa3bc10c3b301 (diff)
downloaddpdk-9bf26e1318e3cd7a04115c8201255505e90cab83.zip
dpdk-9bf26e1318e3cd7a04115c8201255505e90cab83.tar.gz
dpdk-9bf26e1318e3cd7a04115c8201255505e90cab83.tar.xz
ethdev: move egress metadata to dynamic field
The dynamic mbuf fields were introduced by [1]. The egress metadata is good candidate to be moved from statically allocated field tx_metadata to dynamic one. Because mbufs are used in half-duplex fashion only, it is safe to share this dynamic field with ingress metadata. The shared dynamic field contains either egress (if application going to transmit mbuf with tx_burst) or ingress (if mbuf is received with rx_burst) metadata and can be accessed by RTE_FLOW_DYNF_METADATA() macro or with rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper routines. PKT_TX_DYNF_METADATA/PKT_RX_DYNF_METADATA flag will be set along with the data. The mbuf dynamic field must be registered by calling rte_flow_dynf_metadata_register() prior accessing the data. The availability of dynamic mbuf metadata field can be checked with rte_flow_dynf_metadata_avail() routine. DEV_TX_OFFLOAD_MATCH_METADATA offload and configuration flag is removed. The metadata support in PMDs is engaged on dynamic field registration. Metadata feature is getting complex. We might have some set of actions and items that might be supported by PMDs in multiple combinations, the supported values and masks are the subjects to query by perfroming trials (with rte_flow_validate). [1] http://patches.dpdk.org/patch/62040/ Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Ori Kam <orika@mellanox.com>
Diffstat (limited to 'lib/librte_mbuf')
-rw-r--r--lib/librte_mbuf/rte_mbuf.c2
-rw-r--r--lib/librte_mbuf/rte_mbuf_core.h21
2 files changed, 2 insertions, 21 deletions
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 8c51dc1..35df1c4 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -670,7 +670,6 @@ const char *rte_get_tx_ol_flag_name(uint64_t mask)
case PKT_TX_SEC_OFFLOAD: return "PKT_TX_SEC_OFFLOAD";
case PKT_TX_UDP_SEG: return "PKT_TX_UDP_SEG";
case PKT_TX_OUTER_UDP_CKSUM: return "PKT_TX_OUTER_UDP_CKSUM";
- case PKT_TX_METADATA: return "PKT_TX_METADATA";
default: return NULL;
}
}
@@ -707,7 +706,6 @@ rte_get_tx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)
{ PKT_TX_SEC_OFFLOAD, PKT_TX_SEC_OFFLOAD, NULL },
{ PKT_TX_UDP_SEG, PKT_TX_UDP_SEG, NULL },
{ PKT_TX_OUTER_UDP_CKSUM, PKT_TX_OUTER_UDP_CKSUM, NULL },
- { PKT_TX_METADATA, PKT_TX_METADATA, NULL },
};
const char *name;
unsigned int i;
diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 3022701..9a8557d 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -187,16 +187,11 @@ extern "C" {
/* add new RX flags here, don't forget to update PKT_FIRST_FREE */
#define PKT_FIRST_FREE (1ULL << 23)
-#define PKT_LAST_FREE (1ULL << 39)
+#define PKT_LAST_FREE (1ULL << 40)
/* add new TX flags here, don't forget to update PKT_LAST_FREE */
/**
- * Indicate that the metadata field in the mbuf is in use.
- */
-#define PKT_TX_METADATA (1ULL << 40)
-
-/**
* Outer UDP checksum offload flag. This flag is used for enabling
* outer UDP checksum in PMD. To use outer UDP checksum, the user needs to
* 1) Enable the following in mbuf,
@@ -389,8 +384,7 @@ extern "C" {
PKT_TX_MACSEC | \
PKT_TX_SEC_OFFLOAD | \
PKT_TX_UDP_SEG | \
- PKT_TX_OUTER_UDP_CKSUM | \
- PKT_TX_METADATA)
+ PKT_TX_OUTER_UDP_CKSUM)
/**
* Mbuf having an external buffer attached. shinfo in mbuf must be filled.
@@ -601,17 +595,6 @@ struct rte_mbuf {
/**< User defined tags. See rte_distributor_process() */
uint32_t usr;
} hash; /**< hash information */
- struct {
- /**
- * Application specific metadata value
- * for egress flow rule match.
- * Valid if PKT_TX_METADATA is set.
- * Located here to allow conjunct use
- * with hash.sched.hi.
- */
- uint32_t tx_metadata;
- uint32_t reserved;
- };
};
/** Outer VLAN TCI (CPU order), valid if PKT_RX_QINQ is set. */