DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code
@ 2023-10-04 12:59 Nithin Dabilpuram
  2023-10-04 12:59 ` [PATCH 2/2] net/cnxk: report undefined IPsec errors as PMD error Nithin Dabilpuram
  2023-10-10 13:10 ` [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Ferruh Yigit
  0 siblings, 2 replies; 6+ messages in thread
From: Nithin Dabilpuram @ 2023-10-04 12:59 UTC (permalink / raw)
  To: Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko
  Cc: jerinj, dev, Nithin Dabilpuram

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 */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] net/cnxk: report undefined IPsec errors as PMD error
  2023-10-04 12:59 [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Nithin Dabilpuram
@ 2023-10-04 12:59 ` Nithin Dabilpuram
  2023-10-10 13:10 ` [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Ferruh Yigit
  1 sibling, 0 replies; 6+ messages in thread
From: Nithin Dabilpuram @ 2023-10-04 12:59 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao; +Cc: jerinj, dev

Report IPsec event subtype as PMD error for errors that are not
defined in spec.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_ethdev_sec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c
index b98fc9378e..d1df4a01e6 100644
--- a/drivers/net/cnxk/cn10k_ethdev_sec.c
+++ b/drivers/net/cnxk/cn10k_ethdev_sec.c
@@ -522,7 +522,7 @@ cn10k_eth_sec_sso_work_cb(uint64_t *gw, void *args, uint32_t soft_exp_event)
 			plt_warn("Outbound error, bad ip pkt, mbuf %p,"
 				 " sa_index %u (total warnings %" PRIu64 ")",
 				 mbuf, sess_priv.sa_idx, warn_cnt);
-		desc.subtype = RTE_ETH_EVENT_IPSEC_UNKNOWN;
+		desc.subtype = -res->uc_compcode;
 		break;
 	default:
 		warn_cnt++;
@@ -532,7 +532,7 @@ cn10k_eth_sec_sso_work_cb(uint64_t *gw, void *args, uint32_t soft_exp_event)
 				 " (total warnings %" PRIu64 ")",
 				 mbuf, sess_priv.sa_idx, res->compcode,
 				 res->uc_compcode, warn_cnt);
-		desc.subtype = RTE_ETH_EVENT_IPSEC_UNKNOWN;
+		desc.subtype = -res->uc_compcode;
 		break;
 	}
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code
  2023-10-04 12:59 [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Nithin Dabilpuram
  2023-10-04 12:59 ` [PATCH 2/2] net/cnxk: report undefined IPsec errors as PMD error Nithin Dabilpuram
@ 2023-10-10 13:10 ` Ferruh Yigit
  2023-10-10 14:48   ` [EXT] " Akhil Goyal
  2023-10-10 14:50   ` Anoob Joseph
  1 sibling, 2 replies; 6+ messages in thread
From: Ferruh Yigit @ 2023-10-10 13:10 UTC (permalink / raw)
  To: Nithin Dabilpuram, Akhil Goyal, Anoob Joseph
  Cc: jerinj, dev, Thomas Monjalon, Andrew Rybchenko

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?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] Re: [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code
  2023-10-10 13:10 ` [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Ferruh Yigit
@ 2023-10-10 14:48   ` Akhil Goyal
  2023-10-12  9:32     ` Ferruh Yigit
  2023-10-10 14:50   ` Anoob Joseph
  1 sibling, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2023-10-10 14:48 UTC (permalink / raw)
  To: Ferruh Yigit, Nithin Kumar Dabilpuram, Anoob Joseph
  Cc: Jerin Jacob Kollanukkaran, dev, Thomas Monjalon, Andrew Rybchenko

> 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>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] Re: [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code
  2023-10-10 13:10 ` [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Ferruh Yigit
  2023-10-10 14:48   ` [EXT] " Akhil Goyal
@ 2023-10-10 14:50   ` Anoob Joseph
  1 sibling, 0 replies; 6+ messages in thread
From: Anoob Joseph @ 2023-10-10 14:50 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Jerin Jacob Kollanukkaran, dev, Thomas Monjalon,
	Nithin Kumar Dabilpuram, Andrew Rybchenko, Akhil Goyal

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [EXT] Re: [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code
  2023-10-10 14:48   ` [EXT] " Akhil Goyal
@ 2023-10-12  9:32     ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2023-10-12  9:32 UTC (permalink / raw)
  To: Akhil Goyal, Nithin Kumar Dabilpuram, Anoob Joseph
  Cc: Jerin Jacob Kollanukkaran, dev, Thomas Monjalon, Andrew Rybchenko

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-12  9:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-04 12:59 [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Nithin Dabilpuram
2023-10-04 12:59 ` [PATCH 2/2] net/cnxk: report undefined IPsec errors as PMD error Nithin Dabilpuram
2023-10-10 13:10 ` [PATCH 1/2] ethdev: add IPsec event subtype range for PMD specific code Ferruh Yigit
2023-10-10 14:48   ` [EXT] " Akhil Goyal
2023-10-12  9:32     ` Ferruh Yigit
2023-10-10 14:50   ` Anoob Joseph

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).