Would you please summarize the errors on list? Daniele should probably have a look at it since he wrote the patch originally.
Ethan On Thu, Jul 23, 2015 at 4:27 PM, Luis E Pena <[email protected]> wrote: > I ran into errors when using master when adding a dpdk port. I worked with > Pravin yesterday and we think that the cause is this patch. > When we tried branch-2.4, we ran into no errors. > Today I am working on confirming that this is the patch. > > Luis E. P. > > Sent from my iPhone > >> On Jul 23, 2015, at 15:38, Ethan Jackson <[email protected]> wrote: >> >> Ben, Justin, should this be backported? I'm not up on the policy at the >> moment. >> >> Etha >> >>> On Thu, Jul 23, 2015 at 3:42 AM, Traynor, Kevin <[email protected]> >>> wrote: >>> >>>> -----Original Message----- >>>> From: dev [mailto:[email protected]] On Behalf Of Daniele Di >>>> Proietto >>>> Sent: Thursday, July 16, 2015 7:48 PM >>>> To: [email protected] >>>> Subject: [ovs-dev] [PATCH 1/2] netdev-dpdk: Restore txq/rxq number if >>>> initialization fails. >>>> >>>> netdev_dpdk_set_multiq() should not set the number of configured rxq >>>> and txq if the driver initialization fails (meaning that the driver >>>> failed to setup the queues). Otherwise, on a subsequent call to >>>> netdev_dpdk_set_multiq(), the code may believe that the queues have >>>> already been setup and there's no work to be done. >>>> >>>> This commit fixes the problem by restoring the old values if >>>> dpdk_eth_dev_init() fails. >>>> >>>> Reported-by: Ian Stokes <[email protected]> >>>> Signed-off-by: Daniele Di Proietto <[email protected]> >>>> --- >>>> lib/netdev-dpdk.c | 9 +++++++++ >>>> 1 file changed, 9 insertions(+) >>>> >>>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c >>>> index 8b843db..5ae805e 100644 >>>> --- a/lib/netdev-dpdk.c >>>> +++ b/lib/netdev-dpdk.c >>>> @@ -743,6 +743,7 @@ netdev_dpdk_set_multiq(struct netdev *netdev_, unsigned >>>> int n_txq, >>>> { >>>> struct netdev_dpdk *netdev = netdev_dpdk_cast(netdev_); >>>> int err = 0; >>>> + int old_rxq, old_txq; >>>> >>>> if (netdev->up.n_txq == n_txq && netdev->up.n_rxq == n_rxq) { >>>> return err; >>>> @@ -753,12 +754,20 @@ netdev_dpdk_set_multiq(struct netdev *netdev_, >>>> unsigned >>>> int n_txq, >>>> >>>> rte_eth_dev_stop(netdev->port_id); >>>> >>>> + old_txq = netdev->up.n_txq; >>>> + old_rxq = netdev->up.n_rxq; >>>> netdev->up.n_txq = n_txq; >>>> netdev->up.n_rxq = n_rxq; >>>> >>>> rte_free(netdev->tx_q); >>>> err = dpdk_eth_dev_init(netdev); >>>> netdev_dpdk_alloc_txq(netdev, netdev->real_n_txq); >>>> + if (err) { >>>> + /* If there has been an error, it means that the requested queues >>>> + * have not been created. Restore the old numbers. */ >>>> + netdev->up.n_txq = old_txq; >>>> + netdev->up.n_rxq = old_rxq; >>> >>> I had thought that we should restore the previous netdev->tx_q but at >>> present >>> txq's are fixed, so I think it is fine. If txq's become configurable we can >>> change. >>> >>> It would be good to get these patches into OVS2.4 branch if there is still >>> time? >>> >>> Acked-by: Kevin Traynor <[email protected]> >>> >>>> + } >>>> >>>> netdev->txq_needs_locking = netdev->real_n_txq != netdev->up.n_txq; >>>> >>>> -- >>>> 2.1.4 >>>> >>>> _______________________________________________ >>>> dev mailing list >>>> [email protected] >>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailman_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=vLBOU1QC09fNCgzE9c0HcQ&m=BYGI54GsZwT1uHiylyB910omvTxfD_EkW_A8R8jN_5M&s=3CQhoT6BwcZjI5qd5549pOjn6pDX3E3MsUbJc8QKufg&e= >>> _______________________________________________ >>> dev mailing list >>> [email protected] >>> https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailman_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=vLBOU1QC09fNCgzE9c0HcQ&m=BYGI54GsZwT1uHiylyB910omvTxfD_EkW_A8R8jN_5M&s=3CQhoT6BwcZjI5qd5549pOjn6pDX3E3MsUbJc8QKufg&e= >> _______________________________________________ >> dev mailing list >> [email protected] >> https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailman_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=vLBOU1QC09fNCgzE9c0HcQ&m=BYGI54GsZwT1uHiylyB910omvTxfD_EkW_A8R8jN_5M&s=3CQhoT6BwcZjI5qd5549pOjn6pDX3E3MsUbJc8QKufg&e= _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
