DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 1/1] net/octeontx2: skip flow control on lbk ports
@ 2019-10-29 18:03 vattunuru
  2019-10-30  5:54 ` [dpdk-dev] [PATCH v2 " vattunuru
  0 siblings, 1 reply; 3+ messages in thread
From: vattunuru @ 2019-10-29 18:03 UTC (permalink / raw)
  To: dev; +Cc: thomas, jerinj, hkalra, Vamsi Attunuru

From: Vamsi Attunuru <vattunuru@marvell.com>

LBK interface does not support any flow control related
HW configurations.

Skip flow control set requests on LBK bound ethports.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
 drivers/net/octeontx2/otx2_flow_ctrl.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/octeontx2/otx2_flow_ctrl.c b/drivers/net/octeontx2/otx2_flow_ctrl.c
index 1d00e46..9360e8b 100644
--- a/drivers/net/octeontx2/otx2_flow_ctrl.c
+++ b/drivers/net/octeontx2/otx2_flow_ctrl.c
@@ -50,6 +50,11 @@ otx2_nix_flow_ctrl_get(struct rte_eth_dev *eth_dev,
 	struct otx2_mbox *mbox = dev->mbox;
 	int rc;
 
+	if (otx2_dev_is_lbk(dev)) {
+		fc_conf->mode = RTE_FC_NONE;
+		return 0;
+	}
+
 	req = otx2_mbox_alloc_msg_cgx_cfg_pause_frm(mbox);
 	req->set = 0;
 
@@ -137,6 +142,11 @@ otx2_nix_flow_ctrl_set(struct rte_eth_dev *eth_dev,
 	uint8_t tx_pause, rx_pause;
 	int rc = 0;
 
+	if (otx2_dev_is_lbk(dev)) {
+		otx2_err("No flow control support for LBK bound ethports");
+		return -ENOTSUP;
+	}
+
 	if (fc_conf->high_water || fc_conf->low_water || fc_conf->pause_time ||
 	    fc_conf->mac_ctrl_frame_fwd || fc_conf->autoneg) {
 		otx2_info("Flowctrl parameter is not supported");
@@ -189,6 +199,9 @@ otx2_nix_update_flow_ctrl_mode(struct rte_eth_dev *eth_dev)
 	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 	struct rte_eth_fc_conf fc_conf;
 
+	if (otx2_dev_is_lbk(dev))
+		return 0;
+
 	memset(&fc_conf, 0, sizeof(struct rte_eth_fc_conf));
 	/* Both Rx & Tx flow ctrl get enabled(RTE_FC_FULL) in HW
 	 * by AF driver, update those info in PMD structure.
-- 
2.8.4


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

* [dpdk-dev] [PATCH v2 1/1] net/octeontx2: skip flow control on lbk ports
  2019-10-29 18:03 [dpdk-dev] [PATCH v1 1/1] net/octeontx2: skip flow control on lbk ports vattunuru
@ 2019-10-30  5:54 ` vattunuru
  2019-10-30 16:25   ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: vattunuru @ 2019-10-30  5:54 UTC (permalink / raw)
  To: dev; +Cc: jerinj, hkalra, Vamsi Attunuru

From: Vamsi Attunuru <vattunuru@marvell.com>

LBK interface does not support any flow control related
HW configurations.

Skip flow control set requests on LBK bound ethports.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
V2 change:
* Updated log type.

 drivers/net/octeontx2/otx2_flow_ctrl.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/octeontx2/otx2_flow_ctrl.c b/drivers/net/octeontx2/otx2_flow_ctrl.c
index 1d00e46..1b84998 100644
--- a/drivers/net/octeontx2/otx2_flow_ctrl.c
+++ b/drivers/net/octeontx2/otx2_flow_ctrl.c
@@ -50,6 +50,11 @@ otx2_nix_flow_ctrl_get(struct rte_eth_dev *eth_dev,
 	struct otx2_mbox *mbox = dev->mbox;
 	int rc;
 
+	if (otx2_dev_is_lbk(dev)) {
+		fc_conf->mode = RTE_FC_NONE;
+		return 0;
+	}
+
 	req = otx2_mbox_alloc_msg_cgx_cfg_pause_frm(mbox);
 	req->set = 0;
 
@@ -137,6 +142,11 @@ otx2_nix_flow_ctrl_set(struct rte_eth_dev *eth_dev,
 	uint8_t tx_pause, rx_pause;
 	int rc = 0;
 
+	if (otx2_dev_is_lbk(dev)) {
+		otx2_info("No flow control support for LBK bound ethports");
+		return -ENOTSUP;
+	}
+
 	if (fc_conf->high_water || fc_conf->low_water || fc_conf->pause_time ||
 	    fc_conf->mac_ctrl_frame_fwd || fc_conf->autoneg) {
 		otx2_info("Flowctrl parameter is not supported");
@@ -189,6 +199,9 @@ otx2_nix_update_flow_ctrl_mode(struct rte_eth_dev *eth_dev)
 	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 	struct rte_eth_fc_conf fc_conf;
 
+	if (otx2_dev_is_lbk(dev))
+		return 0;
+
 	memset(&fc_conf, 0, sizeof(struct rte_eth_fc_conf));
 	/* Both Rx & Tx flow ctrl get enabled(RTE_FC_FULL) in HW
 	 * by AF driver, update those info in PMD structure.
-- 
2.8.4


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

* Re: [dpdk-dev] [PATCH v2 1/1] net/octeontx2: skip flow control on lbk ports
  2019-10-30  5:54 ` [dpdk-dev] [PATCH v2 " vattunuru
@ 2019-10-30 16:25   ` Jerin Jacob
  0 siblings, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2019-10-30 16:25 UTC (permalink / raw)
  To: Vamsi Attunuru; +Cc: dpdk-dev, Jerin Jacob, hkalra, Ferruh Yigit

On Wed, Oct 30, 2019 at 11:24 AM <vattunuru@marvell.com> wrote:
>
> From: Vamsi Attunuru <vattunuru@marvell.com>
>
> LBK interface does not support any flow control related
> HW configurations.
>
> Skip flow control set requests on LBK bound ethports.
>
> Signed-off-by: Harman Kalra <hkalra@marvell.com>
> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied to dpdk-next-net-mrvl/master. Thanks


> ---
> V2 change:
> * Updated log type.
>
>  drivers/net/octeontx2/otx2_flow_ctrl.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/net/octeontx2/otx2_flow_ctrl.c b/drivers/net/octeontx2/otx2_flow_ctrl.c
> index 1d00e46..1b84998 100644
> --- a/drivers/net/octeontx2/otx2_flow_ctrl.c
> +++ b/drivers/net/octeontx2/otx2_flow_ctrl.c
> @@ -50,6 +50,11 @@ otx2_nix_flow_ctrl_get(struct rte_eth_dev *eth_dev,
>         struct otx2_mbox *mbox = dev->mbox;
>         int rc;
>
> +       if (otx2_dev_is_lbk(dev)) {
> +               fc_conf->mode = RTE_FC_NONE;
> +               return 0;
> +       }
> +
>         req = otx2_mbox_alloc_msg_cgx_cfg_pause_frm(mbox);
>         req->set = 0;
>
> @@ -137,6 +142,11 @@ otx2_nix_flow_ctrl_set(struct rte_eth_dev *eth_dev,
>         uint8_t tx_pause, rx_pause;
>         int rc = 0;
>
> +       if (otx2_dev_is_lbk(dev)) {
> +               otx2_info("No flow control support for LBK bound ethports");
> +               return -ENOTSUP;
> +       }
> +
>         if (fc_conf->high_water || fc_conf->low_water || fc_conf->pause_time ||
>             fc_conf->mac_ctrl_frame_fwd || fc_conf->autoneg) {
>                 otx2_info("Flowctrl parameter is not supported");
> @@ -189,6 +199,9 @@ otx2_nix_update_flow_ctrl_mode(struct rte_eth_dev *eth_dev)
>         struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
>         struct rte_eth_fc_conf fc_conf;
>
> +       if (otx2_dev_is_lbk(dev))
> +               return 0;
> +
>         memset(&fc_conf, 0, sizeof(struct rte_eth_fc_conf));
>         /* Both Rx & Tx flow ctrl get enabled(RTE_FC_FULL) in HW
>          * by AF driver, update those info in PMD structure.
> --
> 2.8.4
>

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

end of thread, other threads:[~2019-10-30 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 18:03 [dpdk-dev] [PATCH v1 1/1] net/octeontx2: skip flow control on lbk ports vattunuru
2019-10-30  5:54 ` [dpdk-dev] [PATCH v2 " vattunuru
2019-10-30 16:25   ` Jerin Jacob

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