summaryrefslogtreecommitdiff
path: root/sys/dev/mlx5
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-10-30 21:05:50 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2020-10-30 21:05:50 +0000
commitb7d92a6683a13ea794b6eb41f046feca56db888e (patch)
tree5bf7046f9156a7e810b32d44fd5e075a1b3bd57c /sys/dev/mlx5
parent82c174a3b4bd7129a8f093ffe6adc48eea485a0b (diff)
downloadsrc-test2-b7d92a6683a13ea794b6eb41f046feca56db888e.tar.gz
src-test2-b7d92a6683a13ea794b6eb41f046feca56db888e.zip
Notes
Diffstat (limited to 'sys/dev/mlx5')
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c10
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_main.c8
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_tx.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
index bebfed02aa60..1abc3e870917 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
@@ -380,7 +380,7 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp,
memset(&rl_params, 0, sizeof(rl_params));
rl_params.hdr = params->hdr;
switch (params->hdr.type) {
-#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef RATELIMIT
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
rl_params.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT;
rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate;
@@ -416,7 +416,7 @@ failure:
int
mlx5e_tls_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params)
{
-#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef RATELIMIT
union if_snd_tag_modify_params rl_params;
struct mlx5e_tls_tag *ptag =
container_of(pmt, struct mlx5e_tls_tag, tag);
@@ -424,7 +424,7 @@ mlx5e_tls_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *
#endif
switch (pmt->type) {
-#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef RATELIMIT
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
memset(&rl_params, 0, sizeof(rl_params));
rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate;
@@ -445,7 +445,7 @@ mlx5e_tls_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *pa
int error;
switch (pmt->type) {
-#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef RATELIMIT
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
#endif
case IF_SND_TAG_TYPE_TLS:
@@ -690,7 +690,7 @@ mlx5e_sq_tls_xmit(struct mlx5e_sq *sq, struct mlx5e_xmit_args *parg, struct mbuf
ptag = mb->m_pkthdr.snd_tag;
if (
-#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef RATELIMIT
ptag->type != IF_SND_TAG_TYPE_TLS_RATE_LIMIT &&
#endif
ptag->type != IF_SND_TAG_TYPE_TLS)
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index 39f03b999110..0ba3d3f6b4c6 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -4126,7 +4126,7 @@ mlx5e_snd_tag_alloc(struct ifnet *ifp,
#ifdef RATELIMIT
case IF_SND_TAG_TYPE_RATE_LIMIT:
return (mlx5e_rl_snd_tag_alloc(ifp, params, ppmt));
-#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef KERN_TLS
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
return (mlx5e_tls_snd_tag_alloc(ifp, params, ppmt));
#endif
@@ -4150,7 +4150,7 @@ mlx5e_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *para
#ifdef RATELIMIT
case IF_SND_TAG_TYPE_RATE_LIMIT:
return (mlx5e_rl_snd_tag_modify(pmt, params));
-#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef KERN_TLS
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
return (mlx5e_tls_snd_tag_modify(pmt, params));
#endif
@@ -4172,7 +4172,7 @@ mlx5e_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *params
#ifdef RATELIMIT
case IF_SND_TAG_TYPE_RATE_LIMIT:
return (mlx5e_rl_snd_tag_query(pmt, params));
-#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef KERN_TLS
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
return (mlx5e_tls_snd_tag_query(pmt, params));
#endif
@@ -4241,7 +4241,7 @@ mlx5e_snd_tag_free(struct m_snd_tag *pmt)
case IF_SND_TAG_TYPE_RATE_LIMIT:
mlx5e_rl_snd_tag_free(pmt);
break;
-#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef KERN_TLS
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
mlx5e_tls_snd_tag_free(pmt);
break;
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c
index ac87be4cdc7d..60606ca64763 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c
@@ -104,7 +104,7 @@ top:
sq = container_of(mb_tag,
struct mlx5e_rl_channel, tag)->sq;
break;
-#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT)
+#ifdef KERN_TLS
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
mb_tag = container_of(mb_tag, struct mlx5e_tls_tag, tag)->rl_tag;
goto top;