src/dpdk/drivers/net/nfp/nfpcore/nfp_cppcore.c
int
nfp_xpb_writelm(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t mask,
		uint32_t value)
{
	int err;
	uint32_t tmp;

	err = nfp_xpb_readl(cpp, xpb_tgt, &tmp);
	if (err < 0)
		return err;

	tmp &= ~mask;
	tmp |= (mask & value);
	return nfp_xpb_writel(cpp, xpb_tgt, tmp);
}
/*
 * Modify bits of a 32-bit value from the XPB bus
 *
 * @param cpp           NFP CPP device handle
 * @param xpb_tgt       XPB target and address
 * @param mask          mask of bits to alter
 * @param value         value to modify
 *
 * @return 0 on success, or -1 on failure (and set errno accordingly).
 */
Modify bits of a 32-bit value from the XPB bus
@param cpp           NFP CPP device handle
@param xpb_tgt       XPB target and address
@param mask          mask of bits to alter
@param value         value to modify

@return 0 on success, or -1 on failure (and set errno accordingly).
Modify bits of a 32 - bit value from the XPB bus @param cpp NFP CPP device handle @param xpb_tgt XPB target and address @param mask mask of bits to alter @param value value to modify @return 0 on success or - 1 on failure ( and set errno accordingly ) .
int
nfp_xpb_writelm(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t mask,
		uint32_t value)
{
	int err;
	uint32_t tmp;
	err = nfp_xpb_readl(cpp, xpb_tgt, &tmp);
	if (err < 0)
		return err;
	tmp &= ~mask;
	tmp |= (mask & value);
	return nfp_xpb_writel(cpp, xpb_tgt, tmp);
}
int nfp_xpb_writelm ( struct nfp_cpp * cpp , uint32_t xpb_tgt , uint32_t mask , uint32_t value ) { int err ; uint32_t tmp ; err = nfp_xpb_readl ( cpp , xpb_tgt , & tmp ) ; if ( err < 0 ) return err ; tmp &= ~ mask ; tmp |= ( mask & value ) ; return nfp_xpb_writel ( cpp , xpb_tgt , tmp ) ; }
Modify bits of a 32-bit value from the XPB bus
 @param cpp           NFP CPP device handle
 @param xpb_tgt       XPB target and address
 @param mask          mask of bits to alter
 @param value         value to modify
Modify bits of a 32 - bit value from the XPB bus @param cpp NFP CPP device handle @param xpb_tgt XPB target and address @param mask mask of bits to alter @param value value to modify