Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions freebsd/net/netisr.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,14 @@ swi_net(void *arg)
#endif
}

void inline
ff_swi_net_excute(void)
{
struct netisr_workstream *nwsp = DPCPU_ID_PTR(0, nws);

return swi_net((void*)nwsp);
}

static int
netisr_queue_workstream(struct netisr_workstream *nwsp, u_int proto,
struct netisr_work *npwp, struct mbuf *m, int *dosignalp)
Expand Down
5 changes: 5 additions & 0 deletions freebsd/netinet/in_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,11 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam,
cred);
if (error)
return (error);
/* Note:
* LOOPBACK not support rss.
*/
if ((ifp->if_softc == NULL) && (ifp->if_flags & IFF_LOOPBACK))
break;
rss = ff_rss_check(ifp->if_softc, faddr.s_addr, laddr.s_addr,
fport, lport);
if (rss) {
Expand Down
8 changes: 8 additions & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ FF_INET6=1
FF_TCPHPTS=1
FF_EXTRA_TCP_STACKS=1

# TCP/UDP loopback.
#FF_LOOPBACK_SUPPORT=1

include ${TOPDIR}/mk/kern.pre.mk

ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
Expand Down Expand Up @@ -143,6 +146,11 @@ HOST_CFLAGS+= -DIPSEC
CFLAGS+= -DIPSEC
endif

ifdef FF_LOOPBACK_SUPPORT
HOST_CFLAGS+= -DFF_LOOPBACK_SUPPORT
CFLAGS+= -DFF_LOOPBACK_SUPPORT
endif

HOST_C= ${CC} -c $(HOST_CFLAGS) ${HOST_INCLUDES} ${WERROR} ${PROF} $<


Expand Down
1 change: 1 addition & 0 deletions lib/ff_api.symlist
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ ff_pthread_create
ff_pthread_join
pcurthread
ff_dpdk_raw_packet_send
ff_swi_net_excute
4 changes: 3 additions & 1 deletion lib/ff_dpdk_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,9 @@ main_loop(void *arg)
}

process_msg_ring(qconf->proc_id, pkts_burst);

#ifdef FF_LOOPBACK_SUPPORT
ff_swi_net_excute();
#endif
div_tsc = rte_rdtsc();

if (likely(lr->loop != NULL && (!idle || cur_tsc - usch_tsc >= drain_tsc))) {
Expand Down
2 changes: 2 additions & 0 deletions lib/ff_host_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,7 @@ int ff_in_pcbladdr(uint16_t family, void *faddr, uint16_t fport, void *laddr);
int ff_rss_check(void *softc, uint32_t saddr, uint32_t daddr,
uint16_t sport, uint16_t dport);

void ff_swi_net_excute(void);

#endif