Skip to content

Commit a247fcd

Browse files
shemmingerdavid-marchand
authored andcommitted
drivers: use dedicated log macros instead of PMD logtype
Those drivers have macros for logging, use them instead of the generic PMD logtype. Fixes: 046f116 ("net/vmxnet3: support MSI-X interrupt") Fixes: 6760463 ("crypto/scheduler: add mode-specific threshold parameter") Fixes: 169ca3d ("crypto/armv8: add PMD optimized for ARMv8 processors") Fixes: af7c9b5 ("crypto/caam_jr: introduce basic driver") Fixes: ef4b04f ("crypto/ccp: support device init") Fixes: fe3688b ("crypto/dpaa_sec: support event crypto adapter") Fixes: bffc7d5 ("crypto/dpaa2_sec: support event crypto adapter") Fixes: b0f66a6 ("event/dpaa: support crypto adapter") Fixes: 4ab57b0 ("event/dpaa2: affine portal at runtime during I/O") Fixes: 5433956 ("event/dlb2: add eventdev probe") Fixes: 7ed3599 ("mempool/dpaa2: add functions for CMDIF") Fixes: 6b10d1f ("net/dpaa: update process specific device info") Fixes: 4defbc8 ("net/dpaa: support FMCless mode") Fixes: f023d05 ("net/dpaa2: support recycle loopback port") Fixes: 72ec7a6 ("net/dpaa2: add soft parser driver") Fixes: 9e79d81 ("net/mvpp2: support Tx scatter/gather") Signed-off-by: Stephen Hemminger <[email protected]>
1 parent 324ec1d commit a247fcd

File tree

17 files changed

+46
-49
lines changed

17 files changed

+46
-49
lines changed

drivers/common/cnxk/roc_platform.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,13 @@ extern int cnxk_logtype_tm;
265265
extern int cnxk_logtype_ree;
266266
extern int cnxk_logtype_dpi;
267267

268+
#define RTE_LOGTYPE_CNXK cnxk_logtype_base
269+
268270
#define plt_err(fmt, args...) \
269-
RTE_LOG(ERR, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
270-
#define plt_info(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)
271-
#define plt_warn(fmt, args...) RTE_LOG(WARNING, PMD, fmt "\n", ##args)
272-
#define plt_print(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)
271+
RTE_LOG(ERR, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
272+
#define plt_info(fmt, args...) RTE_LOG(INFO, CNXK, fmt "\n", ##args)
273+
#define plt_warn(fmt, args...) RTE_LOG(WARNING, CNXK, fmt "\n", ##args)
274+
#define plt_print(fmt, args...) RTE_LOG(INFO, CNXK, fmt "\n", ##args)
273275
#define plt_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
274276
#define plt_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
275277

@@ -296,11 +298,11 @@ extern int cnxk_logtype_dpi;
296298

297299
/* Datapath logs */
298300
#define plt_dp_err(fmt, args...) \
299-
RTE_LOG_DP(ERR, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
301+
RTE_LOG_DP(ERR, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
300302
#define plt_dp_info(fmt, args...) \
301-
RTE_LOG_DP(INFO, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
303+
RTE_LOG_DP(INFO, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
302304
#define plt_dp_dbg(fmt, args...) \
303-
RTE_LOG_DP(DEBUG, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
305+
RTE_LOG_DP(DEBUG, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
304306

305307
#ifdef __cplusplus
306308
#define CNXK_PCI_ID(subsystem_dev, dev) \

drivers/crypto/armv8/rte_armv8_pmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,8 @@ cryptodev_armv8_crypto_uninit(struct rte_vdev_device *vdev)
833833
if (name == NULL)
834834
return -EINVAL;
835835

836-
RTE_LOG(INFO, PMD,
837-
"Closing ARMv8 crypto device %s on numa socket %u\n",
836+
ARMV8_CRYPTO_LOG_INFO(
837+
"Closing ARMv8 crypto device %s on numa socket %u",
838838
name, rte_socket_id());
839839

840840
cryptodev = rte_cryptodev_pmd_get_named_dev(name);

drivers/crypto/caam_jr/caam_jr.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,7 @@ caam_jr_dev_init(const char *name,
23462346

23472347
rte_cryptodev_pmd_probing_finish(dev);
23482348

2349-
RTE_LOG(INFO, PMD, "%s cryptodev init\n", dev->data->name);
2349+
CAAM_JR_INFO("%s cryptodev init", dev->data->name);
23502350

23512351
return 0;
23522352

@@ -2386,8 +2386,7 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
23862386

23872387
ret = of_init();
23882388
if (ret) {
2389-
RTE_LOG(ERR, PMD,
2390-
"of_init failed\n");
2389+
CAAM_JR_ERR("of_init failed");
23912390
return -EINVAL;
23922391
}
23932392
/* if sec device version is not configured */
@@ -2407,8 +2406,7 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
24072406
}
24082407
#ifdef RTE_LIBRTE_PMD_CAAM_JR_BE
24092408
if (rta_get_sec_era() > RTA_SEC_ERA_8) {
2410-
RTE_LOG(ERR, PMD,
2411-
"CAAM is compiled in BE mode for device with sec era > 8???\n");
2409+
CAAM_JR_ERR("CAAM is compiled in BE mode for device with sec era > 8");
24122410
return -EINVAL;
24132411
}
24142412
#endif

drivers/crypto/ccp/rte_ccp_pmd.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ cryptodev_ccp_remove(struct rte_pci_device *pci_dev)
194194

195195
ccp_pmd_init_done = 0;
196196

197-
RTE_LOG(INFO, PMD, "Closing ccp device %s on numa socket %u\n",
198-
name, rte_socket_id());
197+
CCP_LOG_INFO("Closing ccp device %s on numa socket %u", name, rte_socket_id());
199198

200199
return rte_cryptodev_pmd_destroy(dev);
201200
}
@@ -279,7 +278,7 @@ cryptodev_ccp_probe(struct rte_pci_driver *pci_drv __rte_unused,
279278
};
280279

281280
if (ccp_pmd_init_done) {
282-
RTE_LOG(INFO, PMD, "CCP PMD already initialized\n");
281+
CCP_LOG_INFO("CCP PMD already initialized");
283282
return -EFAULT;
284283
}
285284
rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
@@ -288,11 +287,11 @@ cryptodev_ccp_probe(struct rte_pci_driver *pci_drv __rte_unused,
288287

289288
init_params.def_p.max_nb_queue_pairs = CCP_PMD_MAX_QUEUE_PAIRS;
290289

291-
RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
290+
CCP_LOG_INFO("Initialising %s on NUMA node %d", name,
292291
init_params.def_p.socket_id);
293-
RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
292+
CCP_LOG_INFO("Max number of queue pairs = %d",
294293
init_params.def_p.max_nb_queue_pairs);
295-
RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
294+
CCP_LOG_INFO("Authentication offload to %s",
296295
((init_params.auth_opt == 0) ? "CCP" : "CPU"));
297296

298297
rte_pci_device_name(&pci_dev->addr, name, sizeof(name));

drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4153,7 +4153,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
41534153
ret = dpseci_set_opr(dpseci, CMD_PRI_LOW, priv->token,
41544154
qp_id, OPR_OPT_CREATE, &ocfg);
41554155
if (ret) {
4156-
RTE_LOG(ERR, PMD, "Error setting opr: ret: %d\n", ret);
4156+
DPAA2_SEC_ERR("Error setting opr: ret: %d", ret);
41574157
return ret;
41584158
}
41594159
qp->tx_vq.cb_eqresp_free = dpaa2_sec_free_eqresp_buf;
@@ -4163,7 +4163,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
41634163
ret = dpseci_set_rx_queue(dpseci, CMD_PRI_LOW, priv->token,
41644164
qp_id, &cfg);
41654165
if (ret) {
4166-
RTE_LOG(ERR, PMD, "Error in dpseci_set_queue: ret: %d\n", ret);
4166+
DPAA2_SEC_ERR("Error in dpseci_set_queue: ret: %d", ret);
41674167
return ret;
41684168
}
41694169

@@ -4188,7 +4188,7 @@ dpaa2_sec_eventq_detach(const struct rte_cryptodev *dev,
41884188
ret = dpseci_set_rx_queue(dpseci, CMD_PRI_LOW, priv->token,
41894189
qp_id, &cfg);
41904190
if (ret)
4191-
RTE_LOG(ERR, PMD, "Error in dpseci_set_queue: ret: %d\n", ret);
4191+
DPAA2_SEC_ERR("Error in dpseci_set_queue: ret: %d", ret);
41924192

41934193
return ret;
41944194
}

drivers/crypto/dpaa_sec/dpaa_sec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3518,7 +3518,7 @@ dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
35183518
qman_oos_fq(&qp->outq);
35193519
ret = qman_init_fq(&qp->outq, 0, &opts);
35203520
if (ret)
3521-
RTE_LOG(ERR, PMD, "Error in qman_init_fq: ret: %d\n", ret);
3521+
DPAA_SEC_ERR("Error in qman_init_fq: ret: %d", ret);
35223522
qp->outq.cb.dqrr = NULL;
35233523

35243524
return ret;
@@ -3709,7 +3709,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
37093709

37103710
dpaa_sec_get_devargs(cryptodev->device->devargs, DRIVER_DUMP_MODE);
37113711

3712-
RTE_LOG(INFO, PMD, "%s cryptodev init\n", cryptodev->data->name);
3712+
DPAA_SEC_INFO("%s cryptodev init", cryptodev->data->name);
37133713
return 0;
37143714

37153715
init_error:

drivers/crypto/scheduler/scheduler_pmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ cryptodev_scheduler_create(const char *name,
197197
return -EINVAL;
198198
}
199199

200-
RTE_LOG(INFO, PMD, " Sched mode param (%s = %s)\n",
201-
param_name, param_val);
200+
CR_SCHED_LOG(INFO, " Sched mode param (%s = %s)",
201+
param_name, param_val);
202202
}
203203
}
204204

drivers/event/dlb2/dlb2.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4741,9 +4741,8 @@ dlb2_parse_params(const char *params,
47414741
struct rte_kvargs *kvlist = rte_kvargs_parse(params, args);
47424742

47434743
if (kvlist == NULL) {
4744-
RTE_LOG(INFO, PMD,
4745-
"Ignoring unsupported parameters when creating device '%s'\n",
4746-
name);
4744+
DLB2_LOG_INFO("Ignoring unsupported parameters when creating device '%s'",
4745+
name);
47474746
} else {
47484747
int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
47494748
set_numa_node,

drivers/event/dpaa/dpaa_eventdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ dpaa_event_dev_create(const char *name, const char *params, struct rte_vdev_devi
10251025
eventdev->txa_enqueue = dpaa_eventdev_txa_enqueue;
10261026
eventdev->txa_enqueue_same_dest = dpaa_eventdev_txa_enqueue_same_dest;
10271027

1028-
RTE_LOG(INFO, PMD, "%s eventdev added", name);
1028+
DPAA_EVENTDEV_INFO("%s eventdev added", name);
10291029

10301030
/* For secondary processes, the primary has done all the work */
10311031
if (rte_eal_process_type() != RTE_PROC_PRIMARY)

drivers/event/dpaa2/dpaa2_eventdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ dpaa2_eventdev_create(const char *name, struct rte_vdev_device *vdev)
11411141
priv->max_event_queues++;
11421142
} while (dpcon_dev && dpci_dev);
11431143

1144-
RTE_LOG(INFO, PMD, "%s eventdev created\n", name);
1144+
DPAA2_EVENTDEV_INFO("%s eventdev created", name);
11451145

11461146
done:
11471147
event_dev_probing_finish(eventdev);
@@ -1178,7 +1178,7 @@ dpaa2_eventdev_destroy(const char *name)
11781178
}
11791179
priv->max_event_queues = 0;
11801180

1181-
RTE_LOG(INFO, PMD, "%s eventdev cleaned\n", name);
1181+
DPAA2_EVENTDEV_INFO("%s eventdev cleaned", name);
11821182
return 0;
11831183
}
11841184

0 commit comments

Comments
 (0)