From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Junyu Jiang <junyux.jiang@intel.com>
Cc: dev@dpdk.org, Wenzhuo Lu <wenzhuo.lu@intel.com>,
Qiming Yang <qiming.yang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: enable jumbo frame for VF
Date: Thu, 19 Dec 2019 16:17:32 +0800 [thread overview]
Message-ID: <20191219081732.GA14498@intel.com> (raw)
In-Reply-To: <20191202200327.38509-1-junyux.jiang@intel.com>
On 12/02, Junyu Jiang wrote:
>Enable jumbo frame for VF by configuring DPDK PF.
>
>Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
>---
> drivers/net/ixgbe/ixgbe_pf.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
>diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
>index d0d85e138..66b856e11 100644
>--- a/drivers/net/ixgbe/ixgbe_pf.c
>+++ b/drivers/net/ixgbe/ixgbe_pf.c
>@@ -544,6 +544,7 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *ms
> struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> uint32_t new_mtu = msgbuf[1];
> uint32_t max_frs;
>+ uint32_t hlreg0;
> int max_frame = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
>
> /* X540 and X550 support jumbo frames in IOV mode */
>@@ -560,6 +561,18 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *ms
> max_frs = (IXGBE_READ_REG(hw, IXGBE_MAXFRS) &
> IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT;
> if (max_frs < new_mtu) {
>+ hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);
>+ if (new_mtu > RTE_ETHER_MAX_LEN) {
>+ dev->data->dev_conf.rxmode.offloads |=
>+ DEV_RX_OFFLOAD_JUMBO_FRAME;
>+ hlreg0 |= IXGBE_HLREG0_JUMBOEN;
>+ } else {
>+ dev->data->dev_conf.rxmode.offloads &=
>+ ~DEV_RX_OFFLOAD_JUMBO_FRAME;
>+ hlreg0 &= ~IXGBE_HLREG0_JUMBOEN;
>+ }
>+ IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);
>+
> max_frs = new_mtu << IXGBE_MHADD_MFS_SHIFT;
> IXGBE_WRITE_REG(hw, IXGBE_MAXFRS, max_frs);
> }
>--
>2.17.1
>
Applied to dpdk-next-net-intel with wei's ack, Thanks.
prev parent reply other threads:[~2019-12-19 8:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 20:03 [dpdk-dev] [PATCH] net/ixgbe: enable jumbo frame for VF Junyu Jiang
2019-12-18 6:28 ` Zhao1, Wei
2019-12-19 8:17 ` Ye Xiaolong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191219081732.GA14498@intel.com \
--to=xiaolong.ye@intel.com \
--cc=dev@dpdk.org \
--cc=junyux.jiang@intel.com \
--cc=qiming.yang@intel.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.