* [dpdk-dev] [PATCH 0/1] net/ixgbe: Add API to update SBP bit @ 2018-02-23 11:59 Shweta Choudaha 2018-02-23 11:59 ` [dpdk-dev] [PATCH 1/1] " Shweta Choudaha 0 siblings, 1 reply; 12+ messages in thread From: Shweta Choudaha @ 2018-02-23 11:59 UTC (permalink / raw) To: dev; +Cc: shweta.choudaha From: Shweta Choudaha <shweta.choudaha@att.com> -- 2.11.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-02-23 11:59 [dpdk-dev] [PATCH 0/1] net/ixgbe: Add API to update SBP bit Shweta Choudaha @ 2018-02-23 11:59 ` Shweta Choudaha 2018-04-04 2:25 ` Lu, Wenzhuo 2018-04-10 15:42 ` [dpdk-dev] [PATCH v2] " Shweta Choudaha 0 siblings, 2 replies; 12+ messages in thread From: Shweta Choudaha @ 2018-02-23 11:59 UTC (permalink / raw) To: dev; +Cc: shweta.choudaha From: Shweta Choudaha <shweta.choudaha@att.com> Add ixgbe API to enable SBP bit in FCTRL register to allow receiving packets that may otherwise be considered length errors by ixgbe and dropped Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> Reviewed-by: Chas Williams <chas3@att.com> Reviewed-by: Luca Boccassi <bluca@debian.org> --- drivers/net/ixgbe/rte_pmd_ixgbe.c | 28 ++++++++++++++++++++++++++++ drivers/net/ixgbe/rte_pmd_ixgbe.h | 13 +++++++++++++ drivers/net/ixgbe/rte_pmd_ixgbe_version.map | 6 ++++++ 3 files changed, 47 insertions(+) diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c index d8ca8ca31..3b6f68f9e 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -880,6 +880,34 @@ rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port, return 0; } +int __rte_experimental +rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable) +{ + struct ixgbe_hw *hw; + struct rte_eth_dev *dev; + uint32_t fctrl; + + RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); + dev = &rte_eth_devices[port]; + if (!is_ixgbe_supported(dev)) + return -ENOTSUP; + + hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + if (!hw) + return -ENOTSUP; + + fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); + + /* If 'enable' set the SBP bit else clear it */ + if (enable) + fctrl |= IXGBE_FCTRL_SBP; + else + fctrl &= ~(IXGBE_FCTRL_SBP); + + IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); + return 0; +} + #ifdef RTE_LIBRTE_IXGBE_BYPASS int rte_pmd_ixgbe_bypass_init(uint16_t port_id) diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h index 11a9f334b..a3026bd98 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h @@ -637,4 +637,17 @@ enum { ((x) > RTE_PMD_IXGBE_BYPASS_TMT_OFF && \ (x) < RTE_PMD_IXGBE_BYPASS_TMT_NUM)) +/** + * @param port + * The port identifier of the Ethernet device. + * @param enable + * 0 to disable and nonzero to enable 'SBP' bit in FCTRL register + * to receive all packets + * @return + * - (0) if successful. + * - (-ENODEV) if *port* invalid. + * - (-ENOTSUP) if hardware doesn't support this feature. + */ +int __rte_experimental +rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable); #endif /* _PMD_IXGBE_H_ */ diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map index bf776742c..a360d383b 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map @@ -52,3 +52,9 @@ DPDK_17.08 { rte_pmd_ixgbe_bypass_wd_timeout_show; rte_pmd_ixgbe_bypass_wd_timeout_store; } DPDK_17.05; + +EXPERIMENTAL { + global: + + rte_pmd_ixgbe_upd_fctrl_sbp; +} DPDK_17.08; -- 2.11.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-02-23 11:59 ` [dpdk-dev] [PATCH 1/1] " Shweta Choudaha @ 2018-04-04 2:25 ` Lu, Wenzhuo 2018-04-04 10:14 ` Ferruh Yigit 2018-04-10 15:42 ` [dpdk-dev] [PATCH v2] " Shweta Choudaha 1 sibling, 1 reply; 12+ messages in thread From: Lu, Wenzhuo @ 2018-04-04 2:25 UTC (permalink / raw) To: Shweta Choudaha, dev; +Cc: shweta.choudaha Hi Shweta, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shweta Choudaha > Sent: Friday, February 23, 2018 7:59 PM > To: dev@dpdk.org > Cc: shweta.choudaha@att.com > Subject: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit > > From: Shweta Choudaha <shweta.choudaha@att.com> > > Add ixgbe API to enable SBP bit in FCTRL register to allow receiving packets > that may otherwise be considered length errors by ixgbe and dropped > > Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> > Reviewed-by: Chas Williams <chas3@att.com> > Reviewed-by: Luca Boccassi <bluca@debian.org> > --- > --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > @@ -52,3 +52,9 @@ DPDK_17.08 { > rte_pmd_ixgbe_bypass_wd_timeout_show; > rte_pmd_ixgbe_bypass_wd_timeout_store; > } DPDK_17.05; > + > +EXPERIMENTAL { > + global: > + > + rte_pmd_ixgbe_upd_fctrl_sbp; > +} DPDK_17.08; The patch is fine except we should use 18.05 here. > -- > 2.11.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-04-04 2:25 ` Lu, Wenzhuo @ 2018-04-04 10:14 ` Ferruh Yigit 2018-04-04 10:40 ` Bruce Richardson 0 siblings, 1 reply; 12+ messages in thread From: Ferruh Yigit @ 2018-04-04 10:14 UTC (permalink / raw) To: Lu, Wenzhuo, Shweta Choudaha, dev; +Cc: shweta.choudaha On 4/4/2018 3:25 AM, Lu, Wenzhuo wrote: > Hi Shweta, > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shweta Choudaha >> Sent: Friday, February 23, 2018 7:59 PM >> To: dev@dpdk.org >> Cc: shweta.choudaha@att.com >> Subject: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit >> >> From: Shweta Choudaha <shweta.choudaha@att.com> >> >> Add ixgbe API to enable SBP bit in FCTRL register to allow receiving packets >> that may otherwise be considered length errors by ixgbe and dropped >> >> Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> >> Reviewed-by: Chas Williams <chas3@att.com> >> Reviewed-by: Luca Boccassi <bluca@debian.org> >> --- > > >> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map >> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map >> @@ -52,3 +52,9 @@ DPDK_17.08 { >> rte_pmd_ixgbe_bypass_wd_timeout_show; >> rte_pmd_ixgbe_bypass_wd_timeout_store; >> } DPDK_17.05; >> + >> +EXPERIMENTAL { >> + global: >> + >> + rte_pmd_ixgbe_upd_fctrl_sbp; >> +} DPDK_17.08; > The patch is fine except we should use 18.05 here. We have a rule to have an API as experimental for one release. Not sure about this rule covering the PMD specific APIs but by default it is, we can discuss to have an exception for PMD APIs or not. After one release developer should send patch to remove experimental from API > >> -- >> 2.11.0 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-04-04 10:14 ` Ferruh Yigit @ 2018-04-04 10:40 ` Bruce Richardson 2018-04-10 15:58 ` Shweta Choudaha 0 siblings, 1 reply; 12+ messages in thread From: Bruce Richardson @ 2018-04-04 10:40 UTC (permalink / raw) To: Ferruh Yigit; +Cc: Lu, Wenzhuo, Shweta Choudaha, dev, shweta.choudaha On Wed, Apr 04, 2018 at 11:14:35AM +0100, Ferruh Yigit wrote: > On 4/4/2018 3:25 AM, Lu, Wenzhuo wrote: > > Hi Shweta, > > > > > >> -----Original Message----- > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shweta Choudaha > >> Sent: Friday, February 23, 2018 7:59 PM > >> To: dev@dpdk.org > >> Cc: shweta.choudaha@att.com > >> Subject: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit > >> > >> From: Shweta Choudaha <shweta.choudaha@att.com> > >> > >> Add ixgbe API to enable SBP bit in FCTRL register to allow receiving packets > >> that may otherwise be considered length errors by ixgbe and dropped > >> > >> Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> > >> Reviewed-by: Chas Williams <chas3@att.com> > >> Reviewed-by: Luca Boccassi <bluca@debian.org> > >> --- > > > > > >> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > >> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > >> @@ -52,3 +52,9 @@ DPDK_17.08 { > >> rte_pmd_ixgbe_bypass_wd_timeout_show; > >> rte_pmd_ixgbe_bypass_wd_timeout_store; > >> } DPDK_17.05; > >> + > >> +EXPERIMENTAL { > >> + global: > >> + > >> + rte_pmd_ixgbe_upd_fctrl_sbp; > >> +} DPDK_17.08; > > The patch is fine except we should use 18.05 here. > > We have a rule to have an API as experimental for one release. > > Not sure about this rule covering the PMD specific APIs but by default it is, we > can discuss to have an exception for PMD APIs or not. > > After one release developer should send patch to remove experimental from API > +1 for following the process. I don't see why pmd-specific APIs should be a general exception. Any exceptions should be on an individual case-by-case basis IMHO ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-04-04 10:40 ` Bruce Richardson @ 2018-04-10 15:58 ` Shweta Choudaha 2018-04-26 10:20 ` Shweta Choudaha 0 siblings, 1 reply; 12+ messages in thread From: Shweta Choudaha @ 2018-04-10 15:58 UTC (permalink / raw) To: Bruce Richardson; +Cc: Ferruh Yigit, Lu, Wenzhuo, dev, shweta.choudaha Thanks for the review. I have sent an updated patch and will send patch to remove experimental from API for next release Thanks, Shweta On Wed, Apr 4, 2018 at 11:40 AM, Bruce Richardson < bruce.richardson@intel.com> wrote: > On Wed, Apr 04, 2018 at 11:14:35AM +0100, Ferruh Yigit wrote: > > On 4/4/2018 3:25 AM, Lu, Wenzhuo wrote: > > > Hi Shweta, > > > > > > > > >> -----Original Message----- > > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shweta Choudaha > > >> Sent: Friday, February 23, 2018 7:59 PM > > >> To: dev@dpdk.org > > >> Cc: shweta.choudaha@att.com > > >> Subject: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit > > >> > > >> From: Shweta Choudaha <shweta.choudaha@att.com> > > >> > > >> Add ixgbe API to enable SBP bit in FCTRL register to allow receiving > packets > > >> that may otherwise be considered length errors by ixgbe and dropped > > >> > > >> Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> > > >> Reviewed-by: Chas Williams <chas3@att.com> > > >> Reviewed-by: Luca Boccassi <bluca@debian.org> > > >> --- > > > > > > > > >> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > >> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > >> @@ -52,3 +52,9 @@ DPDK_17.08 { > > >> rte_pmd_ixgbe_bypass_wd_timeout_show; > > >> rte_pmd_ixgbe_bypass_wd_timeout_store; > > >> } DPDK_17.05; > > >> + > > >> +EXPERIMENTAL { > > >> + global: > > >> + > > >> + rte_pmd_ixgbe_upd_fctrl_sbp; > > >> +} DPDK_17.08; > > > The patch is fine except we should use 18.05 here. > > > > We have a rule to have an API as experimental for one release. > > > > Not sure about this rule covering the PMD specific APIs but by default > it is, we > > can discuss to have an exception for PMD APIs or not. > > > > After one release developer should send patch to remove experimental > from API > > > +1 for following the process. > I don't see why pmd-specific APIs should be a general exception. Any > exceptions should be on an individual case-by-case basis IMHO > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-04-10 15:58 ` Shweta Choudaha @ 2018-04-26 10:20 ` Shweta Choudaha 2018-04-26 10:56 ` Ferruh Yigit 0 siblings, 1 reply; 12+ messages in thread From: Shweta Choudaha @ 2018-04-26 10:20 UTC (permalink / raw) To: Bruce Richardson Cc: Ferruh Yigit, Lu, Wenzhuo, dev, shweta.choudaha, Zhang, Helin Hi Ferruh/ Helin, Anything else needed for this patch http://dpdk.org/dev/patchwork/patch/37802/ Or can this be now acked - Have addressed all comments so far. Thanks, Shweta On Tue, Apr 10, 2018 at 4:58 PM, Shweta Choudaha <shweta.choudaha@gmail.com> wrote: > Thanks for the review. > I have sent an updated patch and will send patch to remove experimental > from API for next release > > Thanks, > Shweta > > On Wed, Apr 4, 2018 at 11:40 AM, Bruce Richardson < > bruce.richardson@intel.com> wrote: > >> On Wed, Apr 04, 2018 at 11:14:35AM +0100, Ferruh Yigit wrote: >> > On 4/4/2018 3:25 AM, Lu, Wenzhuo wrote: >> > > Hi Shweta, >> > > >> > > >> > >> -----Original Message----- >> > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shweta Choudaha >> > >> Sent: Friday, February 23, 2018 7:59 PM >> > >> To: dev@dpdk.org >> > >> Cc: shweta.choudaha@att.com >> > >> Subject: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit >> > >> >> > >> From: Shweta Choudaha <shweta.choudaha@att.com> >> > >> >> > >> Add ixgbe API to enable SBP bit in FCTRL register to allow receiving >> packets >> > >> that may otherwise be considered length errors by ixgbe and dropped >> > >> >> > >> Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> >> > >> Reviewed-by: Chas Williams <chas3@att.com> >> > >> Reviewed-by: Luca Boccassi <bluca@debian.org> >> > >> --- >> > > >> > > >> > >> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map >> > >> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map >> > >> @@ -52,3 +52,9 @@ DPDK_17.08 { >> > >> rte_pmd_ixgbe_bypass_wd_timeout_show; >> > >> rte_pmd_ixgbe_bypass_wd_timeout_store; >> > >> } DPDK_17.05; >> > >> + >> > >> +EXPERIMENTAL { >> > >> + global: >> > >> + >> > >> + rte_pmd_ixgbe_upd_fctrl_sbp; >> > >> +} DPDK_17.08; >> > > The patch is fine except we should use 18.05 here. >> > >> > We have a rule to have an API as experimental for one release. >> > >> > Not sure about this rule covering the PMD specific APIs but by default >> it is, we >> > can discuss to have an exception for PMD APIs or not. >> > >> > After one release developer should send patch to remove experimental >> from API >> > >> +1 for following the process. >> I don't see why pmd-specific APIs should be a general exception. Any >> exceptions should be on an individual case-by-case basis IMHO >> > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-04-26 10:20 ` Shweta Choudaha @ 2018-04-26 10:56 ` Ferruh Yigit 2018-05-01 22:15 ` Shweta Choudaha 0 siblings, 1 reply; 12+ messages in thread From: Ferruh Yigit @ 2018-04-26 10:56 UTC (permalink / raw) To: Shweta Choudaha, Bruce Richardson Cc: Lu, Wenzhuo, dev, shweta.choudaha, Zhang, Helin On 4/26/2018 11:20 AM, Shweta Choudaha wrote: > Hi Ferruh/ Helin, > > Anything else needed for this patch > > http://dpdk.org/dev/patchwork/patch/37802/ > Or can this be now acked - Have addressed all comments so far. Hi Helin, Qi, Wenzhuo, Any more comment on patch? Please let me know if you prefer me getting this directly to next-net? > > Thanks, > Shweta > > On Tue, Apr 10, 2018 at 4:58 PM, Shweta Choudaha <shweta.choudaha@gmail.com > <mailto:shweta.choudaha@gmail.com>> wrote: > > Thanks for the review. > I have sent an updated patch and will send patch to remove experimental from > API for next release > > Thanks, > Shweta > > On Wed, Apr 4, 2018 at 11:40 AM, Bruce Richardson > <bruce.richardson@intel.com <mailto:bruce.richardson@intel.com>> wrote: > > On Wed, Apr 04, 2018 at 11:14:35AM +0100, Ferruh Yigit wrote: > > On 4/4/2018 3:25 AM, Lu, Wenzhuo wrote: > > > Hi Shweta, > > > > > > > > >> -----Original Message----- > > >> From: dev [mailto:dev-bounces@dpdk.org > <mailto:dev-bounces@dpdk.org>] On Behalf Of Shweta Choudaha > > >> Sent: Friday, February 23, 2018 7:59 PM > > >> To: dev@dpdk.org <mailto:dev@dpdk.org> > > >> Cc: shweta.choudaha@att.com <mailto:shweta.choudaha@att.com> > > >> Subject: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit > > >> > > >> From: Shweta Choudaha <shweta.choudaha@att.com > <mailto:shweta.choudaha@att.com>> > > >> > > >> Add ixgbe API to enable SBP bit in FCTRL register to allow > receiving packets > > >> that may otherwise be considered length errors by ixgbe and dropped > > >> > > >> Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com > <mailto:shweta.choudaha@att.com>> > > >> Reviewed-by: Chas Williams <chas3@att.com <mailto:chas3@att.com>> > > >> Reviewed-by: Luca Boccassi <bluca@debian.org <mailto:bluca@debian.org>> > > >> --- > > > > > > > > >> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > >> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > >> @@ -52,3 +52,9 @@ DPDK_17.08 { > > >> rte_pmd_ixgbe_bypass_wd_timeout_show; > > >> rte_pmd_ixgbe_bypass_wd_timeout_store; > > >> } DPDK_17.05; > > >> + > > >> +EXPERIMENTAL { > > >> + global: > > >> + > > >> + rte_pmd_ixgbe_upd_fctrl_sbp; > > >> +} DPDK_17.08; > > > The patch is fine except we should use 18.05 here. > > > > We have a rule to have an API as experimental for one release. > > > > Not sure about this rule covering the PMD specific APIs but by default > it is, we > > can discuss to have an exception for PMD APIs or not. > > > > After one release developer should send patch to remove experimental > from API > > > +1 for following the process. > I don't see why pmd-specific APIs should be a general exception. Any > exceptions should be on an individual case-by-case basis IMHO > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to update SBP bit 2018-04-26 10:56 ` Ferruh Yigit @ 2018-05-01 22:15 ` Shweta Choudaha 0 siblings, 0 replies; 12+ messages in thread From: Shweta Choudaha @ 2018-05-01 22:15 UTC (permalink / raw) To: Ferruh Yigit Cc: Bruce Richardson, Lu, Wenzhuo, dev, shweta.choudaha, Zhang, Helin Hi Helin, Qi, Wenzhuo, Any update for this patch. Anything else needed or can this be merged ? Thanks, Shweta On Thu, Apr 26, 2018 at 11:56 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote: > On 4/26/2018 11:20 AM, Shweta Choudaha wrote: > > Hi Ferruh/ Helin, > > > > Anything else needed for this patch > > > > http://dpdk.org/dev/patchwork/patch/37802/ > > Or can this be now acked - Have addressed all comments so far. > > Hi Helin, Qi, Wenzhuo, > > Any more comment on patch? > Please let me know if you prefer me getting this directly to next-net? > > > > > Thanks, > > Shweta > > > > On Tue, Apr 10, 2018 at 4:58 PM, Shweta Choudaha < > shweta.choudaha@gmail.com > > <mailto:shweta.choudaha@gmail.com>> wrote: > > > > Thanks for the review. > > I have sent an updated patch and will send patch to remove > experimental from > > API for next release > > > > Thanks, > > Shweta > > > > On Wed, Apr 4, 2018 at 11:40 AM, Bruce Richardson > > <bruce.richardson@intel.com <mailto:bruce.richardson@intel.com>> > wrote: > > > > On Wed, Apr 04, 2018 at 11:14:35AM +0100, Ferruh Yigit wrote: > > > On 4/4/2018 3:25 AM, Lu, Wenzhuo wrote: > > > > Hi Shweta, > > > > > > > > > > > >> -----Original Message----- > > > >> From: dev [mailto:dev-bounces@dpdk.org > > <mailto:dev-bounces@dpdk.org>] On Behalf Of Shweta Choudaha > > > >> Sent: Friday, February 23, 2018 7:59 PM > > > >> To: dev@dpdk.org <mailto:dev@dpdk.org> > > > >> Cc: shweta.choudaha@att.com <mailto:shweta.choudaha@att.com > > > > > >> Subject: [dpdk-dev] [PATCH 1/1] net/ixgbe: Add API to > update SBP bit > > > >> > > > >> From: Shweta Choudaha <shweta.choudaha@att.com > > <mailto:shweta.choudaha@att.com>> > > > >> > > > >> Add ixgbe API to enable SBP bit in FCTRL register to allow > > receiving packets > > > >> that may otherwise be considered length errors by ixgbe and > dropped > > > >> > > > >> Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com > > <mailto:shweta.choudaha@att.com>> > > > >> Reviewed-by: Chas Williams <chas3@att.com <mailto: > chas3@att.com>> > > > >> Reviewed-by: Luca Boccassi <bluca@debian.org <mailto: > bluca@debian.org>> > > > >> --- > > > > > > > > > > > >> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > > >> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map > > > >> @@ -52,3 +52,9 @@ DPDK_17.08 { > > > >> rte_pmd_ixgbe_bypass_wd_timeout_show; > > > >> rte_pmd_ixgbe_bypass_wd_timeout_store; > > > >> } DPDK_17.05; > > > >> + > > > >> +EXPERIMENTAL { > > > >> + global: > > > >> + > > > >> + rte_pmd_ixgbe_upd_fctrl_sbp; > > > >> +} DPDK_17.08; > > > > The patch is fine except we should use 18.05 here. > > > > > > We have a rule to have an API as experimental for one release. > > > > > > Not sure about this rule covering the PMD specific APIs but by > default > > it is, we > > > can discuss to have an exception for PMD APIs or not. > > > > > > After one release developer should send patch to remove > experimental > > from API > > > > > +1 for following the process. > > I don't see why pmd-specific APIs should be a general exception. > Any > > exceptions should be on an individual case-by-case basis IMHO > > > > > > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [dpdk-dev] [PATCH v2] net/ixgbe: Add API to update SBP bit 2018-02-23 11:59 ` [dpdk-dev] [PATCH 1/1] " Shweta Choudaha 2018-04-04 2:25 ` Lu, Wenzhuo @ 2018-04-10 15:42 ` Shweta Choudaha 2018-05-08 1:47 ` Zhang, Helin 1 sibling, 1 reply; 12+ messages in thread From: Shweta Choudaha @ 2018-04-10 15:42 UTC (permalink / raw) To: dev Cc: wenzhuo.lu, konstantin.ananyev, helin.zhang, ferruh.yigit, shweta.choudaha From: Shweta Choudaha <shweta.choudaha@att.com> Add ixgbe API to enable SBP bit in FCTRL register to allow receiving packets that may otherwise be considered length errors by ixgbe and dropped Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> Reviewed-by: Chas Williams <chas3@att.com> Reviewed-by: Luca Boccassi <bluca@debian.org> --- drivers/net/ixgbe/rte_pmd_ixgbe.c | 28 ++++++++++++++++++++++++++++ drivers/net/ixgbe/rte_pmd_ixgbe.h | 13 +++++++++++++ drivers/net/ixgbe/rte_pmd_ixgbe_version.map | 6 ++++++ 3 files changed, 47 insertions(+) diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c index d8ca8ca31..3b6f68f9e 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -880,6 +880,34 @@ rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port, return 0; } +int __rte_experimental +rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable) +{ + struct ixgbe_hw *hw; + struct rte_eth_dev *dev; + uint32_t fctrl; + + RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); + dev = &rte_eth_devices[port]; + if (!is_ixgbe_supported(dev)) + return -ENOTSUP; + + hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + if (!hw) + return -ENOTSUP; + + fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); + + /* If 'enable' set the SBP bit else clear it */ + if (enable) + fctrl |= IXGBE_FCTRL_SBP; + else + fctrl &= ~(IXGBE_FCTRL_SBP); + + IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); + return 0; +} + #ifdef RTE_LIBRTE_IXGBE_BYPASS int rte_pmd_ixgbe_bypass_init(uint16_t port_id) diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h index 11a9f334b..a3026bd98 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h @@ -637,4 +637,17 @@ enum { ((x) > RTE_PMD_IXGBE_BYPASS_TMT_OFF && \ (x) < RTE_PMD_IXGBE_BYPASS_TMT_NUM)) +/** + * @param port + * The port identifier of the Ethernet device. + * @param enable + * 0 to disable and nonzero to enable 'SBP' bit in FCTRL register + * to receive all packets + * @return + * - (0) if successful. + * - (-ENODEV) if *port* invalid. + * - (-ENOTSUP) if hardware doesn't support this feature. + */ +int __rte_experimental +rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable); #endif /* _PMD_IXGBE_H_ */ diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map index bf776742c..ff6bd0336 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map @@ -52,3 +52,9 @@ DPDK_17.08 { rte_pmd_ixgbe_bypass_wd_timeout_show; rte_pmd_ixgbe_bypass_wd_timeout_store; } DPDK_17.05; + +EXPERIMENTAL { + global: + + rte_pmd_ixgbe_upd_fctrl_sbp; +} DPDK_18.05; -- 2.11.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: Add API to update SBP bit 2018-04-10 15:42 ` [dpdk-dev] [PATCH v2] " Shweta Choudaha @ 2018-05-08 1:47 ` Zhang, Helin 0 siblings, 0 replies; 12+ messages in thread From: Zhang, Helin @ 2018-05-08 1:47 UTC (permalink / raw) To: Shweta Choudaha, dev Cc: Lu, Wenzhuo, Ananyev, Konstantin, Yigit, Ferruh, shweta.choudaha > -----Original Message----- > From: Shweta Choudaha [mailto:shweta.choudaha@gmail.com] > Sent: Tuesday, April 10, 2018 11:43 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo; Ananyev, Konstantin; Zhang, Helin; Yigit, Ferruh; > shweta.choudaha@att.com > Subject: [PATCH v2] net/ixgbe: Add API to update SBP bit > > From: Shweta Choudaha <shweta.choudaha@att.com> > > Add ixgbe API to enable SBP bit in FCTRL register to allow receiving packets that > may otherwise be considered length errors by ixgbe and dropped > > Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com> > Reviewed-by: Chas Williams <chas3@att.com> > Reviewed-by: Luca Boccassi <bluca@debian.org> Applied to dpdk-next-net-intel, thanks! /Helin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH 0/1] net/ixgbe: Add API to update SBP bit @ 2018-02-23 13:54 Shweta Choudaha 0 siblings, 0 replies; 12+ messages in thread From: Shweta Choudaha @ 2018-02-23 13:54 UTC (permalink / raw) To: dev; +Cc: Shweta Choudaha Hi, Not sure why cover letter wasn’ t appended. In some cases we require all packets (including the ones that ixgbe considers as Rx length errors) to be received on backplane ixgbe port. The proposed API sets the requisite SBP bit for ixgbe to receive Rx length error packets. If this is required more generically for all adapters, the other approach can be to allocate a bit in ‘struct rte_eth_rxmode’ to disable rx_length_checking on the port. Please let me know if that is preferred or if more info is needed Thanks, Shweta On Fri, Feb 23, 2018 at 11:59 AM, Shweta Choudaha <shweta.choudaha@gmail.com > wrote: > From: Shweta Choudaha <shweta.choudaha@att.com> > > -- > 2.11.0 > > ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-05-08 1:47 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-02-23 11:59 [dpdk-dev] [PATCH 0/1] net/ixgbe: Add API to update SBP bit Shweta Choudaha 2018-02-23 11:59 ` [dpdk-dev] [PATCH 1/1] " Shweta Choudaha 2018-04-04 2:25 ` Lu, Wenzhuo 2018-04-04 10:14 ` Ferruh Yigit 2018-04-04 10:40 ` Bruce Richardson 2018-04-10 15:58 ` Shweta Choudaha 2018-04-26 10:20 ` Shweta Choudaha 2018-04-26 10:56 ` Ferruh Yigit 2018-05-01 22:15 ` Shweta Choudaha 2018-04-10 15:42 ` [dpdk-dev] [PATCH v2] " Shweta Choudaha 2018-05-08 1:47 ` Zhang, Helin 2018-02-23 13:54 [dpdk-dev] [PATCH 0/1] " Shweta Choudaha
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).