Remove IF_SND_TAG_TYPE_TLS_RATE_LIMIT conditionals.

Support for TLS rate limit tags is now in the tree, so this macro is
always defined.

Reviewed by:	hselasky
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D27020
This commit is contained in:
John Baldwin 2020-10-30 21:05:50 +00:00
parent 82c174a3b4
commit b7d92a6683
3 changed files with 10 additions and 10 deletions

View File

@ -380,7 +380,7 @@ mlx5e_tls_snd_tag_alloc(struct ifnet *ifp,
memset(&rl_params, 0, sizeof(rl_params)); memset(&rl_params, 0, sizeof(rl_params));
rl_params.hdr = params->hdr; rl_params.hdr = params->hdr;
switch (params->hdr.type) { 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: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
rl_params.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT; rl_params.hdr.type = IF_SND_TAG_TYPE_RATE_LIMIT;
rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate; rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate;
@ -416,7 +416,7 @@ failure:
int int
mlx5e_tls_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *params) 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; union if_snd_tag_modify_params rl_params;
struct mlx5e_tls_tag *ptag = struct mlx5e_tls_tag *ptag =
container_of(pmt, struct mlx5e_tls_tag, tag); 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 #endif
switch (pmt->type) { switch (pmt->type) {
#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) #ifdef RATELIMIT
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
memset(&rl_params, 0, sizeof(rl_params)); memset(&rl_params, 0, sizeof(rl_params));
rl_params.rate_limit.max_rate = params->tls_rate_limit.max_rate; 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; int error;
switch (pmt->type) { switch (pmt->type) {
#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) #ifdef RATELIMIT
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
#endif #endif
case IF_SND_TAG_TYPE_TLS: 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; ptag = mb->m_pkthdr.snd_tag;
if ( if (
#if defined(RATELIMIT) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) #ifdef RATELIMIT
ptag->type != IF_SND_TAG_TYPE_TLS_RATE_LIMIT && ptag->type != IF_SND_TAG_TYPE_TLS_RATE_LIMIT &&
#endif #endif
ptag->type != IF_SND_TAG_TYPE_TLS) ptag->type != IF_SND_TAG_TYPE_TLS)

View File

@ -4126,7 +4126,7 @@ mlx5e_snd_tag_alloc(struct ifnet *ifp,
#ifdef RATELIMIT #ifdef RATELIMIT
case IF_SND_TAG_TYPE_RATE_LIMIT: case IF_SND_TAG_TYPE_RATE_LIMIT:
return (mlx5e_rl_snd_tag_alloc(ifp, params, ppmt)); 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: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
return (mlx5e_tls_snd_tag_alloc(ifp, params, ppmt)); return (mlx5e_tls_snd_tag_alloc(ifp, params, ppmt));
#endif #endif
@ -4150,7 +4150,7 @@ mlx5e_snd_tag_modify(struct m_snd_tag *pmt, union if_snd_tag_modify_params *para
#ifdef RATELIMIT #ifdef RATELIMIT
case IF_SND_TAG_TYPE_RATE_LIMIT: case IF_SND_TAG_TYPE_RATE_LIMIT:
return (mlx5e_rl_snd_tag_modify(pmt, params)); 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: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
return (mlx5e_tls_snd_tag_modify(pmt, params)); return (mlx5e_tls_snd_tag_modify(pmt, params));
#endif #endif
@ -4172,7 +4172,7 @@ mlx5e_snd_tag_query(struct m_snd_tag *pmt, union if_snd_tag_query_params *params
#ifdef RATELIMIT #ifdef RATELIMIT
case IF_SND_TAG_TYPE_RATE_LIMIT: case IF_SND_TAG_TYPE_RATE_LIMIT:
return (mlx5e_rl_snd_tag_query(pmt, params)); 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: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
return (mlx5e_tls_snd_tag_query(pmt, params)); return (mlx5e_tls_snd_tag_query(pmt, params));
#endif #endif
@ -4241,7 +4241,7 @@ mlx5e_snd_tag_free(struct m_snd_tag *pmt)
case IF_SND_TAG_TYPE_RATE_LIMIT: case IF_SND_TAG_TYPE_RATE_LIMIT:
mlx5e_rl_snd_tag_free(pmt); mlx5e_rl_snd_tag_free(pmt);
break; break;
#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) #ifdef KERN_TLS
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
mlx5e_tls_snd_tag_free(pmt); mlx5e_tls_snd_tag_free(pmt);
break; break;

View File

@ -104,7 +104,7 @@ top:
sq = container_of(mb_tag, sq = container_of(mb_tag,
struct mlx5e_rl_channel, tag)->sq; struct mlx5e_rl_channel, tag)->sq;
break; break;
#if defined(KERN_TLS) && defined(IF_SND_TAG_TYPE_TLS_RATE_LIMIT) #ifdef KERN_TLS
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT: case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
mb_tag = container_of(mb_tag, struct mlx5e_tls_tag, tag)->rl_tag; mb_tag = container_of(mb_tag, struct mlx5e_tls_tag, tag)->rl_tag;
goto top; goto top;