From: Elad Persiko <eladpe@mellanox.com>
To: dev@dpdk.org
Cc: Elad Persiko <eladpe@mellanox.com>
Subject: [dpdk-dev] [PATCH 2/5] net/mlx5: remove unessecary goto label
Date: Sun, 8 Jan 2017 15:42:00 +0000 [thread overview]
Message-ID: <1483890123-4854-2-git-send-email-eladpe@mellanox.com> (raw)
In-Reply-To: <1483890123-4854-1-git-send-email-eladpe@mellanox.com>
use_dseg label can be deleted as it happens without goto.
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index be38aed..1560530 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -505,7 +505,6 @@
if ((uintptr_t)dseg >= end)
dseg = (volatile rte_v128u32_t *)
txq->wqes;
- goto use_dseg;
} else if (!segs_n) {
goto next_pkt;
} else {
@@ -523,19 +522,18 @@
dseg = (volatile rte_v128u32_t *)
((uintptr_t)wqe + (3 * MLX5_WQE_DWORD_SIZE));
ds = 3;
-use_dseg:
- /* Add the remaining packet as a simple ds. */
- addr = htonll(addr);
- *dseg = (rte_v128u32_t){
- htonl(length),
- txq_mp2mr(txq, txq_mb2mp(buf)),
- addr,
- addr >> 32,
- };
- ++ds;
- if (!segs_n)
- goto next_pkt;
}
+ /* Add the remaining packet as a simple ds. */
+ addr = htonll(addr);
+ *dseg = (rte_v128u32_t){
+ htonl(length),
+ txq_mp2mr(txq, txq_mb2mp(buf)),
+ addr,
+ addr >> 32,
+ };
+ ++ds;
+ if (!segs_n)
+ goto next_pkt;
next_seg:
assert(buf);
assert(ds);
--
1.8.3.1
next prev parent reply other threads:[~2017-01-08 15:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-08 15:41 [dpdk-dev] [PATCH 1/5] net/mlx5: last WQE no room inline Elad Persiko
2017-01-08 15:42 ` Elad Persiko [this message]
2017-01-09 12:29 ` [dpdk-dev] [PATCH 2/5] net/mlx5: remove unessecary goto label Ferruh Yigit
2017-01-08 15:42 ` [dpdk-dev] [PATCH 3/5] net/mlx5: support TSO in control plane Elad Persiko
2017-01-08 15:42 ` [dpdk-dev] [PATCH 4/5] net/mlx5: implement TSO data path Elad Persiko
2017-01-08 15:42 ` [dpdk-dev] [PATCH 5/5] doc: add tso capabilities feature for mlx5 Elad Persiko
2017-01-23 12:27 ` [dpdk-dev] [PATCH 1/5] net/mlx5: last WQE no room inline Ferruh Yigit
2017-02-08 11:02 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483890123-4854-2-git-send-email-eladpe@mellanox.com \
--to=eladpe@mellanox.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).