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
2 changes: 1 addition & 1 deletion freebsd/kern/kern_uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ kern_uuidgen(struct uuid *store, size_t count)
uuid.time.x.low = (uint32_t)time;
uuid.time.x.mid = (uint16_t)(time >> 32);
uuid.time.x.hi = ((uint16_t)(time >> 48) & 0xfff) | (1 << 12);
store[n] = *(struct uuid *)&uuid;
memcpy(store + n, &uuid, sizeof(struct uuid));
time++;
}

Expand Down
2 changes: 1 addition & 1 deletion freebsd/net/if.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ if_alloc_domain(u_char type, int numa_domain)
{
struct ifnet *ifp;
u_short idx;
void *old;
void *old = NULL;

KASSERT(numa_domain <= IF_NODOM, ("numa_domain too large"));
if (numa_domain == IF_NODOM)
Expand Down
2 changes: 1 addition & 1 deletion freebsd/net/route/route_ifaddrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ rib_handle_ifaddr_one(uint32_t fibnum, int cmd, struct rt_addrinfo *info)
int
rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info)
{
int error, last_error = 0;
int error = 0, last_error = 0;
bool didwork = false;

if (V_rt_add_addr_allfibs == 0) {
Expand Down
2 changes: 1 addition & 1 deletion freebsd/netinet/in_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp,
struct in_addr laddr, faddr;
#endif
#ifdef INET6
struct in6_addr *laddr6, *faddr6;
struct in6_addr *laddr6 = NULL, *faddr6 = NULL;
#endif

pcbinfo = inp->inp_pcbinfo;
Expand Down
4 changes: 2 additions & 2 deletions freebsd/netinet/tcp_stacks/bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -11395,7 +11395,7 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so,
int32_t nxt_pkt, struct timeval *tv)
{
int32_t thflags, retval;
uint32_t cts, lcts;
uint32_t cts, lcts = 0;
uint32_t tiwin;
struct tcpopt to;
struct tcp_bbr *bbr;
Expand Down Expand Up @@ -11957,7 +11957,7 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv)
struct socket *so;
int32_t len;
uint32_t cts;
uint32_t recwin, sendwin;
uint32_t recwin = 0, sendwin;
int32_t sb_offset;
int32_t flags, abandon, error = 0;
struct tcp_log_buffer *lgb = NULL;
Expand Down
4 changes: 2 additions & 2 deletions freebsd/netinet/tcp_stacks/rack.c
Original file line number Diff line number Diff line change
Expand Up @@ -11878,13 +11878,13 @@ static int
rack_output(struct tcpcb *tp)
{
struct socket *so;
uint32_t recwin;
uint32_t recwin = 0;
uint32_t sb_offset;
int32_t len, flags, error = 0;
struct mbuf *m;
struct mbuf *mb;
uint32_t if_hw_tsomaxsegcount = 0;
uint32_t if_hw_tsomaxsegsize;
uint32_t if_hw_tsomaxsegsize = 0;
int32_t segsiz, minseg;
long tot_len_this_send = 0;
struct ip *ip = NULL;
Expand Down
8 changes: 4 additions & 4 deletions freebsd/netinet/tcp_stacks/rack_bbr_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ ctf_process_inbound_raw(struct tcpcb *tp, struct socket *so, struct mbuf *m, int
*/
struct mbuf *m_save;
struct ether_header *eh;
struct tcphdr *th;
struct tcphdr *th = NULL;
#ifdef INET6
struct ip6_hdr *ip6 = NULL; /* Keep compiler happy. */
#endif
Expand All @@ -257,10 +257,10 @@ ctf_process_inbound_raw(struct tcpcb *tp, struct socket *so, struct mbuf *m, int
#endif
struct ifnet *ifp;
struct timeval tv;
int32_t retval, nxt_pkt, tlen, off;
int32_t retval, nxt_pkt, tlen = 0, off;
uint16_t etype;
uint16_t drop_hdrlen;
uint8_t iptos, no_vn=0, bpf_req=0;
uint16_t drop_hdrlen = 0;
uint8_t iptos = 0, no_vn=0, bpf_req=0;

NET_EPOCH_ASSERT();

Expand Down
6 changes: 3 additions & 3 deletions freebsd/netinet/tcp_usrreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,16 +1006,16 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m,
{
struct epoch_tracker et;
int error = 0;
struct inpcb *inp;
struct inpcb *inp = NULL;
struct tcpcb *tp = NULL;
#ifdef INET
#ifdef INET6
struct sockaddr_in sin;
#endif
struct sockaddr_in *sinp;
struct sockaddr_in *sinp = NULL;
#endif
#ifdef INET6
int isipv6;
int isipv6 = 0;
#endif
u_int8_t incflagsav;
u_char vflagsav;
Expand Down
2 changes: 1 addition & 1 deletion freebsd/netinet6/nd6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ nd6_is_new_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp)
struct sockaddr_in6 rt_key;
const struct sockaddr *dst6;
uint64_t genid;
int error, fibnum;
int error = 0, fibnum;

/*
* A link-local address is always a neighbor.
Expand Down
3 changes: 3 additions & 0 deletions lib/ff_dpdk_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,9 @@ init_port_start(void)
port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_TSO;
pconf->hw_features.tx_tso = 1;
}
else {
printf("TSO is not supported\n");
}
} else {
printf("TSO is disabled\n");
}
Expand Down
12 changes: 6 additions & 6 deletions lib/ff_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,11 +876,11 @@ rt_getmetrics(const struct rtentry *rt, const struct nhop_object *nh,
}

static void
init_sockaddrs_family(int family, struct sockaddr *dst, struct sockaddr *mask)
init_sockaddrs_family(int family, union sockaddr_union *dst, union sockaddr_union *mask)
{
if (family == AF_INET) {
struct sockaddr_in *dst4 = (struct sockaddr_in *)dst;
struct sockaddr_in *mask4 = (struct sockaddr_in *)mask;
struct sockaddr_in *dst4 = &(dst->sin);
struct sockaddr_in *mask4 = &(mask->sin);

bzero(dst4, sizeof(struct sockaddr_in));
bzero(mask4, sizeof(struct sockaddr_in));
Expand All @@ -892,8 +892,8 @@ init_sockaddrs_family(int family, struct sockaddr *dst, struct sockaddr *mask)
}
#ifdef INET6
if (family == AF_INET6) {
struct sockaddr_in6 *dst6 = (struct sockaddr_in6 *)dst;
struct sockaddr_in6 *mask6 = (struct sockaddr_in6 *)mask;
struct sockaddr_in6 *dst6 = &(dst->sin6);
struct sockaddr_in6 *mask6 = &(mask->sin6);

bzero(dst6, sizeof(struct sockaddr_in6));
bzero(mask6, sizeof(struct sockaddr_in6));
Expand Down Expand Up @@ -944,7 +944,7 @@ update_rtm_from_rc(struct rt_addrinfo *info, struct rt_msghdr **prtm,
rtm = *prtm;
union sockaddr_union sa_dst, sa_mask;
int family = info->rti_info[RTAX_DST]->sa_family;
init_sockaddrs_family(family, &sa_dst.sa, &sa_mask.sa);
init_sockaddrs_family(family, &sa_dst, &sa_mask);
export_rtaddrs(rc->rc_rt, &sa_dst.sa, &sa_mask.sa);

info->rti_info[RTAX_DST] = &sa_dst.sa;
Expand Down