[1/2] ethdev: add IPsec event subtype range for PMD specific code
Checks
Commit Message
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
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?
> 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>
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
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.
@@ -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 */