summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
diff options
context:
space:
mode:
authorIoana Radulescu <ruxandra.radulescu@nxp.com>2019-03-01 17:47:23 +0000
committerDavid S. Miller <davem@davemloft.net>2019-03-03 20:41:18 -0800
commite3fdf6ba09a082175d3b0f85a4253702918e7582 (patch)
tree52c17b186a6ecaa6683f247a3021ae5f54fd5ce4 /drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
parent3cec12ce5ad67ed6f59ed86ef51b393c35cd376b (diff)
dpaa2-eth: Add software annotation types
We write different metadata information in the software annotation area of Tx frames, depending on frame type. Make this more explicit by introducing a type field and separate structures for single buffer and scatter-gather frames. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
index 9510928b7cca..423976d97fa6 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
@@ -89,12 +89,28 @@
*/
#define DPAA2_ETH_SWA_SIZE 64
+/* We store different information in the software annotation area of a Tx frame
+ * based on what type of frame it is
+ */
+enum dpaa2_eth_swa_type {
+ DPAA2_ETH_SWA_SINGLE,
+ DPAA2_ETH_SWA_SG,
+};
+
/* Must keep this struct smaller than DPAA2_ETH_SWA_SIZE */
struct dpaa2_eth_swa {
- struct sk_buff *skb;
- struct scatterlist *scl;
- int num_sg;
- int sgt_size;
+ enum dpaa2_eth_swa_type type;
+ union {
+ struct {
+ struct sk_buff *skb;
+ } single;
+ struct {
+ struct sk_buff *skb;
+ struct scatterlist *scl;
+ int num_sg;
+ int sgt_size;
+ } sg;
+ };
};
/* Annotation valid bits in FD FRC */