[v2,07/15] net/ark: ignore user data
diff mbox series

Message ID 20201026222013.2147904-8-thomas@monjalon.net
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • remove mbuf userdata
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Oct. 26, 2020, 10:20 p.m. UTC
The second field of metadata is reserved for user data
which is a deprecated mbuf field.
The usage of mbuf udata64 is removed
and the corresponding ark metadata field is annotated as ignored.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/ark/ark_ddm.h       | 2 +-
 drivers/net/ark/ark_ethdev_rx.c | 1 -
 drivers/net/ark/ark_ethdev_tx.c | 1 -
 drivers/net/ark/ark_udm.h       | 2 +-
 4 files changed, 2 insertions(+), 4 deletions(-)

Comments

Ed Czeck Oct. 27, 2020, 3:32 p.m. UTC | #1
HI Thomas,
Atomic Rules will be submitting a patch to connect user_data into the
mbuf stuct using
the dynfield interface restoring lost functionality from this patch.

You can expect a patch in the next few days.  Are you targeting this
patch series for the 20.11 release?
Thanks
Ed.


On Mon, Oct 26, 2020 at 6:20 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> The second field of metadata is reserved for user data
> which is a deprecated mbuf field.
> The usage of mbuf udata64 is removed
> and the corresponding ark metadata field is annotated as ignored.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  drivers/net/ark/ark_ddm.h       | 2 +-
>  drivers/net/ark/ark_ethdev_rx.c | 1 -
>  drivers/net/ark/ark_ethdev_tx.c | 1 -
>  drivers/net/ark/ark_udm.h       | 2 +-
>  4 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ark/ark_ddm.h b/drivers/net/ark/ark_ddm.h
> index 5456b4b5cc..99eded8524 100644
> --- a/drivers/net/ark/ark_ddm.h
> +++ b/drivers/net/ark/ark_ddm.h
> @@ -19,7 +19,7 @@
>  /* struct defining Tx meta data --  fixed in FPGA -- 16 bytes */
>  struct ark_tx_meta {
>         uint64_t physaddr;
> -       uint32_t user1;
> +       uint32_t user1;         /* ignored */
>         uint16_t data_len;              /* of this MBUF */
>  #define   ARK_DDM_EOP   0x01
>  #define   ARK_DDM_SOP   0x02
> diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
> index 2f8d05099c..5ead67e6b8 100644
> --- a/drivers/net/ark/ark_ethdev_rx.c
> +++ b/drivers/net/ark/ark_ethdev_rx.c
> @@ -272,7 +272,6 @@ eth_ark_recv_pkts(void *rx_queue,
>                 mbuf->pkt_len = meta->pkt_len;
>                 mbuf->data_len = meta->pkt_len;
>                 mbuf->timestamp = meta->timestamp;
> -               mbuf->udata64 = meta->user_data;
>
>                 if (ARK_DEBUG_CORE) {   /* debug sanity checks */
>                         if ((meta->pkt_len > (1024 * 16)) ||
> diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
> index a0e35af880..8a0a9381f7 100644
> --- a/drivers/net/ark/ark_ethdev_tx.c
> +++ b/drivers/net/ark/ark_ethdev_tx.c
> @@ -70,7 +70,6 @@ eth_ark_tx_meta_from_mbuf(struct ark_tx_meta *meta,
>                           uint8_t flags)
>  {
>         meta->physaddr = rte_mbuf_data_iova(mbuf);
> -       meta->user1 = (uint32_t)mbuf->udata64;
>         meta->data_len = rte_pktmbuf_data_len(mbuf);
>         meta->flags = flags;
>  }
> diff --git a/drivers/net/ark/ark_udm.h b/drivers/net/ark/ark_udm.h
> index 5846c825b8..ba436ee25b 100644
> --- a/drivers/net/ark/ark_udm.h
> +++ b/drivers/net/ark/ark_udm.h
> @@ -18,7 +18,7 @@
>  /* Meta data structure apssed from FPGA, must match layout in FPGA */
>  struct ark_rx_meta {
>         uint64_t timestamp;
> -       uint64_t user_data;
> +       uint64_t user_data; /* ignored */
>         uint8_t port;
>         uint8_t dst_queue;
>         uint16_t pkt_len;
> --
> 2.28.0
>
Thomas Monjalon Oct. 27, 2020, 3:55 p.m. UTC | #2
27/10/2020 16:32, Ed Czeck:
> HI Thomas,
> Atomic Rules will be submitting a patch to connect user_data into the
> mbuf stuct using
> the dynfield interface restoring lost functionality from this patch.

I don't understand what you are looking for.
The user data has no meaning, and is removed.
Please explain your use case and what you need.

Does it mean you ack this patch?

> You can expect a patch in the next few days.  Are you targeting this
> patch series for the 20.11 release?

Yes 20.11-rc2 (this week) is the target.


> On Mon, Oct 26, 2020 at 6:20 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > The second field of metadata is reserved for user data
> > which is a deprecated mbuf field.
> > The usage of mbuf udata64 is removed
> > and the corresponding ark metadata field is annotated as ignored.
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> >  drivers/net/ark/ark_ddm.h       | 2 +-
> >  drivers/net/ark/ark_ethdev_rx.c | 1 -
> >  drivers/net/ark/ark_ethdev_tx.c | 1 -
> >  drivers/net/ark/ark_udm.h       | 2 +-
> >  4 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/ark/ark_ddm.h b/drivers/net/ark/ark_ddm.h
> > index 5456b4b5cc..99eded8524 100644
> > --- a/drivers/net/ark/ark_ddm.h
> > +++ b/drivers/net/ark/ark_ddm.h
> > @@ -19,7 +19,7 @@
> >  /* struct defining Tx meta data --  fixed in FPGA -- 16 bytes */
> >  struct ark_tx_meta {
> >         uint64_t physaddr;
> > -       uint32_t user1;
> > +       uint32_t user1;         /* ignored */
> >         uint16_t data_len;              /* of this MBUF */
> >  #define   ARK_DDM_EOP   0x01
> >  #define   ARK_DDM_SOP   0x02
> > diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
> > index 2f8d05099c..5ead67e6b8 100644
> > --- a/drivers/net/ark/ark_ethdev_rx.c
> > +++ b/drivers/net/ark/ark_ethdev_rx.c
> > @@ -272,7 +272,6 @@ eth_ark_recv_pkts(void *rx_queue,
> >                 mbuf->pkt_len = meta->pkt_len;
> >                 mbuf->data_len = meta->pkt_len;
> >                 mbuf->timestamp = meta->timestamp;
> > -               mbuf->udata64 = meta->user_data;
> >
> >                 if (ARK_DEBUG_CORE) {   /* debug sanity checks */
> >                         if ((meta->pkt_len > (1024 * 16)) ||
> > diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
> > index a0e35af880..8a0a9381f7 100644
> > --- a/drivers/net/ark/ark_ethdev_tx.c
> > +++ b/drivers/net/ark/ark_ethdev_tx.c
> > @@ -70,7 +70,6 @@ eth_ark_tx_meta_from_mbuf(struct ark_tx_meta *meta,
> >                           uint8_t flags)
> >  {
> >         meta->physaddr = rte_mbuf_data_iova(mbuf);
> > -       meta->user1 = (uint32_t)mbuf->udata64;
> >         meta->data_len = rte_pktmbuf_data_len(mbuf);
> >         meta->flags = flags;
> >  }
> > diff --git a/drivers/net/ark/ark_udm.h b/drivers/net/ark/ark_udm.h
> > index 5846c825b8..ba436ee25b 100644
> > --- a/drivers/net/ark/ark_udm.h
> > +++ b/drivers/net/ark/ark_udm.h
> > @@ -18,7 +18,7 @@
> >  /* Meta data structure apssed from FPGA, must match layout in FPGA */
> >  struct ark_rx_meta {
> >         uint64_t timestamp;
> > -       uint64_t user_data;
> > +       uint64_t user_data; /* ignored */
> >         uint8_t port;
> >         uint8_t dst_queue;
> >         uint16_t pkt_len;
> > --
> > 2.28.0
Thomas Monjalon Oct. 27, 2020, 4:05 p.m. UTC | #3
27/10/2020 16:55, Thomas Monjalon:
> 27/10/2020 16:32, Ed Czeck:
> > HI Thomas,
> > Atomic Rules will be submitting a patch to connect user_data into the
> > mbuf stuct using
> > the dynfield interface restoring lost functionality from this patch.
> 
> I don't understand what you are looking for.
> The user data has no meaning, and is removed.
> Please explain your use case and what you need.
> 
> Does it mean you ack this patch?
> 
> > You can expect a patch in the next few days.  Are you targeting this
> > patch series for the 20.11 release?
> 
> Yes 20.11-rc2 (this week) is the target.

Please be aware that seqn field could be removed as well.

Patch
diff mbox series

diff --git a/drivers/net/ark/ark_ddm.h b/drivers/net/ark/ark_ddm.h
index 5456b4b5cc..99eded8524 100644
--- a/drivers/net/ark/ark_ddm.h
+++ b/drivers/net/ark/ark_ddm.h
@@ -19,7 +19,7 @@ 
 /* struct defining Tx meta data --  fixed in FPGA -- 16 bytes */
 struct ark_tx_meta {
 	uint64_t physaddr;
-	uint32_t user1;
+	uint32_t user1;		/* ignored */
 	uint16_t data_len;		/* of this MBUF */
 #define   ARK_DDM_EOP   0x01
 #define   ARK_DDM_SOP   0x02
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 2f8d05099c..5ead67e6b8 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -272,7 +272,6 @@  eth_ark_recv_pkts(void *rx_queue,
 		mbuf->pkt_len = meta->pkt_len;
 		mbuf->data_len = meta->pkt_len;
 		mbuf->timestamp = meta->timestamp;
-		mbuf->udata64 = meta->user_data;
 
 		if (ARK_DEBUG_CORE) {	/* debug sanity checks */
 			if ((meta->pkt_len > (1024 * 16)) ||
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index a0e35af880..8a0a9381f7 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -70,7 +70,6 @@  eth_ark_tx_meta_from_mbuf(struct ark_tx_meta *meta,
 			  uint8_t flags)
 {
 	meta->physaddr = rte_mbuf_data_iova(mbuf);
-	meta->user1 = (uint32_t)mbuf->udata64;
 	meta->data_len = rte_pktmbuf_data_len(mbuf);
 	meta->flags = flags;
 }
diff --git a/drivers/net/ark/ark_udm.h b/drivers/net/ark/ark_udm.h
index 5846c825b8..ba436ee25b 100644
--- a/drivers/net/ark/ark_udm.h
+++ b/drivers/net/ark/ark_udm.h
@@ -18,7 +18,7 @@ 
 /* Meta data structure apssed from FPGA, must match layout in FPGA */
 struct ark_rx_meta {
 	uint64_t timestamp;
-	uint64_t user_data;
+	uint64_t user_data; /* ignored */
 	uint8_t port;
 	uint8_t dst_queue;
 	uint16_t pkt_len;