Date: Thu, 16 May 2019 17:22:12 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r347811 - stable/11/sys/dev/mlx5/mlx5_en Message-ID: <201905161722.x4GHMCVZ004375@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 16 17:22:11 2019 New Revision: 347811 URL: https://svnweb.freebsd.org/changeset/base/347811 Log: MFC r347261: Implement fast close of RX channel in mlx5en(4). Instead of waiting for all jobs to be cancelled, simply close the completion queue to prevent more completion events and let mlx5e_destroy_rq() cleanup the remaining mbufs. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 17:21:27 2019 (r347810) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu May 16 17:22:11 2019 (r347811) @@ -1033,17 +1033,10 @@ mlx5e_close_rq(struct mlx5e_rq *rq) static void mlx5e_close_rq_wait(struct mlx5e_rq *rq) { - struct mlx5_core_dev *mdev = rq->channel->priv->mdev; - /* wait till RQ is empty */ - while (!mlx5_wq_ll_is_empty(&rq->wq) && - (mdev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR)) { - msleep(4); - rq->cq.mcq.comp(&rq->cq.mcq); - } - - cancel_work_sync(&rq->dim.work); mlx5e_disable_rq(rq); + mlx5e_close_cq(&rq->cq); + cancel_work_sync(&rq->dim.work); mlx5e_destroy_rq(rq); } @@ -1756,7 +1749,6 @@ mlx5e_close_channel_wait(struct mlx5e_channel *c) { mlx5e_close_rq_wait(&c->rq); mlx5e_close_sqs_wait(c); - mlx5e_close_cq(&c->rq.cq); mlx5e_close_tx_cqs(c); /* destroy mutexes */ mlx5e_chan_mtx_destroy(c);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161722.x4GHMCVZ004375>