Skip to content

Commit

Permalink
netdev-dpdk: don't enable scatter for jumbo RX support for nfp
Browse files Browse the repository at this point in the history
Currently to RX jumbo packets fails for NICs not supporting scatter.
Scatter is not strictly needed for jumbo RX support. This change fixes
the issue by not enabling scatter only for the PMD/NIC known not to
need it to support jumbo RX.

Note: this change is temporary and not needed for later releases OVS/DPDK

Reported-by: Louis Peens <[email protected]>
Signed-off-by: Pablo Cascón <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Acked-by: Kevin Traynor <[email protected]>
Signed-off-by: Ian Stokes <[email protected]>
  • Loading branch information
pcasconnetronome authored and istokes committed May 11, 2018
1 parent 6b71df2 commit 65a8796
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,11 +770,19 @@ dpdk_eth_dev_queue_setup(struct netdev_dpdk *dev, int n_rxq, int n_txq)
int diag = 0;
int i;
struct rte_eth_conf conf = port_conf;
struct rte_eth_dev_info info;

/* For some NICs (e.g. Niantic), scatter_rx mode needs to be explicitly
* enabled. */
/* As of DPDK 17.11.1 a few PMDs require to explicitly enable
* scatter to support jumbo RX. Checking the offload capabilities
* is not an option as PMDs are not required yet to report
* them. The only reliable info is the driver name and knowledge
* (testing or code review). Listing all such PMDs feels harder
* than highlighting the one known not to need scatter */
if (dev->mtu > ETHER_MTU) {
conf.rxmode.enable_scatter = 1;
rte_eth_dev_info_get(dev->port_id, &info);
if (strncmp(info.driver_name, "net_nfp", 6)) {
conf.rxmode.enable_scatter = 1;
}
}

conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &
Expand Down

0 comments on commit 65a8796

Please sign in to comment.