[dpdk-dev] [PATCH v2] net/ark: poll-mode driver for AtomicRules Arkville
Stephen Hemminger
stephen at networkplumber.org
Mon Mar 20 23:25:52 CET 2017
On Mon, 20 Mar 2017 17:14:51 -0400
Ed Czeck <ed.czeck at atomicrules.com> wrote:
> +/* ************************************************************************* */
> +int
> +ark_ddm_verify(struct ark_ddm_t *ddm)
> +{
> + if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
> + fprintf(stderr, " DDM structure looks incorrect %d vs %zd\n",
> + ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
> + return -1;
> + }
> +
> + if (ddm->cfg.const0 != ARK_DDM_CONST) {
> + fprintf(stderr, " DDM module not found as expected 0x%08x\n",
> + ddm->cfg.const0);
> + return -1;
> + }
> + return 0;
> +}
> +
You indentation is botched, either by your editor or mail client.
The DPDK format is same as Linux kernel:
That function should look like:
/* ************************************************************************* */
int
ark_ddm_verify(struct ark_ddm_t *ddm)
{
if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
fprintf(stderr, " DDM structure looks incorrect %d vs %zd\n",
ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
return -1;
}
if (ddm->cfg.const0 != ARK_DDM_CONST) {
fprintf(stderr, " DDM module not found as expected 0x%08x\n",
ddm->cfg.const0);
return -1;
}
return 0;
}
Also drivers should not log to standard error but instead use the DPDK RTE logging
facility.
More information about the dev
mailing list