DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/octeontx2: add build check on fast path fields
@ 2019-07-18 13:09 Nithin Dabilpuram
  2019-07-18 13:31 ` Jerin Jacob Kollanukkaran
  2019-07-18 13:46 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
  0 siblings, 2 replies; 4+ messages in thread
From: Nithin Dabilpuram @ 2019-07-18 13:09 UTC (permalink / raw)
  To: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K; +Cc: dev

Add build bug on on fast path used fields that are
dependent on their positions and values.

Fixes: 920717e4d8ba ("net/octeontx2: add device start operation")
Cc: ndabilpuram@marvell.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index fcb1869..77bf9aa 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -586,6 +586,24 @@ nix_tx_offload_flags(struct rte_eth_dev *eth_dev)
 	RTE_BUILD_BUG_ON(PKT_TX_TCP_CKSUM != (1ULL << 52));
 	RTE_BUILD_BUG_ON(PKT_TX_SCTP_CKSUM != (2ULL << 52));
 	RTE_BUILD_BUG_ON(PKT_TX_UDP_CKSUM != (3ULL << 52));
+	RTE_BUILD_BUG_ON(PKT_TX_IP_CKSUM != (1ULL << 54));
+	RTE_BUILD_BUG_ON(PKT_TX_IPV4 != (1ULL << 55));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IP_CKSUM != (1ULL << 58));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IPV4 != (1ULL << 59));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IPV6 != (1ULL << 60));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_UDP_CKSUM != (1ULL << 41));
+	RTE_BUILD_BUG_ON(RTE_MBUF_L2_LEN_BITS != 7);
+	RTE_BUILD_BUG_ON(RTE_MBUF_L3_LEN_BITS != 9);
+	RTE_BUILD_BUG_ON(RTE_MBUF_OUTL2_LEN_BITS != 7);
+	RTE_BUILD_BUG_ON(RTE_MBUF_OUTL3_LEN_BITS != 9);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) !=
+			 offsetof(struct rte_mbuf, buf_iova) + 8);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=
+			 offsetof(struct rte_mbuf, buf_iova) + 16);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=
+			 offsetof(struct rte_mbuf, ol_flags) + 12);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, tx_offload) !=
+			 offsetof(struct rte_mbuf, pool) + 2 * sizeof(void *));
 
 	if (conf & DEV_TX_OFFLOAD_VLAN_INSERT ||
 	    conf & DEV_TX_OFFLOAD_QINQ_INSERT)
-- 
2.8.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/octeontx2: add build check on fast path fields
  2019-07-18 13:09 [dpdk-dev] [PATCH] net/octeontx2: add build check on fast path fields Nithin Dabilpuram
@ 2019-07-18 13:31 ` Jerin Jacob Kollanukkaran
  2019-07-18 13:46 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
  1 sibling, 0 replies; 4+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-07-18 13:31 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Nithin Kumar Dabilpuram,
	Kiran Kumar Kokkilagadda
  Cc: dev

> -----Original Message-----
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Sent: Thursday, July 18, 2019 6:40 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark@marvell.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] net/octeontx2: add build check on fast path fields
> 
> Add build bug on on fast path used fields that are dependent on their
> positions and values.
> 
> Fixes: 920717e4d8ba ("net/octeontx2: add device start operation")

Please point Fixes changes where we can add the fast path code.

> Cc: ndabilpuram@marvell.com

This Cc can be removed as you are the author.

> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  drivers/net/octeontx2/otx2_ethdev.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/net/octeontx2/otx2_ethdev.c
> b/drivers/net/octeontx2/otx2_ethdev.c
> index fcb1869..77bf9aa 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.c
> +++ b/drivers/net/octeontx2/otx2_ethdev.c
> @@ -586,6 +586,24 @@ nix_tx_offload_flags(struct rte_eth_dev *eth_dev)
>  	RTE_BUILD_BUG_ON(PKT_TX_TCP_CKSUM != (1ULL << 52));
>  	RTE_BUILD_BUG_ON(PKT_TX_SCTP_CKSUM != (2ULL << 52));
>  	RTE_BUILD_BUG_ON(PKT_TX_UDP_CKSUM != (3ULL << 52));
> +	RTE_BUILD_BUG_ON(PKT_TX_IP_CKSUM != (1ULL << 54));
> +	RTE_BUILD_BUG_ON(PKT_TX_IPV4 != (1ULL << 55));
> +	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IP_CKSUM != (1ULL << 58));
> +	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IPV4 != (1ULL << 59));
> +	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IPV6 != (1ULL << 60));
> +	RTE_BUILD_BUG_ON(PKT_TX_OUTER_UDP_CKSUM != (1ULL <<
> 41));
> +	RTE_BUILD_BUG_ON(RTE_MBUF_L2_LEN_BITS != 7);
> +	RTE_BUILD_BUG_ON(RTE_MBUF_L3_LEN_BITS != 9);
> +	RTE_BUILD_BUG_ON(RTE_MBUF_OUTL2_LEN_BITS != 7);
> +	RTE_BUILD_BUG_ON(RTE_MBUF_OUTL3_LEN_BITS != 9);
> +	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) !=
> +			 offsetof(struct rte_mbuf, buf_iova) + 8);
> +	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=
> +			 offsetof(struct rte_mbuf, buf_iova) + 16);
> +	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=
> +			 offsetof(struct rte_mbuf, ol_flags) + 12);
> +	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, tx_offload) !=
> +			 offsetof(struct rte_mbuf, pool) + 2 * sizeof(void *));
> 
>  	if (conf & DEV_TX_OFFLOAD_VLAN_INSERT ||
>  	    conf & DEV_TX_OFFLOAD_QINQ_INSERT)
> --
> 2.8.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] net/octeontx2: add build check on fast path fields
  2019-07-18 13:09 [dpdk-dev] [PATCH] net/octeontx2: add build check on fast path fields Nithin Dabilpuram
  2019-07-18 13:31 ` Jerin Jacob Kollanukkaran
@ 2019-07-18 13:46 ` Nithin Dabilpuram
  2019-07-22  8:09   ` Jerin Jacob Kollanukkaran
  1 sibling, 1 reply; 4+ messages in thread
From: Nithin Dabilpuram @ 2019-07-18 13:46 UTC (permalink / raw)
  To: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K; +Cc: dev

Add build bug on on fast path used fields that are
dependent on their positions and values.

Fixes: f1eff76ab63e ("net/octeontx2: add Rx vector version")
Fixes: ddc1bc26e9ed ("net/octeontx2: add Tx vector version")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index fcb1869..77bf9aa 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -586,6 +586,24 @@ nix_tx_offload_flags(struct rte_eth_dev *eth_dev)
 	RTE_BUILD_BUG_ON(PKT_TX_TCP_CKSUM != (1ULL << 52));
 	RTE_BUILD_BUG_ON(PKT_TX_SCTP_CKSUM != (2ULL << 52));
 	RTE_BUILD_BUG_ON(PKT_TX_UDP_CKSUM != (3ULL << 52));
+	RTE_BUILD_BUG_ON(PKT_TX_IP_CKSUM != (1ULL << 54));
+	RTE_BUILD_BUG_ON(PKT_TX_IPV4 != (1ULL << 55));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IP_CKSUM != (1ULL << 58));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IPV4 != (1ULL << 59));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_IPV6 != (1ULL << 60));
+	RTE_BUILD_BUG_ON(PKT_TX_OUTER_UDP_CKSUM != (1ULL << 41));
+	RTE_BUILD_BUG_ON(RTE_MBUF_L2_LEN_BITS != 7);
+	RTE_BUILD_BUG_ON(RTE_MBUF_L3_LEN_BITS != 9);
+	RTE_BUILD_BUG_ON(RTE_MBUF_OUTL2_LEN_BITS != 7);
+	RTE_BUILD_BUG_ON(RTE_MBUF_OUTL3_LEN_BITS != 9);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_off) !=
+			 offsetof(struct rte_mbuf, buf_iova) + 8);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, ol_flags) !=
+			 offsetof(struct rte_mbuf, buf_iova) + 16);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=
+			 offsetof(struct rte_mbuf, ol_flags) + 12);
+	RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, tx_offload) !=
+			 offsetof(struct rte_mbuf, pool) + 2 * sizeof(void *));
 
 	if (conf & DEV_TX_OFFLOAD_VLAN_INSERT ||
 	    conf & DEV_TX_OFFLOAD_QINQ_INSERT)
-- 
2.8.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/octeontx2: add build check on fast path fields
  2019-07-18 13:46 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
@ 2019-07-22  8:09   ` Jerin Jacob Kollanukkaran
  0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-07-22  8:09 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Nithin Kumar Dabilpuram,
	Kiran Kumar Kokkilagadda
  Cc: dev

> -----Original Message-----
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Sent: Thursday, July 18, 2019 7:16 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark@marvell.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v2] net/octeontx2: add build check on fast path fields
> 
> Add build bug on on fast path used fields that are dependent on their
> positions and values.
> 
> Fixes: f1eff76ab63e ("net/octeontx2: add Rx vector version")
> Fixes: ddc1bc26e9ed ("net/octeontx2: add Tx vector version")
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/master. Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-22  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 13:09 [dpdk-dev] [PATCH] net/octeontx2: add build check on fast path fields Nithin Dabilpuram
2019-07-18 13:31 ` Jerin Jacob Kollanukkaran
2019-07-18 13:46 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
2019-07-22  8:09   ` Jerin Jacob Kollanukkaran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).