All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH] ixgbe: fix x550 flow director issue
Date: Mon, 15 Jun 2015 07:19:46 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F8C533E8@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1434347966-29668-1-git-send-email-wenzhuo.lu@intel.com>

Acked-by: Jingjing Wu <jingjing.wu@intel.com>

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Monday, June 15, 2015 1:59 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] ixgbe: fix x550 flow director issue
> 
> On x550, flow director doesn't support other IP packets directly.
> If we want to monitor IP other packets, the L4 protocol and ports must be
> masked. It means, on x550, if we want to add a flow director filter for other
> IP packets, a flow director mask must have been configed to mask L4
> protocol and ports.
> 
> Return err when the user try to config a flow director filter for other IP
> packets without flow director mask configed before. And print err log for it.
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_fdir.c | 24 +++++++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
> index db48817..40824ba 100644
> --- a/drivers/net/ixgbe/ixgbe_fdir.c
> +++ b/drivers/net/ixgbe/ixgbe_fdir.c
> @@ -334,9 +334,10 @@ fdir_set_input_mask_82599(struct rte_eth_dev
> *dev,
>  	fdirtcpm = reverse_fdir_bitmasks(input_mask->dst_port_mask,
>  					 input_mask->src_port_mask);
> 
> -	/* write both the same so that UDP and TCP use the same mask */
> +	/* write all the same so that UDP, TCP and SCTP use the same mask
> */
>  	IXGBE_WRITE_REG(hw, IXGBE_FDIRTCPM, ~fdirtcpm);
>  	IXGBE_WRITE_REG(hw, IXGBE_FDIRUDPM, ~fdirtcpm);
> +	IXGBE_WRITE_REG(hw, IXGBE_FDIRSCTPM, ~fdirtcpm);
>  	info->mask.src_port_mask = input_mask->src_port_mask;
>  	info->mask.dst_port_mask = input_mask->dst_port_mask;
> 
> @@ -899,10 +900,31 @@ ixgbe_add_del_fdir_filter(struct rte_eth_dev *dev,
>  	uint8_t queue;
>  	bool is_perfect = FALSE;
>  	int err;
> +	struct ixgbe_hw_fdir_info *info =
> +			IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data-
> >dev_private);
> 
>  	if (dev->data->dev_conf.fdir_conf.mode == RTE_FDIR_MODE_NONE)
>  		return -ENOTSUP;
> 
> +	/*
> +	 * Sanity check for x550.
> +	 * When adding a new filter with flow type set to IPv4-other,
> +	 * the flow director mask should be configed before,
> +	 * and the L4 protocol and ports are masked.
> +	 */
> +	if ((!del) &&
> +	    (hw->mac.type == ixgbe_mac_X550 ||
> +	     hw->mac.type == ixgbe_mac_X550EM_x) &&
> +	    (fdir_filter->input.flow_type ==
> +	       RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) &&
> +	    (info->mask.src_port_mask != 0 ||
> +	     info->mask.dst_port_mask != 0)) {
> +		PMD_DRV_LOG(ERR, "By this device,"
> +				 " IPv4-other is not supported without"
> +				 " L4 protocol and ports masked!");
> +		return -ENOTSUP;
> +	}
> +
>  	if (dev->data->dev_conf.fdir_conf.mode ==
> RTE_FDIR_MODE_PERFECT)
>  		is_perfect = TRUE;
> 
> --
> 1.9.3

  reply	other threads:[~2015-06-15  7:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15  5:59 [PATCH] ixgbe: fix x550 flow director issue Wenzhuo Lu
2015-06-15  7:19 ` Wu, Jingjing [this message]
2015-06-15 20:59   ` Thomas Monjalon

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=9BB6961774997848B5B42BEC655768F8C533E8@SHSMSX104.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --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.