LCOV - code coverage report
Current view: top level - drivers/net/cnxk - cnxk_ethdev_devargs.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 193 0.0 %
Date: 2026-04-01 20:02:27 Functions: 0 16 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 56 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(C) 2021 Marvell.
       3                 :            :  */
       4                 :            : 
       5                 :            : #include <inttypes.h>
       6                 :            : #include <math.h>
       7                 :            : 
       8                 :            : #include "cnxk_ethdev.h"
       9                 :            : 
      10                 :            : struct sdp_channel {
      11                 :            :         bool is_sdp_mask_set;
      12                 :            :         uint16_t channel;
      13                 :            :         uint16_t mask;
      14                 :            : };
      15                 :            : 
      16                 :            : struct flow_pre_l2_size_info {
      17                 :            :         uint8_t pre_l2_size_off;
      18                 :            :         uint8_t pre_l2_size_off_mask;
      19                 :            :         uint8_t pre_l2_size_shift_dir;
      20                 :            : };
      21                 :            : 
      22                 :            : static int
      23                 :          0 : parse_outb_nb_desc(const char *key, const char *value, void *extra_args)
      24                 :            : {
      25                 :            :         RTE_SET_USED(key);
      26                 :            :         uint32_t val;
      27                 :            : 
      28                 :            :         val = atoi(value);
      29                 :            : 
      30                 :          0 :         *(uint16_t *)extra_args = val;
      31                 :            : 
      32                 :          0 :         return 0;
      33                 :            : }
      34                 :            : 
      35                 :            : static int
      36                 :          0 : parse_outb_nb_crypto_qs(const char *key, const char *value, void *extra_args)
      37                 :            : {
      38                 :            :         RTE_SET_USED(key);
      39                 :            :         uint32_t val;
      40                 :            : 
      41                 :          0 :         val = atoi(value);
      42                 :            : 
      43         [ #  # ]:          0 :         if (val < 1 || val > 64)
      44                 :            :                 return -EINVAL;
      45                 :            : 
      46                 :          0 :         *(uint16_t *)extra_args = val;
      47                 :            : 
      48                 :          0 :         return 0;
      49                 :            : }
      50                 :            : 
      51                 :            : static int
      52                 :          0 : parse_ipsec_in_spi_range(const char *key, const char *value, void *extra_args)
      53                 :            : {
      54                 :            :         RTE_SET_USED(key);
      55                 :            :         uint32_t val;
      56                 :            : 
      57                 :          0 :         errno = 0;
      58                 :          0 :         val = strtoul(value, NULL, 0);
      59         [ #  # ]:          0 :         if (errno)
      60                 :            :                 val = 0;
      61                 :            : 
      62                 :          0 :         *(uint32_t *)extra_args = val;
      63                 :            : 
      64                 :          0 :         return 0;
      65                 :            : }
      66                 :            : 
      67                 :            : static int
      68                 :          0 : parse_rxc_step(const char *key, const char *value, void *extra_args)
      69                 :            : {
      70                 :            :         RTE_SET_USED(key);
      71                 :            :         uint32_t val;
      72                 :            : 
      73                 :          0 :         errno = 0;
      74                 :          0 :         val = strtoul(value, NULL, 0);
      75         [ #  # ]:          0 :         if (errno)
      76                 :            :                 return -EINVAL;
      77                 :            : 
      78         [ #  # ]:          0 :         if (val > ROC_NIX_INL_REAS_STEP_MAX)
      79                 :            :                 return -EINVAL;
      80                 :            : 
      81                 :          0 :         *(uint32_t *)extra_args = val;
      82                 :            : 
      83                 :          0 :         return 0;
      84                 :            : }
      85                 :            : 
      86                 :            : static int
      87                 :          0 : parse_ipsec_out_max_sa(const char *key, const char *value, void *extra_args)
      88                 :            : {
      89                 :            :         RTE_SET_USED(key);
      90                 :            :         uint32_t val;
      91                 :            : 
      92                 :          0 :         errno = 0;
      93                 :          0 :         val = strtoul(value, NULL, 0);
      94         [ #  # ]:          0 :         if (errno)
      95                 :            :                 val = 0;
      96                 :            : 
      97                 :          0 :         *(uint32_t *)extra_args = val;
      98                 :            : 
      99                 :          0 :         return 0;
     100                 :            : }
     101                 :            : 
     102                 :            : static int
     103                 :          0 : parse_flow_max_priority(const char *key, const char *value, void *extra_args)
     104                 :            : {
     105                 :            :         RTE_SET_USED(key);
     106                 :            :         uint16_t val;
     107                 :            : 
     108                 :          0 :         val = atoi(value);
     109                 :            : 
     110         [ #  # ]:          0 :         if (val < 1 || val > ROC_NPC_MAX_MCAM_PRIORITY)
     111                 :            :                 return -EINVAL;
     112                 :            : 
     113                 :          0 :         *(uint16_t *)extra_args = val;
     114                 :            : 
     115                 :          0 :         return 0;
     116                 :            : }
     117                 :            : 
     118                 :            : static int
     119                 :          0 : parse_flow_prealloc_size(const char *key, const char *value, void *extra_args)
     120                 :            : {
     121                 :            :         RTE_SET_USED(key);
     122                 :            :         uint16_t val;
     123                 :            : 
     124                 :          0 :         val = atoi(value);
     125                 :            : 
     126                 :            :         /* Limit the prealloc size to 32 */
     127         [ #  # ]:          0 :         if (val < 1 || val > 32)
     128                 :            :                 return -EINVAL;
     129                 :            : 
     130                 :          0 :         *(uint16_t *)extra_args = val;
     131                 :            : 
     132                 :          0 :         return 0;
     133                 :            : }
     134                 :            : 
     135                 :            : static int
     136                 :          0 : parse_reta_size(const char *key, const char *value, void *extra_args)
     137                 :            : {
     138                 :            :         RTE_SET_USED(key);
     139                 :            :         uint32_t val;
     140                 :            : 
     141                 :          0 :         val = atoi(value);
     142                 :            : 
     143         [ #  # ]:          0 :         if (val <= RTE_ETH_RSS_RETA_SIZE_64)
     144                 :            :                 val = ROC_NIX_RSS_RETA_SZ_64;
     145         [ #  # ]:          0 :         else if (val > RTE_ETH_RSS_RETA_SIZE_64 && val <= RTE_ETH_RSS_RETA_SIZE_128)
     146                 :            :                 val = ROC_NIX_RSS_RETA_SZ_128;
     147         [ #  # ]:          0 :         else if (val > RTE_ETH_RSS_RETA_SIZE_128 && val <= RTE_ETH_RSS_RETA_SIZE_256)
     148                 :            :                 val = ROC_NIX_RSS_RETA_SZ_256;
     149                 :            :         else
     150                 :            :                 val = ROC_NIX_RSS_RETA_SZ_64;
     151                 :            : 
     152                 :          0 :         *(uint16_t *)extra_args = val;
     153                 :            : 
     154                 :          0 :         return 0;
     155                 :            : }
     156                 :            : 
     157                 :            : static int
     158                 :          0 : parse_pre_l2_hdr_info(const char *key, const char *value, void *extra_args)
     159                 :            : {
     160                 :            :         struct flow_pre_l2_size_info *info =
     161                 :            :                 (struct flow_pre_l2_size_info *)extra_args;
     162                 :          0 :         char *tok1 = NULL, *tok2 = NULL;
     163                 :            :         uint16_t off, off_mask, dir;
     164                 :            : 
     165                 :            :         RTE_SET_USED(key);
     166                 :          0 :         off = strtol(value, &tok1, 16);
     167                 :          0 :         tok1++;
     168                 :          0 :         off_mask = strtol(tok1, &tok2, 16);
     169                 :          0 :         tok2++;
     170                 :          0 :         dir = strtol(tok2, 0, 16);
     171   [ #  #  #  # ]:          0 :         if (off >= 256 || off_mask < 1 || off_mask >= 256 || dir > 1)
     172                 :            :                 return -EINVAL;
     173                 :          0 :         info->pre_l2_size_off = off;
     174                 :          0 :         info->pre_l2_size_off_mask = off_mask;
     175                 :          0 :         info->pre_l2_size_shift_dir = dir;
     176                 :            : 
     177                 :          0 :         return 0;
     178                 :            : }
     179                 :            : 
     180                 :            : static int
     181                 :          0 : parse_flag(const char *key, const char *value, void *extra_args)
     182                 :            : {
     183                 :            :         RTE_SET_USED(key);
     184                 :            : 
     185                 :          0 :         *(uint16_t *)extra_args = atoi(value);
     186                 :            : 
     187                 :          0 :         return 0;
     188                 :            : }
     189                 :            : 
     190                 :            : static int
     191                 :          0 : parse_sqb_count(const char *key, const char *value, void *extra_args)
     192                 :            : {
     193                 :            :         RTE_SET_USED(key);
     194                 :            :         uint32_t val;
     195                 :            : 
     196                 :            :         val = atoi(value);
     197                 :            : 
     198                 :          0 :         *(uint16_t *)extra_args = val;
     199                 :            : 
     200                 :          0 :         return 0;
     201                 :            : }
     202                 :            : 
     203                 :            : static int
     204                 :          0 : parse_meta_bufsize(const char *key, const char *value, void *extra_args)
     205                 :            : {
     206                 :            :         RTE_SET_USED(key);
     207                 :            :         uint32_t val;
     208                 :            : 
     209                 :          0 :         errno = 0;
     210                 :          0 :         val = strtoul(value, NULL, 0);
     211         [ #  # ]:          0 :         if (errno)
     212                 :            :                 val = 0;
     213                 :            : 
     214                 :          0 :         *(uint32_t *)extra_args = val;
     215                 :            : 
     216                 :          0 :         return 0;
     217                 :            : }
     218                 :            : 
     219                 :            : static int
     220                 :          0 : parse_switch_header_type(const char *key, const char *value, void *extra_args)
     221                 :            : {
     222                 :            :         RTE_SET_USED(key);
     223                 :            : 
     224         [ #  # ]:          0 :         if (strcmp(value, "higig2") == 0)
     225                 :          0 :                 *(uint16_t *)extra_args = ROC_PRIV_FLAGS_HIGIG;
     226                 :            : 
     227         [ #  # ]:          0 :         if (strcmp(value, "dsa") == 0)
     228                 :          0 :                 *(uint16_t *)extra_args = ROC_PRIV_FLAGS_EDSA;
     229                 :            : 
     230         [ #  # ]:          0 :         if (strcmp(value, "chlen90b") == 0)
     231                 :          0 :                 *(uint16_t *)extra_args = ROC_PRIV_FLAGS_LEN_90B;
     232                 :            : 
     233         [ #  # ]:          0 :         if (strcmp(value, "exdsa") == 0)
     234                 :          0 :                 *(uint16_t *)extra_args = ROC_PRIV_FLAGS_EXDSA;
     235                 :            : 
     236         [ #  # ]:          0 :         if (strcmp(value, "vlan_exdsa") == 0)
     237                 :          0 :                 *(uint16_t *)extra_args = ROC_PRIV_FLAGS_VLAN_EXDSA;
     238                 :            : 
     239         [ #  # ]:          0 :         if (strcmp(value, "pre_l2") == 0)
     240                 :          0 :                 *(uint16_t *)extra_args = ROC_PRIV_FLAGS_PRE_L2;
     241                 :            : 
     242                 :          0 :         return 0;
     243                 :            : }
     244                 :            : 
     245                 :            : static int
     246                 :          0 : parse_sdp_channel_mask(const char *key, const char *value, void *extra_args)
     247                 :            : {
     248                 :            :         RTE_SET_USED(key);
     249                 :            :         uint16_t chan = 0, mask = 0;
     250                 :          0 :         char *next = 0;
     251                 :            : 
     252                 :            :         /* next will point to the separator '/' */
     253                 :          0 :         chan = strtol(value, &next, 16);
     254                 :          0 :         mask = strtol(++next, 0, 16);
     255                 :            : 
     256         [ #  # ]:          0 :         if (chan > GENMASK(11, 0) || mask > GENMASK(11, 0))
     257                 :            :                 return -EINVAL;
     258                 :            : 
     259                 :          0 :         ((struct sdp_channel *)extra_args)->channel = chan;
     260                 :          0 :         ((struct sdp_channel *)extra_args)->mask = mask;
     261                 :          0 :         ((struct sdp_channel *)extra_args)->is_sdp_mask_set = true;
     262                 :            : 
     263                 :          0 :         return 0;
     264                 :            : }
     265                 :            : 
     266                 :            : static int
     267                 :          0 : parse_val_u16(const char *key, const char *value, void *extra_args)
     268                 :            : {
     269                 :            :         RTE_SET_USED(key);
     270                 :            :         uint16_t val;
     271                 :            : 
     272                 :          0 :         val = atoi(value);
     273                 :            : 
     274                 :          0 :         *(uint16_t *)extra_args = val;
     275                 :            : 
     276                 :          0 :         return 0;
     277                 :            : }
     278                 :            : 
     279                 :            : #define CNXK_RSS_RETA_SIZE      "reta_size"
     280                 :            : #define CNXK_SCL_ENABLE         "scalar_enable"
     281                 :            : #define CNXK_TX_COMPL_ENA       "tx_compl_ena"
     282                 :            : #define CNXK_MAX_SQB_COUNT      "max_sqb_count"
     283                 :            : #define CNXK_FLOW_PREALLOC_SIZE "flow_prealloc_size"
     284                 :            : #define CNXK_FLOW_MAX_PRIORITY  "flow_max_priority"
     285                 :            : #define CNXK_SWITCH_HEADER_TYPE "switch_header"
     286                 :            : #define CNXK_RSS_TAG_AS_XOR     "tag_as_xor"
     287                 :            : #define CNXK_LOCK_RX_CTX        "lock_rx_ctx"
     288                 :            : #define CNXK_IPSEC_IN_MIN_SPI   "ipsec_in_min_spi"
     289                 :            : #define CNXK_IPSEC_IN_MAX_SPI   "ipsec_in_max_spi"
     290                 :            : #define CNXK_IPSEC_OUT_MAX_SA   "ipsec_out_max_sa"
     291                 :            : #define CNXK_OUTB_NB_DESC       "outb_nb_desc"
     292                 :            : #define CNXK_NO_INL_DEV         "no_inl_dev"
     293                 :            : #define CNXK_OUTB_NB_CRYPTO_QS  "outb_nb_crypto_qs"
     294                 :            : #define CNXK_SDP_CHANNEL_MASK   "sdp_channel_mask"
     295                 :            : #define CNXK_FLOW_PRE_L2_INFO   "flow_pre_l2_info"
     296                 :            : #define CNXK_CUSTOM_SA_ACT      "custom_sa_act"
     297                 :            : #define CNXK_SQB_SLACK          "sqb_slack"
     298                 :            : #define CNXK_NIX_META_BUF_SZ    "meta_buf_sz"
     299                 :            : #define CNXK_FLOW_AGING_POLL_FREQ       "aging_poll_freq"
     300                 :            : #define CNXK_NIX_RX_INJ_ENABLE  "rx_inj_ena"
     301                 :            : #define CNXK_CUSTOM_META_AURA_DIS "custom_meta_aura_dis"
     302                 :            : #define CNXK_CUSTOM_INB_SA        "custom_inb_sa"
     303                 :            : #define CNXK_FORCE_TAIL_DROP      "force_tail_drop"
     304                 :            : #define CNXK_DIS_XQE_DROP         "disable_xqe_drop"
     305                 :            : #define CNXK_RXC_STEP             "rxc_step"
     306                 :            : 
     307                 :            : int
     308                 :          0 : cnxk_ethdev_parse_devargs(struct rte_devargs *devargs, struct cnxk_eth_dev *dev)
     309                 :            : {
     310                 :          0 :         uint16_t aging_thread_poll_freq = ROC_NPC_AGE_POLL_FREQ_MIN;
     311                 :          0 :         uint16_t reta_sz = ROC_NIX_RSS_RETA_SZ_64;
     312                 :          0 :         uint16_t sqb_count = CNXK_NIX_TX_MAX_SQB;
     313                 :            :         struct flow_pre_l2_size_info pre_l2_info;
     314                 :          0 :         uint32_t ipsec_in_max_spi = BIT(8) - 1;
     315                 :          0 :         uint16_t sqb_slack = ROC_NIX_SQB_SLACK;
     316                 :          0 :         uint32_t ipsec_out_max_sa = BIT(12);
     317                 :          0 :         uint16_t custom_meta_aura_dis = 0;
     318                 :          0 :         uint16_t flow_prealloc_size = 1;
     319                 :          0 :         uint16_t switch_header_type = 0;
     320                 :          0 :         uint16_t flow_max_priority = 3;
     321                 :          0 :         uint16_t outb_nb_crypto_qs = 1;
     322                 :          0 :         uint32_t ipsec_in_min_spi = 0;
     323                 :          0 :         uint16_t outb_nb_desc = 8200;
     324                 :            :         struct sdp_channel sdp_chan;
     325                 :          0 :         uint16_t rss_tag_as_xor = 0;
     326                 :          0 :         uint16_t force_tail_drop = 0;
     327                 :          0 :         uint16_t scalar_enable = 0;
     328                 :          0 :         uint16_t tx_compl_ena = 0;
     329                 :          0 :         uint16_t custom_sa_act = 0;
     330                 :          0 :         uint16_t custom_inb_sa = 0;
     331                 :            :         struct rte_kvargs *kvlist;
     332                 :          0 :         uint16_t dis_xqe_drop = 0;
     333                 :          0 :         uint32_t meta_buf_sz = 0;
     334                 :          0 :         uint16_t lock_rx_ctx = 0;
     335                 :          0 :         uint16_t rx_inj_ena = 0;
     336                 :          0 :         uint16_t no_inl_dev = 0;
     337         [ #  # ]:          0 :         uint32_t rxc_step = 0;
     338                 :            : 
     339                 :            :         memset(&sdp_chan, 0, sizeof(sdp_chan));
     340                 :            :         memset(&pre_l2_info, 0, sizeof(struct flow_pre_l2_size_info));
     341                 :            : 
     342         [ #  # ]:          0 :         if (devargs == NULL)
     343                 :          0 :                 goto null_devargs;
     344                 :            : 
     345                 :          0 :         kvlist = rte_kvargs_parse(devargs->args, NULL);
     346         [ #  # ]:          0 :         if (kvlist == NULL)
     347                 :          0 :                 goto exit;
     348                 :            : 
     349                 :          0 :         rte_kvargs_process(kvlist, CNXK_RSS_RETA_SIZE, &parse_reta_size,
     350                 :            :                            &reta_sz);
     351                 :          0 :         rte_kvargs_process(kvlist, CNXK_SCL_ENABLE, &parse_flag,
     352                 :            :                            &scalar_enable);
     353                 :          0 :         rte_kvargs_process(kvlist, CNXK_TX_COMPL_ENA, &parse_flag,
     354                 :            :                            &tx_compl_ena);
     355                 :          0 :         rte_kvargs_process(kvlist, CNXK_MAX_SQB_COUNT, &parse_sqb_count,
     356                 :            :                            &sqb_count);
     357                 :          0 :         rte_kvargs_process(kvlist, CNXK_FLOW_PREALLOC_SIZE,
     358                 :            :                            &parse_flow_prealloc_size, &flow_prealloc_size);
     359                 :          0 :         rte_kvargs_process(kvlist, CNXK_FLOW_MAX_PRIORITY,
     360                 :            :                            &parse_flow_max_priority, &flow_max_priority);
     361                 :          0 :         rte_kvargs_process(kvlist, CNXK_SWITCH_HEADER_TYPE,
     362                 :            :                            &parse_switch_header_type, &switch_header_type);
     363                 :          0 :         rte_kvargs_process(kvlist, CNXK_RSS_TAG_AS_XOR, &parse_flag,
     364                 :            :                            &rss_tag_as_xor);
     365                 :          0 :         rte_kvargs_process(kvlist, CNXK_LOCK_RX_CTX, &parse_flag, &lock_rx_ctx);
     366                 :          0 :         rte_kvargs_process(kvlist, CNXK_IPSEC_IN_MIN_SPI,
     367                 :            :                            &parse_ipsec_in_spi_range, &ipsec_in_min_spi);
     368                 :          0 :         rte_kvargs_process(kvlist, CNXK_IPSEC_IN_MAX_SPI,
     369                 :            :                            &parse_ipsec_in_spi_range, &ipsec_in_max_spi);
     370                 :          0 :         rte_kvargs_process(kvlist, CNXK_IPSEC_OUT_MAX_SA,
     371                 :            :                            &parse_ipsec_out_max_sa, &ipsec_out_max_sa);
     372                 :          0 :         rte_kvargs_process(kvlist, CNXK_OUTB_NB_DESC, &parse_outb_nb_desc,
     373                 :            :                            &outb_nb_desc);
     374                 :          0 :         rte_kvargs_process(kvlist, CNXK_OUTB_NB_CRYPTO_QS,
     375                 :            :                            &parse_outb_nb_crypto_qs, &outb_nb_crypto_qs);
     376                 :          0 :         rte_kvargs_process(kvlist, CNXK_NO_INL_DEV, &parse_flag, &no_inl_dev);
     377                 :          0 :         rte_kvargs_process(kvlist, CNXK_SDP_CHANNEL_MASK,
     378                 :            :                            &parse_sdp_channel_mask, &sdp_chan);
     379                 :          0 :         rte_kvargs_process(kvlist, CNXK_FLOW_PRE_L2_INFO,
     380                 :            :                            &parse_pre_l2_hdr_info, &pre_l2_info);
     381                 :          0 :         rte_kvargs_process(kvlist, CNXK_CUSTOM_SA_ACT, &parse_flag,
     382                 :            :                            &custom_sa_act);
     383                 :          0 :         rte_kvargs_process(kvlist, CNXK_SQB_SLACK, &parse_sqb_count,
     384                 :            :                            &sqb_slack);
     385                 :          0 :         rte_kvargs_process(kvlist, CNXK_NIX_META_BUF_SZ, &parse_meta_bufsize, &meta_buf_sz);
     386                 :          0 :         rte_kvargs_process(kvlist, CNXK_FLOW_AGING_POLL_FREQ, &parse_val_u16,
     387                 :            :                            &aging_thread_poll_freq);
     388                 :          0 :         rte_kvargs_process(kvlist, CNXK_NIX_RX_INJ_ENABLE, &parse_flag, &rx_inj_ena);
     389                 :          0 :         rte_kvargs_process(kvlist, CNXK_CUSTOM_META_AURA_DIS, &parse_flag,
     390                 :            :                            &custom_meta_aura_dis);
     391                 :          0 :         rte_kvargs_process(kvlist, CNXK_CUSTOM_INB_SA, &parse_flag, &custom_inb_sa);
     392                 :          0 :         rte_kvargs_process(kvlist, CNXK_FORCE_TAIL_DROP, &parse_flag, &force_tail_drop);
     393                 :          0 :         rte_kvargs_process(kvlist, CNXK_DIS_XQE_DROP, &parse_flag, &dis_xqe_drop);
     394                 :          0 :         rte_kvargs_process(kvlist, CNXK_RXC_STEP, &parse_rxc_step, &rxc_step);
     395                 :          0 :         rte_kvargs_free(kvlist);
     396                 :            : 
     397                 :          0 : null_devargs:
     398                 :          0 :         dev->scalar_ena = !!scalar_enable;
     399                 :          0 :         dev->tx_compl_ena = !!tx_compl_ena;
     400                 :          0 :         dev->inb.no_inl_dev = !!no_inl_dev;
     401                 :          0 :         dev->inb.min_spi = ipsec_in_min_spi;
     402                 :          0 :         dev->inb.max_spi = ipsec_in_max_spi;
     403                 :          0 :         dev->inb.custom_meta_aura_dis = custom_meta_aura_dis;
     404                 :          0 :         dev->outb.max_sa = ipsec_out_max_sa;
     405                 :          0 :         dev->outb.nb_desc = outb_nb_desc;
     406                 :          0 :         dev->outb.nb_crypto_qs = outb_nb_crypto_qs;
     407                 :          0 :         dev->nix.ipsec_out_max_sa = ipsec_out_max_sa;
     408                 :          0 :         dev->nix.rss_tag_as_xor = !!rss_tag_as_xor;
     409                 :          0 :         dev->nix.max_sqb_count = sqb_count;
     410                 :          0 :         dev->nix.reta_sz = reta_sz;
     411                 :          0 :         dev->nix.lock_rx_ctx = lock_rx_ctx;
     412                 :          0 :         dev->nix.custom_sa_action = custom_sa_act;
     413                 :          0 :         dev->nix.sqb_slack = sqb_slack;
     414         [ #  # ]:          0 :         dev->nix.custom_inb_sa = custom_inb_sa;
     415                 :            : 
     416         [ #  # ]:          0 :         if (roc_feature_nix_has_own_meta_aura())
     417                 :          0 :                 dev->nix.meta_buf_sz = meta_buf_sz;
     418                 :            : 
     419                 :          0 :         dev->npc.flow_prealloc_size = flow_prealloc_size;
     420                 :            : 
     421         [ #  # ]:          0 :         if (roc_model_is_cn20k())
     422                 :          0 :                 dev->npc.flow_max_priority = ROC_NPC_MAX_MCAM_PRIORITY;
     423                 :            :         else
     424                 :          0 :                 dev->npc.flow_max_priority = flow_max_priority;
     425                 :            : 
     426                 :          0 :         dev->npc.switch_header_type = switch_header_type;
     427                 :          0 :         dev->npc.sdp_channel = sdp_chan.channel;
     428                 :          0 :         dev->npc.sdp_channel_mask = sdp_chan.mask;
     429                 :          0 :         dev->npc.is_sdp_mask_set = sdp_chan.is_sdp_mask_set;
     430                 :          0 :         dev->npc.pre_l2_size_offset = pre_l2_info.pre_l2_size_off;
     431                 :          0 :         dev->npc.pre_l2_size_offset_mask = pre_l2_info.pre_l2_size_off_mask;
     432                 :          0 :         dev->npc.pre_l2_size_shift_dir = pre_l2_info.pre_l2_size_shift_dir;
     433         [ #  # ]:          0 :         dev->npc.flow_age.aging_poll_freq = aging_thread_poll_freq;
     434         [ #  # ]:          0 :         if (roc_feature_nix_has_rx_inject())
     435                 :          0 :                 dev->nix.rx_inj_ena = rx_inj_ena;
     436                 :          0 :         dev->nix.force_tail_drop = force_tail_drop;
     437                 :          0 :         dev->nix.dis_xqe_drop = !!dis_xqe_drop;
     438                 :          0 :         dev->nix.rxc_step = rxc_step;
     439                 :          0 :         return 0;
     440                 :            : exit:
     441                 :          0 :         return -EINVAL;
     442                 :            : }
     443                 :            : 
     444                 :            : RTE_PMD_REGISTER_PARAM_STRING(net_cnxk,
     445                 :            :                               CNXK_RSS_RETA_SIZE "=<64|128|256>"
     446                 :            :                               CNXK_SCL_ENABLE "=1"
     447                 :            :                               CNXK_TX_COMPL_ENA "=1"
     448                 :            :                               CNXK_MAX_SQB_COUNT "=<8-512>"
     449                 :            :                               CNXK_FLOW_PREALLOC_SIZE "=<1-32>"
     450                 :            :                               CNXK_FLOW_MAX_PRIORITY "=<1-32>"
     451                 :            :                               CNXK_SWITCH_HEADER_TYPE "=<higig2|dsa|chlen90b>"
     452                 :            :                               CNXK_RSS_TAG_AS_XOR "=1"
     453                 :            :                               CNXK_IPSEC_IN_MAX_SPI "=<1-65535>"
     454                 :            :                               CNXK_OUTB_NB_DESC "=<1-65535>"
     455                 :            :                               CNXK_FLOW_PRE_L2_INFO "=<0-255>/<1-255>/<0-1>"
     456                 :            :                               CNXK_OUTB_NB_CRYPTO_QS "=<1-64>"
     457                 :            :                               CNXK_NO_INL_DEV "=0"
     458                 :            :                               CNXK_SDP_CHANNEL_MASK "=<1-4095>/<1-4095>"
     459                 :            :                               CNXK_CUSTOM_SA_ACT "=1"
     460                 :            :                               CNXK_SQB_SLACK "=<12-512>"
     461                 :            :                               CNXK_FLOW_AGING_POLL_FREQ "=<10-65535>"
     462                 :            :                               CNXK_NIX_RX_INJ_ENABLE "=1"
     463                 :            :                               CNXK_CUSTOM_META_AURA_DIS "=1"
     464                 :            :                               CNXK_FORCE_TAIL_DROP "=1"
     465                 :            :                               CNXK_DIS_XQE_DROP "=1"
     466                 :            :                               CNXK_RXC_STEP "=<0-1048575>");

Generated by: LCOV version 1.14