From: Somnath Kotur <somnath.kotur@broadcom.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>
Cc: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Subject: Re: [PATCH] net/bnxt: remove dead code under DPDK version check
Date: Tue, 26 Aug 2025 07:28:36 +0530 [thread overview]
Message-ID: <CAOBf=mvx-bsM49iBUZdA9vPAtTEmH1y9qLc6pXTVdGOQGHYsYA@mail.gmail.com> (raw)
In-Reply-To: <CACZ4nhv6VvXfbuR-fKJgVXwkYoxi5j_R5hY3A-ujJn3CUTqu0g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 7818 bytes --]
On Mon, Aug 25, 2025 at 8:58 PM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> On Mon, Aug 25, 2025 at 2:28 AM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > There is no good reason to keep code for older versions of DPDK in the
> > main branch.
> ACK.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
> > ---
> > drivers/net/bnxt/bnxt_cpr.h | 2 --
> > drivers/net/bnxt/bnxt_ethdev.c | 5 ----
> > drivers/net/bnxt/bnxt_reps.c | 7 +-----
> > drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 2 --
> > drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 2 --
> > drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 2 --
> > drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h | 31 ------------------------
> > 7 files changed, 1 insertion(+), 50 deletions(-)
> >
> > diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
> > index 489dab6b15..94f449e8b5 100644
> > --- a/drivers/net/bnxt/bnxt_cpr.h
> > +++ b/drivers/net/bnxt/bnxt_cpr.h
> > @@ -119,9 +119,7 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp);
> > bool bnxt_is_primary_func(struct bnxt *bp);
> >
> > void bnxt_stop_rxtx(struct rte_eth_dev *eth_dev);
> > -#if (RTE_VERSION_NUM(21, 8, 0, 0) < RTE_VERSION)
> > void bnxt_start_rxtx(struct rte_eth_dev *eth_dev);
> > -#endif
> >
> > /**
> > * Check validity of a completion ring entry. If the entry is valid, include a
> > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> > index 8213ff9e4b..cace6e8e17 100644
> > --- a/drivers/net/bnxt/bnxt_ethdev.c
> > +++ b/drivers/net/bnxt/bnxt_ethdev.c
> > @@ -4309,7 +4309,6 @@ static int bnxt_get_module_eeprom(struct rte_eth_dev *dev,
> > return length ? -EINVAL : 0;
> > }
> >
> > -#if (RTE_VERSION_NUM(22, 11, 0, 0) <= RTE_VERSION)
> > static int bnxt_speed_lanes_set(struct rte_eth_dev *dev, uint32_t speed_lanes)
> > {
> > struct bnxt *bp = dev->data->dev_private;
> > @@ -4406,8 +4405,6 @@ static int bnxt_speed_lanes_get(struct rte_eth_dev *dev, uint32_t *lanes)
> > return 0;
> > }
> >
> > -#endif
> > -
> > /*
> > * Initialization
> > */
> > @@ -4479,11 +4476,9 @@ static const struct eth_dev_ops bnxt_dev_ops = {
> > .timesync_read_rx_timestamp = bnxt_timesync_read_rx_timestamp,
> > .timesync_read_tx_timestamp = bnxt_timesync_read_tx_timestamp,
> > .mtr_ops_get = bnxt_flow_meter_ops_get,
> > -#if (RTE_VERSION_NUM(22, 11, 0, 0) <= RTE_VERSION)
> > .speed_lanes_get = bnxt_speed_lanes_get,
> > .speed_lanes_set = bnxt_speed_lanes_set,
> > .speed_lanes_get_capa = bnxt_speed_lanes_get_capa,
> > -#endif
> > };
> >
> > static uint32_t bnxt_map_reset_regs(struct bnxt *bp, uint32_t reg)
> > diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
> > index 6f5c3f80eb..43e4085434 100644
> > --- a/drivers/net/bnxt/bnxt_reps.c
> > +++ b/drivers/net/bnxt/bnxt_reps.c
> > @@ -766,13 +766,8 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
> > return 0;
> >
> > out:
> > - if (rxq) {
> > - #if (RTE_VERSION_NUM(21, 8, 0, 0) < RTE_VERSION)
> > + if (rxq)
> > bnxt_rep_rx_queue_release_op(eth_dev, queue_idx);
> > - #else
> > - bnxt_rx_queue_release_op(rxq);
> > - #endif
> > - }
> >
> > return rc;
> > }
> > diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
> > index 2c22582e1c..ab02b01b46 100644
> > --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
> > +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
> > @@ -75,10 +75,8 @@ bnxt_ulp_set_dir_attributes(struct ulp_rte_parser_params *params,
> > params->dir_attr |= BNXT_ULP_FLOW_ATTR_EGRESS;
> > if (attr->ingress)
> > params->dir_attr |= BNXT_ULP_FLOW_ATTR_INGRESS;
> > -#if RTE_VERSION_NUM(17, 11, 10, 16) < RTE_VERSION
> > if (attr->transfer)
> > params->dir_attr |= BNXT_ULP_FLOW_ATTR_TRANSFER;
> > -#endif
> > if (attr->group) {
> > ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_GROUP_ID,
> > rte_cpu_to_le_32(attr->group));
> > diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
> > index 4a1ccfa2a3..e3eb9107ab 100644
> > --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
> > +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
> > @@ -1613,9 +1613,7 @@ ulp_tf_mtr_cap_get(struct bnxt *bp,
> > return -EINVAL;
> > }
> >
> > -#if (RTE_VERSION_NUM(21, 05, 0, 0) <= RTE_VERSION)
> > cap->srtcm_rfc2697_byte_mode_supported = 1;
> > -#endif
> > cap->n_shared_max = cap->n_max;
> > /* No meter is identical */
> > cap->identical = 1;
> > diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
> > index 508c194d04..c20aea1966 100644
> > --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
> > +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
> > @@ -1087,9 +1087,7 @@ static int
> > ulp_tfc_mtr_cap_get(struct bnxt *bp __rte_unused,
> > struct rte_mtr_capabilities *cap)
> > {
> > -#if (RTE_VERSION_NUM(21, 05, 0, 0) <= RTE_VERSION)
> > cap->srtcm_rfc2697_byte_mode_supported = 1;
> > -#endif
> > cap->n_max = MAX_NUM_METER;
> > cap->n_shared_max = cap->n_max;
> > /* No meter is identical */
> > diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
> > index e6f316539c..daa3be64a7 100644
> > --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
> > +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
> > @@ -814,35 +814,6 @@ bnxt_ulp_cntxt_release_fdb_lock(struct bnxt_ulp_context *ulp_ctx)
> > pthread_mutex_unlock(&ulp_ctx->cfg_data->flow_db_lock);
> > }
> >
> > -#if (RTE_VERSION_NUM(21, 05, 0, 0) > RTE_VERSION)
> > -
> > -/* Function to extract the action type from the shared action handle. */
> > -static inline uint32_t
> > -bnxt_get_shared_action_type(const struct rte_flow_shared_action *handle)
> > -{
> > - return (uint32_t)(((uint64_t)handle >> 32) & 0xffffffff);
> > -}
> > -
> > -/* Function to extract the direction from the shared action handle. */
> > -static inline uint32_t
> > -bnxt_get_shared_action_direction(const struct rte_flow_shared_action *handle)
> > -{
> > - uint32_t shared_type;
> > -
> > - shared_type = bnxt_get_shared_action_type(handle);
> > - return shared_type & 0x1 ? BNXT_ULP_FLOW_ATTR_EGRESS :
> > - BNXT_ULP_FLOW_ATTR_INGRESS;
> > -}
> > -
> > -/* Function to extract the action index from the shared action handle. */
> > -static inline uint32_t
> > -bnxt_get_shared_action_index(const struct rte_flow_shared_action *handle)
> > -{
> > - return (uint32_t)((uint64_t)handle & 0xffffffff);
> > -}
> > -
> > -#else /* (RTE_VERSION >= RTE_VERSION_NUM(21,05,0,0)) */
> > -
> > /* Function to extract the action type from the shared action handle. */
> > static inline int32_t
> > bnxt_get_action_handle_type(const struct rte_flow_action_handle *handle,
> > @@ -882,8 +853,6 @@ bnxt_get_action_handle_index(const struct rte_flow_action_handle *handle)
> > return (uint32_t)((uint64_t)handle & 0xffffffff);
> > }
> >
> > -#endif /* RTE_VERSION < RTE_VERSION_NUM(21,05,0,0) */
> > -
> > /* Function to set the ha info into the context */
> > static inline int32_t
> > bnxt_ulp_cntxt_ptr2_ha_info_set(struct bnxt_ulp_context *ulp_ctx,
> > --
> > 2.51.0
> >
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4199 bytes --]
next prev parent reply other threads:[~2025-08-26 1:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-25 9:27 David Marchand
2025-08-25 15:28 ` Ajit Khaparde
2025-08-26 1:58 ` Somnath Kotur [this message]
2025-09-22 7:56 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOBf=mvx-bsM49iBUZdA9vPAtTEmH1y9qLc6pXTVdGOQGHYsYA@mail.gmail.com' \
--to=somnath.kotur@broadcom.com \
--cc=ajit.khaparde@broadcom.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).