All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next-queue 1/2] ixgbe: fix clean hw loop count
@ 2018-01-08 22:47 ` Shannon Nelson
  0 siblings, 0 replies; 10+ messages in thread
From: Shannon Nelson @ 2018-01-08 22:47 UTC (permalink / raw)
  To: intel-wired-lan, jeffrey.t.kirsher; +Cc: netdev, steffen.klassert

Fix a cut-paste error so that we can clean all the table entries.

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
index 12c7132..57c10e6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
@@ -148,7 +148,7 @@ static void ixgbe_ipsec_clear_hw_tables(struct ixgbe_adapter *adapter)
 		ixgbe_ipsec_set_rx_sa(hw, idx, 0, buf, 0, 0, 0);
 		ixgbe_ipsec_set_rx_ip(hw, idx, (__be32 *)buf);
 	}
-	for (; idx < IXGBE_IPSEC_MAX_RX_IP_COUNT; idx++) {
+	for (; idx < IXGBE_IPSEC_MAX_SA_COUNT; idx++) {
 		ixgbe_ipsec_set_tx_sa(hw, idx, buf, 0);
 		ixgbe_ipsec_set_rx_sa(hw, idx, 0, buf, 0, 0, 0);
 	}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH next-queue 1/2] ixgbe: fix clean hw loop count
@ 2018-01-08 22:47 ` Shannon Nelson
  0 siblings, 0 replies; 10+ messages in thread
From: Shannon Nelson @ 2018-01-08 22:47 UTC (permalink / raw)
  To: intel-wired-lan

Fix a cut-paste error so that we can clean all the table entries.

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
index 12c7132..57c10e6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
@@ -148,7 +148,7 @@ static void ixgbe_ipsec_clear_hw_tables(struct ixgbe_adapter *adapter)
 		ixgbe_ipsec_set_rx_sa(hw, idx, 0, buf, 0, 0, 0);
 		ixgbe_ipsec_set_rx_ip(hw, idx, (__be32 *)buf);
 	}
-	for (; idx < IXGBE_IPSEC_MAX_RX_IP_COUNT; idx++) {
+	for (; idx < IXGBE_IPSEC_MAX_SA_COUNT; idx++) {
 		ixgbe_ipsec_set_tx_sa(hw, idx, buf, 0);
 		ixgbe_ipsec_set_rx_sa(hw, idx, 0, buf, 0, 0, 0);
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions
  2018-01-08 22:47 ` [Intel-wired-lan] " Shannon Nelson
@ 2018-01-08 22:47   ` Shannon Nelson
  -1 siblings, 0 replies; 10+ messages in thread
From: Shannon Nelson @ 2018-01-08 22:47 UTC (permalink / raw)
  To: intel-wired-lan, jeffrey.t.kirsher; +Cc: netdev, steffen.klassert

Add unlikely() to a few error checking expressions in the Tx
offload handling.

Suggested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
index 57c10e6..3d069a2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
@@ -749,28 +749,28 @@ int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring,
 	struct xfrm_state *xs;
 	struct tx_sa *tsa;
 
-	if (!first->skb->sp->len) {
+	if (unlikely(!first->skb->sp->len)) {
 		netdev_err(tx_ring->netdev, "%s: no xfrm state len = %d\n",
 			   __func__, first->skb->sp->len);
 		return 0;
 	}
 
 	xs = xfrm_input_state(first->skb);
-	if (!xs) {
+	if (unlikely(!xs)) {
 		netdev_err(tx_ring->netdev, "%s: no xfrm_input_state() xs = %p\n",
 			   __func__, xs);
 		return 0;
 	}
 
 	itd->sa_idx = xs->xso.offload_handle - IXGBE_IPSEC_BASE_TX_INDEX;
-	if (itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT) {
+	if (unlikely(itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT)) {
 		netdev_err(tx_ring->netdev, "%s: bad sa_idx=%d handle=%lu\n",
 			   __func__, itd->sa_idx, xs->xso.offload_handle);
 		return 0;
 	}
 
 	tsa = &ipsec->tx_tbl[itd->sa_idx];
-	if (!tsa->used) {
+	if (unlikely(!tsa->used)) {
 		netdev_err(tx_ring->netdev, "%s: unused sa_idx=%d\n",
 			   __func__, itd->sa_idx);
 		return 0;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions
@ 2018-01-08 22:47   ` Shannon Nelson
  0 siblings, 0 replies; 10+ messages in thread
From: Shannon Nelson @ 2018-01-08 22:47 UTC (permalink / raw)
  To: intel-wired-lan

Add unlikely() to a few error checking expressions in the Tx
offload handling.

Suggested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
index 57c10e6..3d069a2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
@@ -749,28 +749,28 @@ int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring,
 	struct xfrm_state *xs;
 	struct tx_sa *tsa;
 
-	if (!first->skb->sp->len) {
+	if (unlikely(!first->skb->sp->len)) {
 		netdev_err(tx_ring->netdev, "%s: no xfrm state len = %d\n",
 			   __func__, first->skb->sp->len);
 		return 0;
 	}
 
 	xs = xfrm_input_state(first->skb);
-	if (!xs) {
+	if (unlikely(!xs)) {
 		netdev_err(tx_ring->netdev, "%s: no xfrm_input_state() xs = %p\n",
 			   __func__, xs);
 		return 0;
 	}
 
 	itd->sa_idx = xs->xso.offload_handle - IXGBE_IPSEC_BASE_TX_INDEX;
-	if (itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT) {
+	if (unlikely(itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT)) {
 		netdev_err(tx_ring->netdev, "%s: bad sa_idx=%d handle=%lu\n",
 			   __func__, itd->sa_idx, xs->xso.offload_handle);
 		return 0;
 	}
 
 	tsa = &ipsec->tx_tbl[itd->sa_idx];
-	if (!tsa->used) {
+	if (unlikely(!tsa->used)) {
 		netdev_err(tx_ring->netdev, "%s: unused sa_idx=%d\n",
 			   __func__, itd->sa_idx);
 		return 0;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH next-queue 1/2] ixgbe: fix clean hw loop count
  2018-01-08 22:47 ` [Intel-wired-lan] " Shannon Nelson
  (?)
  (?)
@ 2018-01-10  0:07 ` Bowers, AndrewX
  -1 siblings, 0 replies; 10+ messages in thread
From: Bowers, AndrewX @ 2018-01-10  0:07 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Shannon Nelson
> Sent: Monday, January 8, 2018 2:48 PM
> To: intel-wired-lan at lists.osuosl.org; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>
> Cc: steffen.klassert at secunet.com; netdev at vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH next-queue 1/2] ixgbe: fix clean hw loop
> count
> 
> Fix a cut-paste error so that we can clean all the table entries.
> 
> Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions
  2018-01-08 22:47   ` [Intel-wired-lan] " Shannon Nelson
  (?)
@ 2018-01-10  0:08   ` Bowers, AndrewX
  -1 siblings, 0 replies; 10+ messages in thread
From: Bowers, AndrewX @ 2018-01-10  0:08 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Shannon Nelson
> Sent: Monday, January 8, 2018 2:48 PM
> To: intel-wired-lan at lists.osuosl.org; Kirsher, Jeffrey T
> <jeffrey.t.kirsher@intel.com>
> Cc: steffen.klassert at secunet.com; netdev at vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH next-queue 2/2] ixgbe: add unlikely notes
> to tx fastpath expressions
> 
> Add unlikely() to a few error checking expressions in the Tx offload handling.
> 
> Suggested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
> Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions
  2018-01-08 22:47   ` [Intel-wired-lan] " Shannon Nelson
@ 2018-01-18  9:06     ` Yanjun Zhu
  -1 siblings, 0 replies; 10+ messages in thread
From: Yanjun Zhu @ 2018-01-18  9:06 UTC (permalink / raw)
  To: Shannon Nelson, intel-wired-lan, jeffrey.t.kirsher
  Cc: netdev, steffen.klassert



On 2018/1/9 6:47, Shannon Nelson wrote:
> Add unlikely() to a few error checking expressions in the Tx
> offload handling.
>
> Suggested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
Hi,

I am fine with this patch. I have a question. The ipsec feature is 
supported in ixgbevf?

Thanks a lot.
Zhu Yanjun
> Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> index 57c10e6..3d069a2 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> @@ -749,28 +749,28 @@ int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring,
>   	struct xfrm_state *xs;
>   	struct tx_sa *tsa;
>   
> -	if (!first->skb->sp->len) {
> +	if (unlikely(!first->skb->sp->len)) {
>   		netdev_err(tx_ring->netdev, "%s: no xfrm state len = %d\n",
>   			   __func__, first->skb->sp->len);
>   		return 0;
>   	}
>   
>   	xs = xfrm_input_state(first->skb);
> -	if (!xs) {
> +	if (unlikely(!xs)) {
>   		netdev_err(tx_ring->netdev, "%s: no xfrm_input_state() xs = %p\n",
>   			   __func__, xs);
>   		return 0;
>   	}
>   
>   	itd->sa_idx = xs->xso.offload_handle - IXGBE_IPSEC_BASE_TX_INDEX;
> -	if (itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT) {
> +	if (unlikely(itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT)) {
>   		netdev_err(tx_ring->netdev, "%s: bad sa_idx=%d handle=%lu\n",
>   			   __func__, itd->sa_idx, xs->xso.offload_handle);
>   		return 0;
>   	}
>   
>   	tsa = &ipsec->tx_tbl[itd->sa_idx];
> -	if (!tsa->used) {
> +	if (unlikely(!tsa->used)) {
>   		netdev_err(tx_ring->netdev, "%s: unused sa_idx=%d\n",
>   			   __func__, itd->sa_idx);
>   		return 0;

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions
@ 2018-01-18  9:06     ` Yanjun Zhu
  0 siblings, 0 replies; 10+ messages in thread
From: Yanjun Zhu @ 2018-01-18  9:06 UTC (permalink / raw)
  To: intel-wired-lan



On 2018/1/9 6:47, Shannon Nelson wrote:
> Add unlikely() to a few error checking expressions in the Tx
> offload handling.
>
> Suggested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
Hi,

I am fine with this patch. I have a question. The ipsec feature is 
supported in ixgbevf?

Thanks a lot.
Zhu Yanjun
> Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> index 57c10e6..3d069a2 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> @@ -749,28 +749,28 @@ int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring,
>   	struct xfrm_state *xs;
>   	struct tx_sa *tsa;
>   
> -	if (!first->skb->sp->len) {
> +	if (unlikely(!first->skb->sp->len)) {
>   		netdev_err(tx_ring->netdev, "%s: no xfrm state len = %d\n",
>   			   __func__, first->skb->sp->len);
>   		return 0;
>   	}
>   
>   	xs = xfrm_input_state(first->skb);
> -	if (!xs) {
> +	if (unlikely(!xs)) {
>   		netdev_err(tx_ring->netdev, "%s: no xfrm_input_state() xs = %p\n",
>   			   __func__, xs);
>   		return 0;
>   	}
>   
>   	itd->sa_idx = xs->xso.offload_handle - IXGBE_IPSEC_BASE_TX_INDEX;
> -	if (itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT) {
> +	if (unlikely(itd->sa_idx > IXGBE_IPSEC_MAX_SA_COUNT)) {
>   		netdev_err(tx_ring->netdev, "%s: bad sa_idx=%d handle=%lu\n",
>   			   __func__, itd->sa_idx, xs->xso.offload_handle);
>   		return 0;
>   	}
>   
>   	tsa = &ipsec->tx_tbl[itd->sa_idx];
> -	if (!tsa->used) {
> +	if (unlikely(!tsa->used)) {
>   		netdev_err(tx_ring->netdev, "%s: unused sa_idx=%d\n",
>   			   __func__, itd->sa_idx);
>   		return 0;


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions
  2018-01-18  9:06     ` [Intel-wired-lan] " Yanjun Zhu
@ 2018-01-18 17:10       ` Shannon Nelson
  -1 siblings, 0 replies; 10+ messages in thread
From: Shannon Nelson @ 2018-01-18 17:10 UTC (permalink / raw)
  To: Yanjun Zhu, intel-wired-lan, jeffrey.t.kirsher; +Cc: netdev, steffen.klassert

On 1/18/2018 1:06 AM, Yanjun Zhu wrote:
> On 2018/1/9 6:47, Shannon Nelson wrote:
>> Add unlikely() to a few error checking expressions in the Tx
>> offload handling.
>>
>> Suggested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
> Hi,
> 
> I am fine with this patch. I have a question. The ipsec feature is 
> supported in ixgbevf?

The x540 datasheet doesn't show any IPsec registers in the VF space, so 
I'm pretty sure the answer is 'no'.

One of the difficulties in providing this is how to manage the register 
space needed in the chip.  Either there's one big table that the PF and 
all the VFs need to somehow coordinate to share, or there are separate 
tables for each PF and VF, taking up a lot of chip space.  I suspect the 
original 82599 designers just weren't ready to take on this issue, nor 
was there enough customer pull in the VF space yet for such a thing.

sln

> 
> Thanks a lot.
> Zhu Yanjun

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions
@ 2018-01-18 17:10       ` Shannon Nelson
  0 siblings, 0 replies; 10+ messages in thread
From: Shannon Nelson @ 2018-01-18 17:10 UTC (permalink / raw)
  To: intel-wired-lan

On 1/18/2018 1:06 AM, Yanjun Zhu wrote:
> On 2018/1/9 6:47, Shannon Nelson wrote:
>> Add unlikely() to a few error checking expressions in the Tx
>> offload handling.
>>
>> Suggested-by: Yanjun Zhu <yanjun.zhu@oracle.com>
> Hi,
> 
> I am fine with this patch. I have a question. The ipsec feature is 
> supported in ixgbevf?

The x540 datasheet doesn't show any IPsec registers in the VF space, so 
I'm pretty sure the answer is 'no'.

One of the difficulties in providing this is how to manage the register 
space needed in the chip.  Either there's one big table that the PF and 
all the VFs need to somehow coordinate to share, or there are separate 
tables for each PF and VF, taking up a lot of chip space.  I suspect the 
original 82599 designers just weren't ready to take on this issue, nor 
was there enough customer pull in the VF space yet for such a thing.

sln

> 
> Thanks a lot.
> Zhu Yanjun


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-18 17:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-08 22:47 [PATCH next-queue 1/2] ixgbe: fix clean hw loop count Shannon Nelson
2018-01-08 22:47 ` [Intel-wired-lan] " Shannon Nelson
2018-01-08 22:47 ` [PATCH next-queue 2/2] ixgbe: add unlikely notes to tx fastpath expressions Shannon Nelson
2018-01-08 22:47   ` [Intel-wired-lan] " Shannon Nelson
2018-01-10  0:08   ` Bowers, AndrewX
2018-01-18  9:06   ` Yanjun Zhu
2018-01-18  9:06     ` [Intel-wired-lan] " Yanjun Zhu
2018-01-18 17:10     ` Shannon Nelson
2018-01-18 17:10       ` [Intel-wired-lan] " Shannon Nelson
2018-01-10  0:07 ` [Intel-wired-lan] [PATCH next-queue 1/2] ixgbe: fix clean hw loop count Bowers, AndrewX

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.