Thread (19 messages) 19 messages, 3 authors, 2021-02-15

Re: [PATCH net-next 12/12] net: dsa: tag_ocelot_8021q: add support for PTP timestamping

flat view

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-02-13 11:16:15

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':
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help