* [dpdk-users] Question about driver/controller MTU enforcement with MTU less than jumbo frame size
@ 2017-05-09 21:02 Coulson, Ken
2017-05-10 8:36 ` [dpdk-users] [dpdk-dev] " Bruce Richardson
0 siblings, 1 reply; 2+ messages in thread
From: Coulson, Ken @ 2017-05-09 21:02 UTC (permalink / raw)
To: dev, users
Is it possible to have an MTU enforced on rx that is less than jumbo size frames?
>From the DPDK driver code snippet for ixgbe if MTU < 1518 then the jumbo_frame control bit in the chip is set to 0.
The controller manual says the maximum frame size is only meaningful when the jumbo_frame control bit is 1.
Does it work to leave jumbo_frame set to 1 but set max frame size to something smaller than the jumbo size of 1518?
>From 82559 10 GbE Controller manual, section 8.2.3.22.13, page 669, Max Frame Size:
This field defines the maximum frame size in bytes units from Ethernet MAC
addresses up to inclusive the CRC. Frames received that are larger than this
value are dropped. This field is meaningful when jumbo frames are enabled
(HLREG0.JUMBOEN = 1b). When jumbo frames are not enabled the 82599 uses a
hardwired value of 1518 for this field. The MFS does not include the 4 bytes of
the VLAN header. Packets with VLAN header can be as large as MFS + 4. When
double VLAN is enabled, the device adds 8 to the MFS for any packets. This
value has no effect on transmit frames; it is the responsibility of software to
limit the size of transmit frames.
10G driver dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:
ixgbe_dev_mtu_set(struct rte_ethd_dev *dev, uint16_t mtu)
uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; /* + 18 */
ETHER_MAX_LEN = 1518
/* switch to jumbo mode if needed */
if (frame_size > ETHER_MAX_LEN) {
dev->data->dev_conf.rxmode.jumbo_frame = 1;
hlreg0 |= IXGBE_HLREG0_JUMBOEN;
} else {
dev->data->dev_conf.rxmode.jumbo_frame = 0;
hlreg0 &= ~IXGBE_HLREG0_JUMBOEN;
}
IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);
/* update max frame size */
dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size;
maxfrs = IXGBE_READ_REG(hw, IXGBE_MAXFRS);
maxfrs &= 0x0000FFFF;
maxfrs |= (dev->data->dev_conf.rxmode.max_rx_pkt_len << 16);
IXGBE_WRITE_REG(hw, IXGBE_MAXFRS, maxfrs);
Ken Coulson
Software Engineer
509-242-9273
Ciena
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-users] [dpdk-dev] Question about driver/controller MTU enforcement with MTU less than jumbo frame size
2017-05-09 21:02 [dpdk-users] Question about driver/controller MTU enforcement with MTU less than jumbo frame size Coulson, Ken
@ 2017-05-10 8:36 ` Bruce Richardson
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2017-05-10 8:36 UTC (permalink / raw)
To: Coulson, Ken; +Cc: dev, users
On Tue, May 09, 2017 at 09:02:24PM +0000, Coulson, Ken wrote:
> Is it possible to have an MTU enforced on rx that is less than jumbo size frames?
> From the DPDK driver code snippet for ixgbe if MTU < 1518 then the jumbo_frame control bit in the chip is set to 0.
> The controller manual says the maximum frame size is only meaningful when the jumbo_frame control bit is 1.
> Does it work to leave jumbo_frame set to 1 but set max frame size to something smaller than the jumbo size of 1518?
>
I believe it should work, but I haven't ever tested it to confirm.
/Bruce
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-10 8:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09 21:02 [dpdk-users] Question about driver/controller MTU enforcement with MTU less than jumbo frame size Coulson, Ken
2017-05-10 8:36 ` [dpdk-users] [dpdk-dev] " Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).