Skip to content

Commit cfad4ca

Browse files
committed
native: Fix options for rte_em_pmd
1 parent 9b68884 commit cfad4ca

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

container/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get -yq update && apt-get -yq install build-essential \
1010
RUN apt-get -yq update && apt-get -yq install libssl-dev \
1111
libgnutls30 libgnutls-openssl-dev \
1212
libcurl4-gnutls-dev cmake bash libpcap-dev libnuma-dev \
13-
clang-5.0
13+
clang-5.0 libclang-dev
1414
# Fix the date at which we take Rust
1515
RUN mkdir -p ~/.ssh && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
1616
ENV RTE_SDK=/opt/netbricks/3rdparty/dpdk

native/pmd.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ static const struct rte_eth_conf default_eth_conf = {
3131
/* FIXME: Find supported RSS hashes from rte_eth_dev_get_info */
3232
.rx_adv_conf.rss_conf =
3333
{
34-
.rss_hf = ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP | ETH_RSS_SCTP, .rss_key = NULL,
34+
.rss_hf = ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP | ETH_RSS_SCTP,
35+
.rss_key = NULL,
3536
},
3637
/* No flow director */
3738
.fdir_conf =
@@ -134,8 +135,12 @@ int init_pmd_port(int port, int rxqs, int txqs, int rxq_core[], int txq_core[],
134135
rte_eth_dev_info_get(port, &dev_info);
135136

136137
eth_rxconf = dev_info.default_rxconf;
137-
/* Drop packets when no descriptors are available */
138-
eth_rxconf.rx_drop_en = 1;
138+
if (strcmp(dev_info.driver_name, "rte_em_pmd") != 0) {
139+
/* Drop packets when no descriptors are available
140+
* Protected since this is not supported by EM driver
141+
* and there is no convenient way to look this up in DPDK. */
142+
eth_rxconf.rx_drop_en = 1;
143+
}
139144

140145
eth_txconf = dev_info.default_txconf;
141146
tso = !(!tso);

0 commit comments

Comments
 (0)