DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnx2x: convert to new Rx offloads API
@ 2018-04-01  6:03 Rasesh Mody
  2018-04-05 13:40 ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Rasesh Mody @ 2018-04-01  6:03 UTC (permalink / raw)
  To: dev; +Cc: Harish Patil, ferruh.yigit, Dept-EngDPDKDev

From: Harish Patil <harish.patil@cavium.com>

Ethdev RX offloads API has changed since:
commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")

This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag
to advertise jumbo frame support.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 483d5a1..fada4bd 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -140,11 +140,13 @@ struct rte_bnx2x_xstats_name_off {
 bnx2x_dev_configure(struct rte_eth_dev *dev)
 {
 	struct bnx2x_softc *sc = dev->data->dev_private;
+	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
+
 	int mp_ncpus = sysconf(_SC_NPROCESSORS_CONF);
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (dev->data->dev_conf.rxmode.jumbo_frame)
+	if (rxmode & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		sc->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len;
 
 	if (dev->data->nb_tx_queues > dev->data->nb_rx_queues) {
@@ -454,6 +456,7 @@ struct rte_bnx2x_xstats_name_off {
 	dev_info->max_rx_pktlen  = BNX2X_MAX_RX_PKT_LEN;
 	dev_info->max_mac_addrs  = BNX2X_MAX_MAC_ADDRS;
 	dev_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G;
+	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME;
 }
 
 static int
-- 
1.7.10.3

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

* Re: [dpdk-dev] [PATCH] net/bnx2x: convert to new Rx offloads API
  2018-04-01  6:03 [dpdk-dev] [PATCH] net/bnx2x: convert to new Rx offloads API Rasesh Mody
@ 2018-04-05 13:40 ` Ferruh Yigit
  2018-04-07  5:09   ` Mody, Rasesh
  2018-04-09  5:37   ` [dpdk-dev] [PATCH v2] " Rasesh Mody
  0 siblings, 2 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-04-05 13:40 UTC (permalink / raw)
  To: Rasesh Mody, dev; +Cc: Harish Patil, Dept-EngDPDKDev

On 4/1/2018 7:03 AM, Rasesh Mody wrote:
> From: Harish Patil <harish.patil@cavium.com>
> 
> Ethdev RX offloads API has changed since:
> commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> 
> This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag
> to advertise jumbo frame support.
> 
> Signed-off-by: Harish Patil <harish.patil@cavium.com>
> ---
>  drivers/net/bnx2x/bnx2x_ethdev.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
> index 483d5a1..fada4bd 100644
> --- a/drivers/net/bnx2x/bnx2x_ethdev.c
> +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
> @@ -140,11 +140,13 @@ struct rte_bnx2x_xstats_name_off {
>  bnx2x_dev_configure(struct rte_eth_dev *dev)
>  {
>  	struct bnx2x_softc *sc = dev->data->dev_private;
> +	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
> +
>  	int mp_ncpus = sysconf(_SC_NPROCESSORS_CONF);
>  
>  	PMD_INIT_FUNC_TRACE();
>  
> -	if (dev->data->dev_conf.rxmode.jumbo_frame)
> +	if (rxmode & DEV_RX_OFFLOAD_JUMBO_FRAME)

I guess you would mean "rxmode->offloads".

Isn't this caught by automated build?

>  		sc->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len;
>  
>  	if (dev->data->nb_tx_queues > dev->data->nb_rx_queues) {
> @@ -454,6 +456,7 @@ struct rte_bnx2x_xstats_name_off {
>  	dev_info->max_rx_pktlen  = BNX2X_MAX_RX_PKT_LEN;
>  	dev_info->max_mac_addrs  = BNX2X_MAX_MAC_ADDRS;
>  	dev_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G;
> +	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME;
>  }
>  
>  static int
> 

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

* Re: [dpdk-dev] [PATCH] net/bnx2x: convert to new Rx offloads API
  2018-04-05 13:40 ` Ferruh Yigit
@ 2018-04-07  5:09   ` Mody, Rasesh
  2018-04-09  5:37   ` [dpdk-dev] [PATCH v2] " Rasesh Mody
  1 sibling, 0 replies; 5+ messages in thread
From: Mody, Rasesh @ 2018-04-07  5:09 UTC (permalink / raw)
  To: Ferruh Yigit, dev; +Cc: Patil, Harish, Dept-Eng DPDK Dev

> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Thursday, April 05, 2018 6:40 AM
> 
> On 4/1/2018 7:03 AM, Rasesh Mody wrote:
> > From: Harish Patil <harish.patil@cavium.com>
> >
> > Ethdev RX offloads API has changed since:
> > commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> >
> > This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag to
> > advertise jumbo frame support.
> >
> > Signed-off-by: Harish Patil <harish.patil@cavium.com>
> > ---
> >  drivers/net/bnx2x/bnx2x_ethdev.c |    5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c
> > b/drivers/net/bnx2x/bnx2x_ethdev.c
> > index 483d5a1..fada4bd 100644
> > --- a/drivers/net/bnx2x/bnx2x_ethdev.c
> > +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
> > @@ -140,11 +140,13 @@ struct rte_bnx2x_xstats_name_off {
> > bnx2x_dev_configure(struct rte_eth_dev *dev)  {
> >  	struct bnx2x_softc *sc = dev->data->dev_private;
> > +	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
> > +
> >  	int mp_ncpus = sysconf(_SC_NPROCESSORS_CONF);
> >
> >  	PMD_INIT_FUNC_TRACE();
> >
> > -	if (dev->data->dev_conf.rxmode.jumbo_frame)
> > +	if (rxmode & DEV_RX_OFFLOAD_JUMBO_FRAME)
> 
> I guess you would mean "rxmode->offloads".
> 
> Isn't this caught by automated build?

You are right, will send a v2 with proper offload check.

I do not think this was caught by automated build.

> 
> >  		sc->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len;
> >
> >  	if (dev->data->nb_tx_queues > dev->data->nb_rx_queues) { @@ -
> 454,6
> > +456,7 @@ struct rte_bnx2x_xstats_name_off {
> >  	dev_info->max_rx_pktlen  = BNX2X_MAX_RX_PKT_LEN;
> >  	dev_info->max_mac_addrs  = BNX2X_MAX_MAC_ADDRS;
> >  	dev_info->speed_capa = ETH_LINK_SPEED_10G |
> ETH_LINK_SPEED_20G;
> > +	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME;
> >  }
> >
> >  static int
> >


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

* [dpdk-dev] [PATCH v2] net/bnx2x: convert to new Rx offloads API
  2018-04-05 13:40 ` Ferruh Yigit
  2018-04-07  5:09   ` Mody, Rasesh
@ 2018-04-09  5:37   ` Rasesh Mody
  2018-04-10 16:33     ` Ferruh Yigit
  1 sibling, 1 reply; 5+ messages in thread
From: Rasesh Mody @ 2018-04-09  5:37 UTC (permalink / raw)
  To: dev; +Cc: Harish Patil, ferruh.yigit, Dept-EngDPDKDev

From: Harish Patil <harish.patil@cavium.com>

Ethdev RX offloads API has changed since:
commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")

This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag
to advertise jumbo frame support.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 483d5a1..934d87f 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -140,11 +140,13 @@ struct rte_bnx2x_xstats_name_off {
 bnx2x_dev_configure(struct rte_eth_dev *dev)
 {
 	struct bnx2x_softc *sc = dev->data->dev_private;
+	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
+
 	int mp_ncpus = sysconf(_SC_NPROCESSORS_CONF);
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (dev->data->dev_conf.rxmode.jumbo_frame)
+	if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		sc->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len;
 
 	if (dev->data->nb_tx_queues > dev->data->nb_rx_queues) {
@@ -454,6 +456,7 @@ struct rte_bnx2x_xstats_name_off {
 	dev_info->max_rx_pktlen  = BNX2X_MAX_RX_PKT_LEN;
 	dev_info->max_mac_addrs  = BNX2X_MAX_MAC_ADDRS;
 	dev_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G;
+	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME;
 }
 
 static int
-- 
1.7.10.3

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

* Re: [dpdk-dev] [PATCH v2] net/bnx2x: convert to new Rx offloads API
  2018-04-09  5:37   ` [dpdk-dev] [PATCH v2] " Rasesh Mody
@ 2018-04-10 16:33     ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-04-10 16:33 UTC (permalink / raw)
  To: Rasesh Mody, dev; +Cc: Harish Patil, Dept-EngDPDKDev

On 4/9/2018 6:37 AM, Rasesh Mody wrote:
> From: Harish Patil <harish.patil@cavium.com>
> 
> Ethdev RX offloads API has changed since:
> commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> 
> This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag
> to advertise jumbo frame support.
> 
> Signed-off-by: Harish Patil <harish.patil@cavium.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2018-04-10 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-01  6:03 [dpdk-dev] [PATCH] net/bnx2x: convert to new Rx offloads API Rasesh Mody
2018-04-05 13:40 ` Ferruh Yigit
2018-04-07  5:09   ` Mody, Rasesh
2018-04-09  5:37   ` [dpdk-dev] [PATCH v2] " Rasesh Mody
2018-04-10 16:33     ` Ferruh Yigit

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