[1/2] ethdev: add IPsec event subtype range for PMD specific code

Message ID 20231004125909.1385272-1-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [1/2] ethdev: add IPsec event subtype range for PMD specific code |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram Oct. 4, 2023, 12:59 p.m. UTC
  Add IPsec event subtype range for PMD specific code in order
to accommodate wide range of errors that PMD supports.
These IPsec event subtypes are used when an error doesn't
match the spec defined subtypes between RTE_ETH_EVENT_IPSEC_UNKNOWN
and RTE_ETH_EVENT_IPSEC_MAX. Adding this as -ve error range
to avoid ABI breakage.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 lib/ethdev/rte_ethdev.h | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Ferruh Yigit Oct. 10, 2023, 1:10 p.m. UTC | #1
On 10/4/2023 1:59 PM, Nithin Dabilpuram wrote:
> Add IPsec event subtype range for PMD specific code in order
> to accommodate wide range of errors that PMD supports.
> These IPsec event subtypes are used when an error doesn't
> match the spec defined subtypes between RTE_ETH_EVENT_IPSEC_UNKNOWN
> and RTE_ETH_EVENT_IPSEC_MAX. Adding this as -ve error range
> to avoid ABI breakage.
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  lib/ethdev/rte_ethdev.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index 8542257721..f949dfc83d 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -3905,6 +3905,10 @@ struct rte_eth_event_macsec_desc {
>   * eth device.
>   */
>  enum rte_eth_event_ipsec_subtype {
> +	/**  PMD specific error start */
> +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_START = -256,
> +	/**  PMD specific error end */
> +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_END = -1,
>  	/** Unknown event type */
>  	RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
>  	/** Sequence number overflow */
>

I don't see any problem to extend event subtype with custom error range,
@Akhil, @Anoob what do you think?
  
Akhil Goyal Oct. 10, 2023, 2:48 p.m. UTC | #2
> On 10/4/2023 1:59 PM, Nithin Dabilpuram wrote:
> > Add IPsec event subtype range for PMD specific code in order
> > to accommodate wide range of errors that PMD supports.
> > These IPsec event subtypes are used when an error doesn't
> > match the spec defined subtypes between
> RTE_ETH_EVENT_IPSEC_UNKNOWN
> > and RTE_ETH_EVENT_IPSEC_MAX. Adding this as -ve error range
> > to avoid ABI breakage.
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> >  lib/ethdev/rte_ethdev.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> > index 8542257721..f949dfc83d 100644
> > --- a/lib/ethdev/rte_ethdev.h
> > +++ b/lib/ethdev/rte_ethdev.h
> > @@ -3905,6 +3905,10 @@ struct rte_eth_event_macsec_desc {
> >   * eth device.
> >   */
> >  enum rte_eth_event_ipsec_subtype {
> > +	/**  PMD specific error start */
> > +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_START = -256,
> > +	/**  PMD specific error end */
> > +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_END = -1,
> >  	/** Unknown event type */
> >  	RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
> >  	/** Sequence number overflow */
> >
> 
> I don't see any problem to extend event subtype with custom error range,
> @Akhil, @Anoob what do you think?

I believe it is ok to add the custom error range.
It is just that the user will need to check the negative values too, which I believe is ok.

Acked-by: Akhil Goyal <gakhil@marvell.com>
  
Anoob Joseph Oct. 10, 2023, 2:50 p.m. UTC | #3
Hi Ferruh,

> 
> ----------------------------------------------------------------------
> On 10/4/2023 1:59 PM, Nithin Dabilpuram wrote:
> > Add IPsec event subtype range for PMD specific code in order to
> > accommodate wide range of errors that PMD supports.
> > These IPsec event subtypes are used when an error doesn't match the
> > spec defined subtypes between RTE_ETH_EVENT_IPSEC_UNKNOWN and
> > RTE_ETH_EVENT_IPSEC_MAX. Adding this as -ve error range to avoid ABI
> > breakage.
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> >  lib/ethdev/rte_ethdev.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index
> > 8542257721..f949dfc83d 100644
> > --- a/lib/ethdev/rte_ethdev.h
> > +++ b/lib/ethdev/rte_ethdev.h
> > @@ -3905,6 +3905,10 @@ struct rte_eth_event_macsec_desc {
> >   * eth device.
> >   */
> >  enum rte_eth_event_ipsec_subtype {
> > +	/**  PMD specific error start */
> > +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_START = -256,
> > +	/**  PMD specific error end */
> > +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_END = -1,
> >  	/** Unknown event type */
> >  	RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
> >  	/** Sequence number overflow */
> >
> 
> I don't see any problem to extend event subtype with custom error range,
> @Akhil, @Anoob what do you think?

[Anoob] Thanks for looping in. I do not see an issue with the approach either.

Acked-by: Anoob Joseph <anoobj@marvell.com>

Thanks,
Anoob
  
Ferruh Yigit Oct. 12, 2023, 9:32 a.m. UTC | #4
On 10/10/2023 3:48 PM, Akhil Goyal wrote:
>> On 10/4/2023 1:59 PM, Nithin Dabilpuram wrote:
>>> Add IPsec event subtype range for PMD specific code in order
>>> to accommodate wide range of errors that PMD supports.
>>> These IPsec event subtypes are used when an error doesn't
>>> match the spec defined subtypes between
>> RTE_ETH_EVENT_IPSEC_UNKNOWN
>>> and RTE_ETH_EVENT_IPSEC_MAX. Adding this as -ve error range
>>> to avoid ABI breakage.
>>>
>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>> ---
>>>  lib/ethdev/rte_ethdev.h | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
>>> index 8542257721..f949dfc83d 100644
>>> --- a/lib/ethdev/rte_ethdev.h
>>> +++ b/lib/ethdev/rte_ethdev.h
>>> @@ -3905,6 +3905,10 @@ struct rte_eth_event_macsec_desc {
>>>   * eth device.
>>>   */
>>>  enum rte_eth_event_ipsec_subtype {
>>> +	/**  PMD specific error start */
>>> +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_START = -256,
>>> +	/**  PMD specific error end */
>>> +	RTE_ETH_EVENT_IPSEC_PMD_ERROR_END = -1,
>>>  	/** Unknown event type */
>>>  	RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
>>>  	/** Sequence number overflow */
>>>
>>
>> I don't see any problem to extend event subtype with custom error range,
>> @Akhil, @Anoob what do you think?
> 
> I believe it is ok to add the custom error range.
> It is just that the user will need to check the negative values too, which I believe is ok.
> 
> Acked-by: Akhil Goyal <gakhil@marvell.com>
> 
>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
>


Series applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 8542257721..f949dfc83d 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -3905,6 +3905,10 @@  struct rte_eth_event_macsec_desc {
  * eth device.
  */
 enum rte_eth_event_ipsec_subtype {
+	/**  PMD specific error start */
+	RTE_ETH_EVENT_IPSEC_PMD_ERROR_START = -256,
+	/**  PMD specific error end */
+	RTE_ETH_EVENT_IPSEC_PMD_ERROR_END = -1,
 	/** Unknown event type */
 	RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
 	/** Sequence number overflow */