Message ID | 20201030174441.1076264-1-thomas@monjalon.net |
---|---|
Headers | show |
Series |
|
Related | show |
30/10/2020 18:44, Thomas Monjalon: > The mbuf field userdata (aliased as udata64) > was announced to be removed for two reasons: > - applications, libraries and drivers used the same field > for different purposes, with a risk of usage conflict. > - this field always used 8 bytes even if unneeded > > Some dynamic fields are created when needed to replace > the big static userdata field. > As a consequence, 8 bytes can be re-allocated to dynamic fields. > > This mbuf layout change is important to allow adding more features > (consuming more dynamic fields) during the next year. Applied
On 10/31/2020 3:07 PM, Thomas Monjalon wrote: > 30/10/2020 18:44, Thomas Monjalon: >> The mbuf field userdata (aliased as udata64) >> was announced to be removed for two reasons: >> - applications, libraries and drivers used the same field >> for different purposes, with a risk of usage conflict. >> - this field always used 8 bytes even if unneeded >> >> Some dynamic fields are created when needed to replace >> the big static userdata field. >> As a consequence, 8 bytes can be re-allocated to dynamic fields. >> >> This mbuf layout change is important to allow adding more features >> (consuming more dynamic fields) during the next year. > > Applied > The new txgbe driver in the next-net is also using ‘udata64’, that also needs to be updated. cc'ed txgbe maintainer.
01/11/2020 00:36, Ferruh Yigit: > On 10/31/2020 3:07 PM, Thomas Monjalon wrote: > > 30/10/2020 18:44, Thomas Monjalon: > >> The mbuf field userdata (aliased as udata64) > >> was announced to be removed for two reasons: > >> - applications, libraries and drivers used the same field > >> for different purposes, with a risk of usage conflict. > >> - this field always used 8 bytes even if unneeded > >> > >> Some dynamic fields are created when needed to replace > >> the big static userdata field. > >> As a consequence, 8 bytes can be re-allocated to dynamic fields. > >> > >> This mbuf layout change is important to allow adding more features > >> (consuming more dynamic fields) during the next year. > > > > Applied > > The new txgbe driver in the next-net is also using ‘udata64’, that also needs to > be updated. cc'ed txgbe maintainer. That's a pity it did not take into account the deprecation notice. What kind of hack is it used for? Can it be simply removed to allow quick merging of the PMD?
On Sun, Nov 1, 2020 at 10:15 AM Thomas Monjalon <thomas@monjalon.net> wrote: > > The new txgbe driver in the next-net is also using ‘udata64’, that also needs to > > be updated. cc'ed txgbe maintainer. > > That's a pity it did not take into account the deprecation notice. > What kind of hack is it used for? > Can it be simply removed to allow quick merging of the PMD? +1 for removing. It seems to be a provision for future features, as this field is simply passed to an internal function that does not use it. $ git grep -C 2 udata drivers/net/txgbe/ drivers/net/txgbe/txgbe_rxtx.c- drivers/net/txgbe/txgbe_rxtx.c- txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, drivers/net/txgbe/txgbe_rxtx.c: tx_offload, &tx_pkt->udata64); drivers/net/txgbe/txgbe_rxtx.c- drivers/net/txgbe/txgbe_rxtx.c- txe->last_id = tx_last; $ git grep -C 2 txgbe_set_xmit_ctx drivers/net/txgbe/ drivers/net/txgbe/txgbe_rxtx.c- drivers/net/txgbe/txgbe_rxtx.c-static inline void drivers/net/txgbe/txgbe_rxtx.c:txgbe_set_xmit_ctx(struct txgbe_tx_queue *txq, drivers/net/txgbe/txgbe_rxtx.c- volatile struct txgbe_tx_ctx_desc *ctx_txd, drivers/net/txgbe/txgbe_rxtx.c- uint64_t ol_flags, union txgbe_tx_offload tx_offload, -- drivers/net/txgbe/txgbe_rxtx.c- } drivers/net/txgbe/txgbe_rxtx.c- drivers/net/txgbe/txgbe_rxtx.c: txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, drivers/net/txgbe/txgbe_rxtx.c- tx_offload, &tx_pkt->udata64); drivers/net/txgbe/txgbe_rxtx.c- $ git grep -w mdata drivers/net/txgbe/ drivers/net/txgbe/txgbe_rxtx.c: __rte_unused uint64_t *mdata)
On Sunday, November 1, 2020 6:26 PM, David Marchand wrote: > On Sun, Nov 1, 2020 at 10:15 AM Thomas Monjalon <thomas@monjalon.net> > wrote: > > > The new txgbe driver in the next-net is also using ‘udata64’, that > > > also needs to be updated. cc'ed txgbe maintainer. > > > > That's a pity it did not take into account the deprecation notice. > > What kind of hack is it used for? > > Can it be simply removed to allow quick merging of the PMD? > > +1 for removing. > > It seems to be a provision for future features, as this field is simply passed to > an internal function that does not use it. > > $ git grep -C 2 udata drivers/net/txgbe/ > drivers/net/txgbe/txgbe_rxtx.c- > drivers/net/txgbe/txgbe_rxtx.c- > txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, > drivers/net/txgbe/txgbe_rxtx.c: > tx_offload, &tx_pkt->udata64); > drivers/net/txgbe/txgbe_rxtx.c- > drivers/net/txgbe/txgbe_rxtx.c- txe->last_id = > tx_last; > > $ git grep -C 2 txgbe_set_xmit_ctx drivers/net/txgbe/ > drivers/net/txgbe/txgbe_rxtx.c- > drivers/net/txgbe/txgbe_rxtx.c-static inline void > drivers/net/txgbe/txgbe_rxtx.c:txgbe_set_xmit_ctx(struct txgbe_tx_queue > *txq, > drivers/net/txgbe/txgbe_rxtx.c- volatile struct > txgbe_tx_ctx_desc *ctx_txd, > drivers/net/txgbe/txgbe_rxtx.c- uint64_t ol_flags, union > txgbe_tx_offload tx_offload, > -- > drivers/net/txgbe/txgbe_rxtx.c- } > drivers/net/txgbe/txgbe_rxtx.c- > drivers/net/txgbe/txgbe_rxtx.c: > txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, > drivers/net/txgbe/txgbe_rxtx.c- > tx_offload, &tx_pkt->udata64); > drivers/net/txgbe/txgbe_rxtx.c- > > $ git grep -w mdata drivers/net/txgbe/ > drivers/net/txgbe/txgbe_rxtx.c: __rte_unused uint64_t *mdata) > > > -- > David Marchand Thanks for review. It can be just simply removed in txgbe driver.
On 11/2/2020 9:11 AM, Jiawen Wu wrote: > On Sunday, November 1, 2020 6:26 PM, David Marchand wrote: >> On Sun, Nov 1, 2020 at 10:15 AM Thomas Monjalon <thomas@monjalon.net> >> wrote: >>>> The new txgbe driver in the next-net is also using ‘udata64’, that >>>> also needs to be updated. cc'ed txgbe maintainer. >>> >>> That's a pity it did not take into account the deprecation notice. >>> What kind of hack is it used for? >>> Can it be simply removed to allow quick merging of the PMD? >> >> +1 for removing. >> >> It seems to be a provision for future features, as this field is simply passed to >> an internal function that does not use it. >> >> $ git grep -C 2 udata drivers/net/txgbe/ >> drivers/net/txgbe/txgbe_rxtx.c- >> drivers/net/txgbe/txgbe_rxtx.c- >> txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, >> drivers/net/txgbe/txgbe_rxtx.c: >> tx_offload, &tx_pkt->udata64); >> drivers/net/txgbe/txgbe_rxtx.c- >> drivers/net/txgbe/txgbe_rxtx.c- txe->last_id = >> tx_last; >> >> $ git grep -C 2 txgbe_set_xmit_ctx drivers/net/txgbe/ >> drivers/net/txgbe/txgbe_rxtx.c- >> drivers/net/txgbe/txgbe_rxtx.c-static inline void >> drivers/net/txgbe/txgbe_rxtx.c:txgbe_set_xmit_ctx(struct txgbe_tx_queue >> *txq, >> drivers/net/txgbe/txgbe_rxtx.c- volatile struct >> txgbe_tx_ctx_desc *ctx_txd, >> drivers/net/txgbe/txgbe_rxtx.c- uint64_t ol_flags, union >> txgbe_tx_offload tx_offload, >> -- >> drivers/net/txgbe/txgbe_rxtx.c- } >> drivers/net/txgbe/txgbe_rxtx.c- >> drivers/net/txgbe/txgbe_rxtx.c: >> txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, >> drivers/net/txgbe/txgbe_rxtx.c- >> tx_offload, &tx_pkt->udata64); >> drivers/net/txgbe/txgbe_rxtx.c- >> >> $ git grep -w mdata drivers/net/txgbe/ >> drivers/net/txgbe/txgbe_rxtx.c: __rte_unused uint64_t *mdata) >> >> >> -- >> David Marchand > > Thanks for review. > It can be just simply removed in txgbe driver. > OK, I will remove it in the next-net.
On 11/2/2020 11:08 AM, Ferruh Yigit wrote: > On 11/2/2020 9:11 AM, Jiawen Wu wrote: >> On Sunday, November 1, 2020 6:26 PM, David Marchand wrote: >>> On Sun, Nov 1, 2020 at 10:15 AM Thomas Monjalon <thomas@monjalon.net> >>> wrote: >>>>> The new txgbe driver in the next-net is also using ‘udata64’, that >>>>> also needs to be updated. cc'ed txgbe maintainer. >>>> >>>> That's a pity it did not take into account the deprecation notice. >>>> What kind of hack is it used for? >>>> Can it be simply removed to allow quick merging of the PMD? >>> >>> +1 for removing. >>> >>> It seems to be a provision for future features, as this field is simply >>> passed to >>> an internal function that does not use it. >>> >>> $ git grep -C 2 udata drivers/net/txgbe/ >>> drivers/net/txgbe/txgbe_rxtx.c- >>> drivers/net/txgbe/txgbe_rxtx.c- >>> txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, >>> drivers/net/txgbe/txgbe_rxtx.c: >>> tx_offload, &tx_pkt->udata64); >>> drivers/net/txgbe/txgbe_rxtx.c- >>> drivers/net/txgbe/txgbe_rxtx.c- txe->last_id = >>> tx_last; >>> >>> $ git grep -C 2 txgbe_set_xmit_ctx drivers/net/txgbe/ >>> drivers/net/txgbe/txgbe_rxtx.c- >>> drivers/net/txgbe/txgbe_rxtx.c-static inline void >>> drivers/net/txgbe/txgbe_rxtx.c:txgbe_set_xmit_ctx(struct txgbe_tx_queue >>> *txq, >>> drivers/net/txgbe/txgbe_rxtx.c- volatile struct >>> txgbe_tx_ctx_desc *ctx_txd, >>> drivers/net/txgbe/txgbe_rxtx.c- uint64_t ol_flags, union >>> txgbe_tx_offload tx_offload, >>> -- >>> drivers/net/txgbe/txgbe_rxtx.c- } >>> drivers/net/txgbe/txgbe_rxtx.c- >>> drivers/net/txgbe/txgbe_rxtx.c: >>> txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, >>> drivers/net/txgbe/txgbe_rxtx.c- >>> tx_offload, &tx_pkt->udata64); >>> drivers/net/txgbe/txgbe_rxtx.c- >>> >>> $ git grep -w mdata drivers/net/txgbe/ >>> drivers/net/txgbe/txgbe_rxtx.c: __rte_unused uint64_t *mdata) >>> >>> >>> -- >>> David Marchand >> >> Thanks for review. >> It can be just simply removed in txgbe driver. >> > > OK, I will remove it in the next-net. > Applied following: diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index b35b7de1cb..4d8b43423d 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -281,8 +281,7 @@ txgbe_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts, static inline void txgbe_set_xmit_ctx(struct txgbe_tx_queue *txq, volatile struct txgbe_tx_ctx_desc *ctx_txd, - uint64_t ol_flags, union txgbe_tx_offload tx_offload, - __rte_unused uint64_t *mdata) + uint64_t ol_flags, union txgbe_tx_offload tx_offload) { union txgbe_tx_offload tx_offload_mask; uint32_t type_tucmd_mlhl; @@ -861,7 +860,7 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, } txgbe_set_xmit_ctx(txq, ctx_txd, tx_ol_req, - tx_offload, &tx_pkt->udata64); + tx_offload); txe->last_id = tx_last; tx_id = txe->next_id;