Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2021 03:50:17 GMT
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ffbb373c5a95 - main - cxgbe(4): Fix build warnings with NOINET kernels.
Message-ID:  <202105220350.14M3oHUV041980@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=ffbb373c5a95c37be693330a76a093fbcf546440

commit ffbb373c5a95c37be693330a76a093fbcf546440
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2021-05-22 03:42:04 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2021-05-22 03:42:04 +0000

    cxgbe(4): Fix build warnings with NOINET kernels.
    
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D26334
---
 sys/dev/cxgbe/t4_sge.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 8a5dc6acc745..4b685129193e 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -333,7 +333,9 @@ static void drain_wrq_wr_list(struct adapter *, struct sge_wrq *);
 
 static int sysctl_bufsizes(SYSCTL_HANDLER_ARGS);
 #ifdef RATELIMIT
+#if defined(INET) || defined(INET6)
 static inline u_int txpkt_eo_len16(u_int, u_int, u_int);
+#endif
 static int ethofld_fw4_ack(struct sge_iq *, const struct rss_header *,
     struct mbuf *);
 #endif
@@ -1497,12 +1499,14 @@ service_iq(struct sge_iq *iq, int budget)
 	return (0);
 }
 
+#if defined(INET) || defined(INET6)
 static inline int
 sort_before_lro(struct lro_ctrl *lro)
 {
 
 	return (lro->lro_mbuf_max != 0);
 }
+#endif
 
 static inline uint64_t
 last_flit_to_ns(struct adapter *sc, uint64_t lf)
@@ -2311,6 +2315,7 @@ mbuf_eo_nsegs(struct mbuf *m)
 	return (m->m_pkthdr.PH_loc.eight[1]);
 }
 
+#if defined(INET) || defined(INET6)
 static inline void
 set_mbuf_eo_nsegs(struct mbuf *m, uint8_t nsegs)
 {
@@ -2318,6 +2323,7 @@ set_mbuf_eo_nsegs(struct mbuf *m, uint8_t nsegs)
 	M_ASSERTPKTHDR(m);
 	m->m_pkthdr.PH_loc.eight[1] = nsegs;
 }
+#endif
 
 static inline int
 mbuf_eo_len16(struct mbuf *m)
@@ -2331,6 +2337,7 @@ mbuf_eo_len16(struct mbuf *m)
 	return (n);
 }
 
+#if defined(INET) || defined(INET6)
 static inline void
 set_mbuf_eo_len16(struct mbuf *m, uint8_t len16)
 {
@@ -2338,6 +2345,7 @@ set_mbuf_eo_len16(struct mbuf *m, uint8_t len16)
 	M_ASSERTPKTHDR(m);
 	m->m_pkthdr.PH_loc.eight[2] = len16;
 }
+#endif
 
 static inline int
 mbuf_eo_tsclk_tsoff(struct mbuf *m)
@@ -2347,6 +2355,7 @@ mbuf_eo_tsclk_tsoff(struct mbuf *m)
 	return (m->m_pkthdr.PH_loc.eight[3]);
 }
 
+#if defined(INET) || defined(INET6)
 static inline void
 set_mbuf_eo_tsclk_tsoff(struct mbuf *m, uint8_t tsclk_tsoff)
 {
@@ -2354,6 +2363,7 @@ set_mbuf_eo_tsclk_tsoff(struct mbuf *m, uint8_t tsclk_tsoff)
 	M_ASSERTPKTHDR(m);
 	m->m_pkthdr.PH_loc.eight[3] = tsclk_tsoff;
 }
+#endif
 
 static inline int
 needs_eo(struct m_snd_tag *mst)
@@ -2434,6 +2444,7 @@ needs_vxlan_tso(struct mbuf *m)
 	    (m->m_pkthdr.csum_flags & csum_flags) != CSUM_ENCAP_VXLAN);
 }
 
+#if defined(INET) || defined(INET6)
 static inline bool
 needs_inner_tcp_csum(struct mbuf *m)
 {
@@ -2443,6 +2454,7 @@ needs_inner_tcp_csum(struct mbuf *m)
 
 	return (m->m_pkthdr.csum_flags & csum_flags);
 }
+#endif
 
 static inline bool
 needs_l3_csum(struct mbuf *m)
@@ -6421,6 +6433,7 @@ sysctl_bufsizes(SYSCTL_HANDLER_ARGS)
 }
 
 #ifdef RATELIMIT
+#if defined(INET) || defined(INET6)
 /*
  * len16 for a txpkt WR with a GL.  Includes the firmware work request header.
  */
@@ -6444,6 +6457,7 @@ txpkt_eo_len16(u_int nsegs, u_int immhdrs, u_int tso)
 done:
 	return (howmany(n, 16));
 }
+#endif
 
 #define ETID_FLOWC_NPARAMS 6
 #define ETID_FLOWC_LEN (roundup2((sizeof(struct fw_flowc_wr) + \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105220350.14M3oHUV041980>