This patch set adds the MACsec offload support for ixgbe.
The testpmd is also updated to support MACsec cmds.
Tiwei Bie (3):
lib: add MACsec offload flags
net/ixgbe: add MACsec offload support
app/testpmd: add ixgbe MACsec offload support
app/test-pmd/cmdline.c | 389
These flags will be used in next commits in the ixgbe pmd.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
lib/librte_mbuf/rte_mbuf.h| 5 +
2 files changed, 7 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 9678179
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
---
drivers/net/ixgbe/ixgbe_ethdev.c| 436
add test for set macsec offload
add test for set macsec sc
add test for set macsec sa
Signed-off-by: Tiwei Bie
---
app/test-pmd/cmdline.c | 389 +
app/test-pmd/macfwd.c | 2 +
app/test-pmd/macswap.c | 2 +
app/test-pmd/testpmd.h | 2 +
app
On Sun, Jan 08, 2017 at 08:39:55PM +0800, Ananyev, Konstantin wrote:
> Hi Adrien,
>
> >
> > Hi Konstantin,
> >
> > On Thu, Jan 05, 2017 at 11:32:38AM +, Ananyev, Konstantin wrote:
> > > Hi Adrien,
> > >
> > > >
> > > >
On Mon, Jan 09, 2017 at 12:26:53PM +0100, Thomas Monjalon wrote:
> 2017-01-09 11:57, Tiwei Bie:
> > On Sun, Jan 08, 2017 at 08:39:55PM +0800, Ananyev, Konstantin wrote:
> > > > Well my first reply to this thread was asking why isn't the whole API
> > > &
;
- Minor improvements on comments;
v6:
- Revert the changes related to the reserved flags;
- Rebase the patch set on the latest branch, xstats code is changed recently;
- Update the feature list when adding the MACsec support for ixgbe;
Tiwei Bie (6):
mbuf: add flag for MACsec
ethdev: add event
This commit adds a below event type:
- RTE_ETH_EVENT_MACSEC
This event will occur when the PN counter in a MACsec connection
reaches the exhaustion threshold.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_ether
Add a new Tx flag in mbuf, that can be set by applications to
enable the MACsec offload for a packet to be transmitted.
Signed-off-by: Tiwei Bie
---
doc/guides/rel_notes/release_17_02.rst | 5 +
lib/librte_mbuf/rte_mbuf.c | 2 ++
lib/librte_mbuf/rte_mbuf.h | 6
the packets to be transmitted.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index d5d2956..49c073b 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether
Below MACsec offload commands are added:
- set macsec offload on encrypt on|off replay-protect on|off
- set macsec offload off
- set macsec sc tx|rx
- set macsec sa tx|rx
Also update the testpmd user guide.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
app/test-pmd/cmdline.c
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
doc/guides/nics/features/default.ini| 1
Add information about the new ixgbe PMD APIs in the release notes.
Signed-off-by: Tiwei Bie
Acked-by: John McNamara
---
doc/guides/rel_notes/release_17_02.rst | 5 +
1 file changed, 5 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02
On Wed, Jan 11, 2017 at 06:32:48PM +0100, Olivier MATZ wrote:
> Hi Tiwei, Hi Thomas,
>
> On Mon, 09 Jan 2017 12:26:53 +0100, Thomas Monjalon
> wrote:
> > 2017-01-09 11:57, Tiwei Bie:
> > > On Sun, Jan 08, 2017 at 08:39:55PM +0800, Ananyev, Konstantin
> > > wr
n-literal-null-conversion]
> port_id, UINT8);
> ^
>
> Please, send a v7
Oops.. Really sorry about it.. Will send v7!
Best regards,
Tiwei Bie
;
- Minor improvements on comments;
v6:
- Revert the changes related to the reserved flags;
- Rebase the patch set on the latest branch, xstats code is changed recently;
- Update the feature list when adding the MACsec support for ixgbe;
v7:
- Fix clang build;
Tiwei Bie (6):
mbuf: add flag for
This commit adds a below event type:
- RTE_ETH_EVENT_MACSEC
This event will occur when the PN counter in a MACsec connection
reaches the exhaustion threshold.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_ether
Add a new Tx flag in mbuf, that can be set by applications to
enable the MACsec offload for a packet to be transmitted.
Signed-off-by: Tiwei Bie
Acked-by: Olivier Matz
---
doc/guides/rel_notes/release_17_02.rst | 5 +
lib/librte_mbuf/rte_mbuf.c | 2 ++
lib/librte_mbuf
This commit adds a below event type:
- RTE_ETH_EVENT_MACSEC
This event will occur when the PN counter in a MACsec connection
reaches the exhaustion threshold.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_ether
the packets to be transmitted.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index d5d2956..49c073b 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether
;
- Minor improvements on comments;
v6:
- Revert the changes related to the reserved flags;
- Rebase the patch set on the latest branch, xstats code is changed recently;
- Update the feature list when adding the MACsec support for ixgbe;
v7:
- Fix clang build;
Tiwei Bie (6):
mbuf: add flag for
Add a new Tx flag in mbuf, that can be set by applications to
enable the MACsec offload for a packet to be transmitted.
Signed-off-by: Tiwei Bie
Acked-by: Olivier Matz
---
doc/guides/rel_notes/release_17_02.rst | 5 +
lib/librte_mbuf/rte_mbuf.c | 2 ++
lib/librte_mbuf
Add information about the new ixgbe PMD APIs in the release notes.
Signed-off-by: Tiwei Bie
Acked-by: John McNamara
---
doc/guides/rel_notes/release_17_02.rst | 5 +
1 file changed, 5 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
doc/guides/nics/features/default.ini| 1
Below MACsec offload commands are added:
- set macsec offload on encrypt on|off replay-protect on|off
- set macsec offload off
- set macsec sc tx|rx
- set macsec sa tx|rx
Also update the testpmd user guide.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
app/test-pmd/cmdline.c
the packets to be transmitted.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index d5d2956..49c073b 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether
Add information about the new ixgbe PMD APIs in the release notes.
Signed-off-by: Tiwei Bie
Acked-by: John McNamara
---
doc/guides/rel_notes/release_17_02.rst | 5 +
1 file changed, 5 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02
Below MACsec offload commands are added:
- set macsec offload on encrypt on|off replay-protect on|off
- set macsec offload off
- set macsec sc tx|rx
- set macsec sa tx|rx
Also update the testpmd user guide.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
app/test-pmd/cmdline.c
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
doc/guides/nics/features/default.ini| 1
When MACsec patch was merged. The helper function is_ixgbe_pmd() was
just raised and merged in another git tree. Now, both of them have
been merged in the same git tree. So do the same fix for MACsec.
Tiwei Bie (1):
net/ixgbe: fix API parameter checking
drivers/net/ixgbe/ixgbe_ethdev.c | 30
Add checks to rte_pmd_ixgbe_macsec_* APIs to ensure that the
port is an ixgbe port.
Fixes: b35d309710fe ("net/ixgbe: add MACsec offload")
Signed-off-by: Tiwei Bie
---
drivers/net/ixgbe/ixgbe_ethdev.c | 30 ++
drivers/net/ixgbe/rte_pmd_ixgbe.h | 4 +++
V_TO_PCI(dev);
>
> - if (is_ixgbe_pmd(dev_info.driver_name) != 0)
> + if (is_ixgbe_pmd(dev->data->drv_name))
> return -ENOTSUP;
>
The return value of is_ixgbe_pmd() is not boolean (actually I think it
should be based on its name). If we omit the comparison
be
> > based on its name). If we omit the comparison with 0, the code looks weird.
> > It
> > looks like it'll return -ENOTSUP if the port's driver is ixgbe PMD.
>
> Yes, it’s weird. But what makes it weird is not the missing comparison but
> the function name.
> Better changing it to ixgbe_pmd_check. How about it?
>
Yeah, I also prefer to change the helper function itself. But I'm not
good at the naming. I'd like to hear others' opinion. :-)
Best regards,
Tiwei Bie
t;ixgbe"))
> - return -ENOTSUP;
> + if (strcmp(dev->driver->pci_drv.driver.name,
> +drv->pci_drv.driver.name))
> + return FALSE;
>
It would be better to use `false' instead of `FALSE'.
Best regards,
Tiwei Bie
if (!strstr(driver_name, "ixgbe"))
> > > - return -ENOTSUP;
> > > + if (strcmp(dev->driver->pci_drv.driver.name,
> > > +drv->pci_drv.driver.name))
> > > + return FALSE;
> > >
> >
> > It would be better to use `false' instead of `FALSE'.
> I see both 'false' and 'FALSE' are defined and used. Is there any reason that
> 'false' is better?
>
I think `true' and `false' are standard keywords defined and
reserved by C. So I think it would be better to use them if
the return type is `bool'.
Best regards,
Tiwei Bie
ead of `FALSE'.
> > > I see both 'false' and 'FALSE' are defined and used. Is there any reason
> > > that
> > 'false' is better?
> > >
> >
> > I think `true' and `false' are standard keywords defined and reserved by C.
> > So I
> > think it would be better to use them if the return type is `bool'.
> O, there's no 'bool' in C. You have to define it. The same for 'false' and
> 'true'.
>
The `bool', `true' and `false' are all standard keywords defined and
reserved by C, although the stdbool.h is not used in ixgbe.
C adds this support by introducing a new header stdbool.h:
#ifndef __bool_true_false_are_defined
#define __bool_true_false_are_defined 1
#ifndef __cplusplus
#define false 0
#define true1
#define bool_Bool
#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER)
typedef int _Bool;
#endif
#endif /* !__cplusplus */
#endif /* __bool_true_false_are_defined */
Best regards,
Tiwei Bie
> >
> > C adds this support by introducing a new header stdbool.h:
> >
> > #ifndef __bool_true_false_are_defined
> > #define __bool_true_false_are_defined 1
> >
> > #ifndef __cplusplus
> >
> > #define false 0
> > #define true1
> >
> > #define bool_Bool
> > #if __STDC_VERSION__ < 199901L && __GNUC__ < 3
> > && !defined(__INTEL_COMPILER)
> > typedef int _Bool;
> > #endif
> O, you're talking about C99. _Bool is a keyword added by it. 'bool', 'true',
> 'false' are not. That's why this header file have to define them.
>
C99 added all those as keyword, although doesn't implement
all of them as the builtin type (e.g. int). All of them are
standard keywords defined by C99. The `bool', `true' and
`false' are defined in section 7.16 of the C99 spec [1] and
implemented as macros:
7.16 Boolean type and values
1 The header defines four macros.
2 The macro
bool
expands to _Bool.
3 The remaining three macros are suitable for use in #if preprocessing
directives. They are
true
which expands to the integer constant 1,
false
which expands to the integer constant 0, and
__bool_true_false_are_defined
which expands to the integer constant 1.
4 Notwithstanding the provisions of 7.1.3, a program may undefine and perhaps
then redefine the macros bool, true, and false.222)
Footnotes
222) See ''future library directions'' (7.26.7).
[1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
Best regards,
Tiwei Bie
usplus
> > > >
> > > > #define false 0
> > > > #define true1
> > > >
> > > > #define bool_Bool
> > > > #if __STDC_VERSION__ < 199901L && __GNUC__ < 3 &&
> > > > !defined(__INTEL_COMPILER)
> > > > typedef int _Bool;
> > > > #endif
> > > O, you're talking about C99. _Bool is a keyword added by it. 'bool',
> > > 'true',
> > 'false' are not. That's why this header file have to define them.
> > >
> >
> > C99 added all those as keyword, although doesn't implement all of them as
> > the builtin type (e.g. int). All of them are standard keywords defined by
> > C99.
> > The `bool', `true' and `false' are defined in section 7.16 of the C99 spec
> > [1] and
> > implemented as macros:
> >
> > 7.16 Boolean type and values
> >
> > 1 The header defines four macros.
> >
> > 2 The macro
> > bool
> > expands to _Bool.
> >
> > 3 The remaining three macros are suitable for use in #if preprocessing
> > directives. They are
> > true
> > which expands to the integer constant 1,
> > false
> > which expands to the integer constant 0, and
> > __bool_true_false_are_defined
> > which expands to the integer constant 1.
> >
> > 4 Notwithstanding the provisions of 7.1.3, a program may undefine and
> > perhaps then redefine the macros bool, true, and false.222)
> >
> > Footnotes
> >
> > 222) See ''future library directions'' (7.26.7).
> >
> > [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
> O, I see the divergence. It's about the term 'keyword'. I only count '6.4.1
> Keywords'.
> Anyway, as both 'false'/'true' and 'FALSE'/'TRUE' are defined. I don’t know
> why we cannot use any of them. If 'FALSE'/'TRUE' is not preferred, better
> create a new patch to clean them up.
>
I didn't say we cannot use FALSE/TRUE, I just suggested that false/true
would be better. :-)
I think the reason why introduce _Bool as builtin keyword and implement
others as macros is to provide applications the ability to redefine them
for compatibility issues. I think new code should follow the spec if
possible. :-)
Best regards,
Tiwei Bie
This patch set adds the MACsec offload support for ixgbe.
The testpmd is also updated to support MACsec cmds.
v2:
- Update the documents for testpmd;
- Update the release notes;
- Reuse the functions provided by base code;
Tiwei Bie (4):
lib: add MACsec offload flags
net/ixgbe: add MACsec
These flags will be used in next commits in the ixgbe pmd.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
lib/librte_mbuf/rte_mbuf.h| 5 +
2 files changed, 7 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 9678179
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
---
drivers/net/ixgbe/ixgbe_ethdev.c| 476
Add information about the new ixgbe PMD APIs in the release note.
Signed-off-by: Tiwei Bie
---
doc/guides/rel_notes/release_17_02.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02.rst
index 3b65038..c76cf5f
- add test for set macsec offload
- add test for set macsec sc
- add test for set macsec sa
Also update the testpmd user guide.
Signed-off-by: Tiwei Bie
---
app/test-pmd/cmdline.c | 389
app/test-pmd/macfwd.c | 2 +
app
Add a new Tx flag in mbuf, that can be set by applications to
enable the MACsec offload for a packet to be transmitted.
Signed-off-by: Tiwei Bie
---
doc/guides/rel_notes/release_17_02.rst | 5 +
lib/librte_mbuf/rte_mbuf.c | 2 ++
lib/librte_mbuf/rte_mbuf.h | 6
set;
- Add an ethdev event type for MACsec;
- Advertise the MACsec offload capabilities based on the mac type;
- Minor fixes and improvements;
Tiwei Bie (6):
mbuf: add flag for MACsec
ethdev: add event type for MACsec
ethdev: add MACsec offload capability flags
net/ixgbe: add MACsec offload
This commit adds a below event type:
- RTE_ETH_EVENT_MACSEC
This event will occur when the PN counter in a MACsec connection
reaches the exhaustion threshold.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_ether
Add information about the new ixgbe PMD APIs in the release note.
Signed-off-by: Tiwei Bie
Acked-by: John McNamara
---
doc/guides/rel_notes/release_17_02.rst | 5 +
1 file changed, 5 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
---
drivers/net/ixgbe/ixgbe_ethdev.c| 481
the packets to be transmitted.
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index b0b2678..faec56f 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether
Below MACsec offload commands are added:
- set macsec offload on encrypt on|off replay-protect on|off
- set macsec offload off
- set macsec sc tx|rx
- set macsec sa tx|rx
Also update the testpmd user guide.
Signed-off-by: Tiwei Bie
---
app/test-pmd/cmdline.c
Hi Adrien,
On Mon, Dec 26, 2016 at 04:15:37PM +0100, Adrien Mazarguil wrote:
> Hi Tiwei,
>
> On Sun, Dec 25, 2016 at 10:57:54PM +0800, Tiwei Bie wrote:
> > This patch set adds the MACsec offload support for ixgbe.
> > The testpmd is also updated to support MACsec cmds.
>
Hi Adrien,
On Tue, Dec 27, 2016 at 03:37:46PM +0100, Adrien Mazarguil wrote:
> Hi Tiwei,
>
> On Tue, Dec 27, 2016 at 09:33:31AM +0800, Tiwei Bie wrote:
> > Hi Adrien,
> >
> > On Mon, Dec 26, 2016 at 04:15:37PM +0100, Adrien Mazarguil wrote:
> > > Hi Tiwei,
; not supported.");
>
> + /* Check if there is the filter in SW list */
> + ethertype_filter = rte_zmalloc("ethertype_filter",
> +sizeof(*ethertype_filter), 0);
> + i40e_ethertype_filter_convert(filter, ethertype_filter);
> + node = i40e_sw_ethertype_filter_lookup(ethertype_rule,
> +ðertype_filter->input);
> + if (add && node) {
> + PMD_DRV_LOG(ERR, "Conflict with existing ethertype rules!");
> + rte_free(ethertype_filter);
> + return -EINVAL;
> + } else if (!add && !node) {
When `if (add && node)' is true, function will return. There is no need
to use `else' here.
Best regards,
Tiwei Bie
move_cloud_filters_element_data),
> @@ -6559,11 +6695,36 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
> pfilter->tenant_id = rte_cpu_to_le_32(tunnel_filter->tenant_id);
> pfilter->queue_number = rte_cpu_to_le_16(tunnel_filter->queue_id);
>
> - if (add)
> + tunnel = rte_zmalloc("tunnel_filter", sizeof(*tunnel), 0);
> + i40e_tunnel_filter_convert(cld_filter, tunnel);
> + node = i40e_sw_tunnel_filter_lookup(tunnel_rule, &tunnel->input);
> + if (add && node) {
> + PMD_DRV_LOG(ERR, "Conflict with existing tunnel rules!");
> + rte_free(tunnel);
> + return -EINVAL;
> + } else if (!add && !node) {
When `if (add && node)' is true, function will return. There is no need
to use `else' here.
Best regards,
Tiwei Bie
ir_filter", sizeof(*fdir_filter), 0);
> + i40e_fdir_filter_convert(filter, fdir_filter);
> + node = i40e_sw_fdir_filter_lookup(fdir_info, &fdir_filter->fdir.input);
> + if (add && node) {
> + PMD_DRV_LOG(ERR,
> + "Conflict with existing flow director rules!");
> + rte_free(fdir_filter);
> + return -EINVAL;
> + } else if (!add && !node) {
When `if (add && node)' is true, function will return. There is no need
to use `else' here.
Best regards,
Tiwei Bie
((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_SR) || \
> ((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_LR))
>
> +const struct rte_flow_ops i40e_flow_ops;
> +
Same here. Are you sure that you want to define a variable in i40e_ethdev.h?
Maybe you should add the `extern' qualifier.
Best regards,
Tiwei Bie
return ret;
> +
> + node = i40e_sw_ethertype_filter_lookup(ethertype_rule, &filter->input);
> + if (node)
> + ret = i40e_sw_ethertype_filter_del(pf, node);
> + else
> + return -EINVAL;
It would be more readable to check whether node equals NULL and return
when it's true, and call i40e_sw_ethertype_filter_del(pf, node) outside
the `if' statement:
node = i40e_sw_ethertype_filter_lookup(ethertype_rule, &filter->input);
if (node == NULL)
return -EINVAL;
ret = i40e_sw_ethertype_filter_del(pf, node);
Best regards,
Tiwei Bie
;
> + struct i40e_fdir_info *fdir_info = &pf->fdir;
> + struct i40e_fdir_filter *fdir_filter;
> + struct i40e_flow *flow;
> + int ret = 0;
> +
Meaningless initialization.
> + ret = i40e_fdir_flush(dev);
> + if (!ret) {
> + /* Delete FDIR filters in FDIR list. */
> + while ((fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list)))
> + i40e_sw_fdir_filter_del(pf, fdir_filter);
> +
The i40e_sw_fdir_filter_del() may fail, in which case fdir_filter won't
be removed from fdir_info->fdir_list. Will it lead to an infinite loop?
Should you check the retval of i40e_sw_fdir_filter_del() and break the
loop when it fails?
Best regards,
Tiwei Bie
; > Why don't declare them as the global functions at the beginning?
>
> When I implement the store/restore function, I plan this function is only
> used in i40e_ethdev.c.
> I change them to the global functions since I add i40e_flow.c to rework all
> the flow ops.
>
These functions are also introduced in this patch set. There is no
particular reason to mark them as static at first and then turn them
into the global functions in the later patches. So it would be better
to declare them as the global ones when introducing them.
Best regards,
Tiwei Bie
+
> > > + while ((p_fdir = TAILQ_FIRST(&fdir_info->fdir_list))) {
> >
> > There is a redundant pair of parentheses, or you should compare with NULL.
>
> I think the another parentheses is used to compare with NULL. In fact there's
> similar using in PMD.
>
The outer parentheses are redundant unless you compare it with NULL explicitly.
Any way, you could just follow the existing coding style.
Best regards,
Tiwei Bie
On Wed, Dec 28, 2016 at 03:14:55PM +0800, Tiwei Bie wrote:
> On Wed, Dec 28, 2016 at 03:10:39PM +0800, Xing, Beilei wrote:
> >
> >
> > > -Original Message-
> > > From: Bie, Tiwei
> > > Sent: Wednesday, December 28, 2016 11:39 AM
> > &g
set;
- Add an ethdev event type for MACsec;
- Advertise the MACsec offload capabilities based on the mac type;
- Minor fixes and improvements;
v4:
- Reserve bits in mbuf and ethdev for PMD specific API;
- Use the reserved bits in PMD specific API;
Tiwei Bie (7):
mbuf: reserve a Tx offload flag
Reserve a Tx offload flag in mbuf, that can be used by PMD to define
its own Tx offload flag when implementing the PMD-specific API.
Suggested-by: Adrien Mazarguil
Signed-off-by: Tiwei Bie
---
lib/librte_mbuf/rte_mbuf.c | 2 ++
lib/librte_mbuf/rte_mbuf.h | 5 +
2 files changed, 7
Reserve an event type, that can be used by PMD to define its own
event type when implementing the PMD-specific API.
Suggested-by: Adrien Mazarguil
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.h b
Reserve a Tx capability flag and a Rx capability flag, that can be
used by PMD to define its own capability flags when implementing the
PMD-specific API.
Suggested-by: Adrien Mazarguil
Signed-off-by: Tiwei Bie
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2 insertions(+)
diff
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
---
drivers/net/ixgbe/ixgbe_ethdev.c| 481
Add information about the new ixgbe PMD APIs in the release note.
Signed-off-by: Tiwei Bie
---
doc/guides/rel_notes/release_17_02.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02.rst
index 180af82..34dba45
Add information about the reserved flags for PMD-specific API in
the release note.
Signed-off-by: Tiwei Bie
---
doc/guides/rel_notes/release_17_02.rst | 12
1 file changed, 12 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02
Below MACsec offload commands are added:
- set macsec offload on encrypt on|off replay-protect on|off
- set macsec offload off
- set macsec sc tx|rx
- set macsec sa tx|rx
Also update the testpmd user guide.
Signed-off-by: Tiwei Bie
---
app/test-pmd/cmdline.c
;
- Minor improvements on comments;
Tiwei Bie (8):
mbuf: reserve a Tx offload flag for PMD-specific API
ethdev: reserve an event type for PMD-specific API
ethdev: reserve capability flags for PMD-specific API
net/ixgbe: add MACsec offload support
app/testpmd: add MACsec offload commands
Reserve a Tx offload flag in mbuf, that can be used by PMD to define
its own Tx offload flag when implementing the PMD-specific API.
Suggested-by: Adrien Mazarguil
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
lib/librte_mbuf/rte_mbuf.c | 2 ++
lib/librte_mbuf/rte_mbuf.h | 5 +
2
Reserve an event type, that can be used by PMD to define its own
event type when implementing the PMD-specific API.
Suggested-by: Adrien Mazarguil
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib
MACsec (or LinkSec, 802.1AE) is a MAC level encryption/authentication
scheme defined in IEEE 802.1AE that uses symmetric cryptography.
This commit adds the MACsec offload support for ixgbe.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
drivers/net/ixgbe/ixgbe_ethdev.c| 481
Reserve a Tx capability flag and a Rx capability flag, that can be
used by PMD to define its own capability flags when implementing the
PMD-specific API.
Suggested-by: Adrien Mazarguil
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
lib/librte_ether/rte_ethdev.h | 2 ++
1 file changed, 2
Below MACsec offload commands are added:
- set macsec offload on encrypt on|off replay-protect on|off
- set macsec offload off
- set macsec sc tx|rx
- set macsec sa tx|rx
Also update the testpmd user guide.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
app/test-pmd/cmdline.c
Add information about the new ixgbe PMD APIs in the release notes.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
doc/guides/rel_notes/release_17_02.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides/rel_notes/release_17_02.rst
Add information about the flags reserved for PMD-specific API in
the release notes.
Signed-off-by: Tiwei Bie
Acked-by: Wenzhuo Lu
---
doc/guides/rel_notes/release_17_02.rst | 12
1 file changed, 12 insertions(+)
diff --git a/doc/guides/rel_notes/release_17_02.rst
b/doc/guides
Add MACsec offload into NIC feature list. And also update the
feature list for the supported drivers.
Signed-off-by: Tiwei Bie
---
doc/guides/nics/features/default.ini | 1 +
doc/guides/nics/features/ixgbe.ini | 1 +
2 files changed, 2 insertions(+)
diff --git a/doc/guides/nics/features
mb
If ? is a wildcard used by shell, it should at least be: rte_?mb
But rte_*mb is easier to recognize, and matches all of them. :-)
Best regards,
Tiwei Bie
> >
> > > keep consistent with other barrier definitions in
> > > the file.
> > >
> > > Sugges
x_tail, rxq->rx_free_trigger);
+ I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rxq->rx_free_trigger);
rxq->rx_free_trigger =
(uint16_t)(rxq->rx_free_trigger + rxq->rx_free_thresh);
Thanks & regards,
Tiwei Bie
> --
> 2.5.5
>
e a Tx capability flag and a Rx capability flag, that can be
> > used by PMD to define its own capability flags when implementing the
> > PMD-specific API.
> >
> > Suggested-by: Adrien Mazarguil
> > Signed-off-by: Tiwei Bie
> > Acked-by: Wenzhuo Lu
> > --
TCH v5 3/8] ethdev: reserve capability flags for
> > > > PMD-specific API
> > > >
> > > > Reserve a Tx capability flag and a Rx capability flag, that can be
> > > > used by PMD to define its own capability flags when implementing the
> > >
; Yes, that would be my preference.
> As I said above - spending extra bit in ol_flags doesn't look like a big
> problem to me.
> In return there would be no need to consider how to handle all that confusing
> scenarios in future.
Okay. I'll update my patches. Thanks a lot for your comments.
Thanks & regards,
Tiwei Bie
On Thu, Jan 05, 2017 at 09:33:22AM +0100, Adrien Mazarguil wrote:
> On Thu, Jan 05, 2017 at 07:56:08AM +0800, Tiwei Bie wrote:
> > On Thu, Jan 05, 2017 at 01:44:18AM +0800, Ananyev, Konstantin wrote:
> > [...]
> > > > >
> > > > > I understand that.
to use
> Bugzilla and configure a workflow friendly with the mailing list.
> As it is not available yet, we can also compare Bugzilla and GitHub.
>
> Configuring the account for our needs may take time, especially during
> a release period.
> Thanks for your patience.
Great news! Thank you! :-)
Best regards,
Tiwei Bie
Signed-off-by: Tiwei Bie
---
drivers/net/i40e/i40e_tm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index 56013b1..d90313a 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -962,8 +962,6
Signed-off-by: Tiwei Bie
---
drivers/net/ixgbe/ixgbe_tm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c
index b76d186..cdcf45c 100644
--- a/drivers/net/ixgbe/ixgbe_tm.c
+++ b/drivers/net/ixgbe/ixgbe_tm.c
@@ -1029,8 +1029,6
Make the code more readable. No functional change.
Signed-off-by: Tiwei Bie
---
drivers/net/virtio/virtio_rxtx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index fbc96df..e30377c 100644
--- a
This patchset depends on below patchset:
http://dpdk.org/ml/archives/dev/2017-June/068315.html
I'll also collect these public patches into my github repo:
https://github.com/btw616/dpdk-virtio1.1
Best regards,
Tiwei Bie
Tiwei Bie (6):
net/virtio: optimize the rx path
vhost: opt
Signed-off-by: Tiwei Bie
---
lib/librte_vhost/virtio_net.c | 185 --
1 file changed, 88 insertions(+), 97 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index c0b4dde..0888d2b 100644
--- a/lib/librte_vhost
Signed-off-by: Tiwei Bie
---
drivers/net/virtio/virtio_ethdev.c | 5 +-
drivers/net/virtio/virtio_ethdev.h | 2 +
drivers/net/virtio/virtio_rxtx.c | 255 -
3 files changed, 142 insertions(+), 120 deletions(-)
diff --git a/drivers/net/virtio
Revert the changes in 18dc1b1ac, because we want to test the
performance similar to the real world case.
Signed-off-by: Tiwei Bie
---
drivers/net/virtio/virtio_rxtx.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net
Signed-off-by: Tiwei Bie
---
drivers/net/virtio/virtio_rxtx_1.1.c | 65
1 file changed, 28 insertions(+), 37 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx_1.1.c
b/drivers/net/virtio/virtio_rxtx_1.1.c
index 4602e6d..883a027 100644
--- a/drivers
Manually prefetch the first desc in dequeue path.
Signed-off-by: Tiwei Bie
---
lib/librte_vhost/virtio_net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 0888d2b..08d53d9 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b
e set,
but actually they are not available to the backend.
Signed-off-by: Tiwei Bie
---
drivers/net/virtio/virtio-1.1.h | 1 +
drivers/net/virtio/virtio_rxtx.c | 14 +
drivers/net/virtio/virtio_rxtx_1.1.c | 55 +---
drivers/net/virtio/virtqueue.h
ves a separate cleanup if
necessary. The fixes for drivers' base code are also skipped
to keep the base code intact.
Signed-off-by: Tiwei Bie
---
app/test-pmd/testpmd.h | 4 ++--
drivers/crypto/qat/qat_adf/icp_qat_fw.h| 2 +-
drivers/event/dpaa2/dpaa2
On Wed, Jul 19, 2017 at 05:24:38PM +0800, Van Haaren, Harry wrote:
> > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Tiwei Bie
> > Sent: Wednesday, July 19, 2017 10:07 AM
> > To: dev@dpdk.org
> > Cc: tho...@monjalon.net
> > Subject: [dpdk-dev] [PAT
On Thu, Jul 20, 2017 at 10:34:39AM +0530, Shreyansh Jain wrote:
> On Wednesday 19 July 2017 02:36 PM, Tiwei Bie wrote:
> > Remove the unwanted spaces before `;' across DPDK source code
> > by below one-liner with some minor manual refinements.
> >
> > find .
On Thu, Jul 20, 2017 at 11:32:18AM +0300, Thomas Monjalon wrote:
> 20/07/2017 10:56, Jens Freimann:
> > On Wed, Jul 19, 2017 at 06:23:21PM +0800, Tiwei Bie wrote:
> > >On Wed, Jul 19, 2017 at 05:24:38PM +0800, Van Haaren, Harry wrote:
> > [...]
> > > > Hi Tiwe
ixes this issue.
Fixes: b171fad1ffa5 ("vhost: log used vring changes")
Cc: sta...@dpdk.org
Reported-by: Xiao Wang
Signed-off-by: Tiwei Bie
---
lib/librte_vhost/vhost.h | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vh
1 - 100 of 805 matches
Mail list logo