On Sat, Feb 13, 2021 at 03:42:46PM +0800, kernel test robot wrote:
> ld: net/dsa/tag_ocelot_8021q.o: in function `ocelot_xmit_ptp':
> >> net/dsa/tag_ocelot_8021q.c:34: undefined reference to
> >> `ocelot_port_inject_frame'
Good catch, the problem is that the DSA taggers can be built without
support for the switch driver. I've created some shim definitions in
include/soc/mscc/ocelot.h:
/* Packet I/O */
#if IS_ENABLED(CONFIG_MSCC_OCELOT_SWITCH_LIB)
bool ocelot_can_inject(struct ocelot *ocelot, int grp);
void ocelot_port_inject_frame(struct ocelot *ocelot, int port, int grp,
u32 rew_op, struct sk_buff *skb);
int ocelot_xtr_poll_frame(struct ocelot *ocelot, int grp, struct sk_buff **skb);
void ocelot_drain_cpu_queue(struct ocelot *ocelot, int grp);
#else
static inline bool ocelot_can_inject(struct ocelot *ocelot, int grp)
{
return true;
}
static inline void ocelot_port_inject_frame(struct ocelot *ocelot, int port,
int grp, u32 rew_op,
struct sk_buff *skb)
{
}
static inline int ocelot_xtr_poll_frame(struct ocelot *ocelot, int grp,
struct sk_buff **skb)
{
return -EIO;
}
static inline void ocelot_drain_cpu_queue(struct ocelot *ocelot, int grp)
{
}
#endif