Skip to content

Commit

Permalink
linux: i40e: ix_crcstrip defaults to 1, similarly to FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaffione committed Apr 19, 2016
1 parent 25d44df commit 6a5d940
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions LINUX/i40e_netmap_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ extern int ix_rx_miss, ix_rx_miss_bufs, ix_crcstrip;
* During regular operations the CRC is stripped, but on some
* hardware reception of frames not multiple of 64 is slower,
* so using crcstrip=0 helps in benchmarks.
* The driver by default strips CRCs and we do not override it.
*
* ix_rx_miss, ix_rx_miss_bufs:
* count packets that might be missed due to lost interrupts.
*/
SYSCTL_DECL(_dev_netmap);
int ix_rx_miss = 0, ix_rx_miss_bufs = 0, ix_crcstrip = 0;
int ix_rx_miss = 0, ix_rx_miss_bufs = 0, ix_crcstrip = 1;
SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip,
CTLFLAG_RW, &ix_crcstrip, 0, "strip CRC on rx frames");
CTLFLAG_RW, &ix_crcstrip, 1, "NIC strips CRC on rx frames");
SYSCTL_INT(_dev_netmap, OID_AUTO, ix_rx_miss,
CTLFLAG_RW, &ix_rx_miss, 0, "potentially missed rx intr");
SYSCTL_INT(_dev_netmap, OID_AUTO, ix_rx_miss_bufs,
Expand Down
4 changes: 2 additions & 2 deletions sys/dev/netmap/if_ixl_netmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extern int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip;
/*
* device-specific sysctl variables:
*
* ixl_crcstrip: 0: keep CRC in rx frames (default), 1: strip it.
* ixl_crcstrip: 0: NIC keeps CRC in rx frames (default), 1: NIC strips it.
* During regular operations the CRC is stripped, but on some
* hardware reception of frames not multiple of 64 is slower,
* so using crcstrip=0 helps in benchmarks.
Expand All @@ -74,7 +74,7 @@ SYSCTL_DECL(_dev_netmap);
int ixl_rx_miss, ixl_rx_miss_bufs, ixl_crcstrip = 1;
#if 0
SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_crcstrip,
CTLFLAG_RW, &ixl_crcstrip, 1, "strip CRC on rx frames");
CTLFLAG_RW, &ixl_crcstrip, 1, "NIC strips CRC on rx frames");
#endif
SYSCTL_INT(_dev_netmap, OID_AUTO, ixl_rx_miss,
CTLFLAG_RW, &ixl_rx_miss, 0, "potentially missed rx intr");
Expand Down
4 changes: 2 additions & 2 deletions sys/dev/netmap/ixgbe_netmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/*
* device-specific sysctl variables:
*
* ix_crcstrip: 0: keep CRC in rx frames (default), 1: strip it.
* ix_crcstrip: 0: NIC keeps CRC in rx frames (default), 1: NIC strips it.
* During regular operations the CRC is stripped, but on some
* hardware reception of frames not multiple of 64 is slower,
* so using crcstrip=0 helps in benchmarks.
Expand All @@ -64,7 +64,7 @@ SYSCTL_DECL(_dev_netmap);
static int ix_rx_miss, ix_rx_miss_bufs;
int ix_crcstrip;
SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip,
CTLFLAG_RW, &ix_crcstrip, 0, "strip CRC on rx frames");
CTLFLAG_RW, &ix_crcstrip, 0, "NIC strips CRC on rx frames");
SYSCTL_INT(_dev_netmap, OID_AUTO, ix_rx_miss,
CTLFLAG_RW, &ix_rx_miss, 0, "potentially missed rx intr");
SYSCTL_INT(_dev_netmap, OID_AUTO, ix_rx_miss_bufs,
Expand Down

0 comments on commit 6a5d940

Please sign in to comment.