MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sfc_tx_qcheck_conf

Function sfc_tx_qcheck_conf

dpdk/drivers/net/sfc/sfc_tx.c:90–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90static int
91sfc_tx_qcheck_conf(struct sfc_adapter *sa, unsigned int txq_max_fill_level,
92 const struct rte_eth_txconf *tx_conf,
93 uint64_t offloads)
94{
95 int rc = 0;
96
97 if (tx_conf->tx_rs_thresh != 0) {
98 sfc_err(sa, "RS bit in transmit descriptor is not supported");
99 rc = EINVAL;
100 }
101
102 if (tx_conf->tx_free_thresh > txq_max_fill_level) {
103 sfc_err(sa,
104 "TxQ free threshold too large: %u vs maximum %u",
105 tx_conf->tx_free_thresh, txq_max_fill_level);
106 rc = EINVAL;
107 }
108
109 if (tx_conf->tx_thresh.pthresh != 0 ||
110 tx_conf->tx_thresh.hthresh != 0 ||
111 tx_conf->tx_thresh.wthresh != 0) {
112 sfc_warn(sa,
113 "prefetch/host/writeback thresholds are not supported");
114 }
115
116 /* We either perform both TCP and UDP offload, or no offload at all */
117 if (((offloads & RTE_ETH_TX_OFFLOAD_TCP_CKSUM) == 0) !=
118 ((offloads & RTE_ETH_TX_OFFLOAD_UDP_CKSUM) == 0)) {
119 sfc_err(sa, "TCP and UDP offloads can't be set independently");
120 rc = EINVAL;
121 }
122
123 return rc;
124}
125
126void
127sfc_tx_qflush_done(struct sfc_txq_info *txq_info)

Callers 1

sfc_tx_qinitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected