On Tue, Oct 8, 2019 at 2:30 PM <pbhagavat...@marvell.com> wrote: > > From: Pavan Nikhilesh <pbhagavat...@marvell.com> > > Add support to set supported ptypes for octeontx2. > > Signed-off-by: Pavan Nikhilesh <pbhagavat...@marvell.com> > --- > This patch depends on the following series > http://patches.dpdk.org/project/dpdk/list/?series=6715 > > drivers/net/octeontx2/otx2_ethdev.c | 1 + > drivers/net/octeontx2/otx2_ethdev.h | 2 ++ > drivers/net/octeontx2/otx2_ethdev_devargs.c | 21 --------------------- > drivers/net/octeontx2/otx2_lookup.c | 15 +++++++++++++++
Remove following from doc/guides/nics/octeontx2.rst as well. - ``HW offload ptype parsing disable`` (default ``0``) Packet type parsing is HW offloaded by default and this feature may be toggled using ``ptype_disable`` ``devargs`` parameter. > 4 files changed, 18 insertions(+), 21 deletions(-) > > diff --git a/drivers/net/octeontx2/otx2_ethdev.c > b/drivers/net/octeontx2/otx2_ethdev.c > index b84128fef..5ee0e382d 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.c > +++ b/drivers/net/octeontx2/otx2_ethdev.c > @@ -1619,6 +1619,7 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { > .dev_set_link_up = otx2_nix_dev_set_link_up, > .dev_set_link_down = otx2_nix_dev_set_link_down, > .dev_supported_ptypes_get = otx2_nix_supported_ptypes_get, > + .dev_supported_ptypes_set = otx2_nix_supported_ptypes_set, > .dev_reset = otx2_nix_dev_reset, > .stats_get = otx2_nix_dev_stats_get, > .stats_reset = otx2_nix_dev_stats_reset, > +int > +otx2_nix_supported_ptypes_set(struct rte_eth_dev *eth_dev, uint32_t > ptype_mask) > +{ > + struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev); > + > + if (!ptype_mask) > + dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F; > + else > + dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F; Prefer to have positive logic. if (ptype_mask) dev->rx_offload_flags |= NIX_RX_OFFLOAD_PTYPE_F; else dev->rx_offload_flags &= ~NIX_RX_OFFLOAD_PTYPE_F; > + > + otx2_eth_set_rx_function(eth_dev); > + > + return 0; > +} > + > /* > * +------------------ +------------------ + > * | | IL4 | IL3| IL2 | TU | L4 | L3 | L2 | > -- > 2.17.1 >